Loading…

How to use DJB2 Hash

Type your text and the DJB2 hash is computed live using the hash*33 + c algorithm, shown as a number and hex value.

Frequently asked questions

What is the DJB2 algorithm?

It starts at 5381 and for each character sets hash = hash*33 + c. The magic constants give a good spread for short strings.

Is DJB2 cryptographic?

No — it is a fast general-purpose hash for hash tables, not for security.

Why the number 5381?

It is the empirically chosen seed by Daniel J. Bernstein that produced few collisions in his tests.

More Hash & Crypto Tools

CRC-16 Checksum
Calculate CRC-16/ARC (IBM) cyclic redundancy check values
Luhn Validator & Check Digit
Validate credit card / IMEI numbers with the Luhn algorithm and compute the check digit
ISBN Validator & Check Digit
Validate ISBN-10 and ISBN-13 book numbers and compute their check digits
Password Generator
Generate strong random passwords with custom rules
Passphrase Generator
Generate memorable diceware-style passphrases
Password Strength Tester
Analyse password strength and crack time estimate
Random String Generator
Generate cryptographically random strings and tokens
UUID / GUID Generator
Generate RFC 4122 UUID v4 random identifiers
File Hash Calculator
Calculate MD5, SHA-1 and SHA-256 hashes for uploaded files
Bcrypt Hash Generator
Generate real bcrypt password hashes with a random salt and adjustable cost factor
API Token Generator
Generate secure API keys and bearer tokens
OTP Code Generator
Generate real RFC 6238 TOTP codes that match Google Authenticator from a Base32 secret

← View all Hash & Crypto ToolsBrowse all 1,100+ tools →