PBKDF2 Hash Generator
Derive PBKDF2-HMAC keys with salt and iterations, as hex, base64 or PHC.
About this tool
Enter a password and salt (text, hex or base64, or generate a random one), the iteration count, the hash function and the key length. The derived key appears as hex and base64, plus Django-style and PHC-format strings, with the time it took.
What PBKDF2 does
PBKDF2 (Password-Based Key Derivation Function 2, defined in RFC 8018) stretches a password into a key by running HMAC over it many thousands of times with a salt. The salt, unique and random per password, stops attackers using precomputed tables. The iterations make each guess slow, which matters when a password database leaks. OWASP's 2023 guidance is at least 600,000 iterations for PBKDF2-HMAC-SHA256 and 210,000 for SHA-512. PBKDF2 is used by Django's default password hasher, WPA2 Wi-Fi keys, many password managers and FIPS-140 systems. The tool runs on the browser's Web Crypto API. Its output matches Python's hashlib.pbkdf2_hmac, which we checked for both SHA-256 and the SHA-1 test vector, as well as OpenSSL and Node's crypto.pbkdf2. Honest limits: for new password storage, memory-hard Argon2id or bcrypt resist GPU cracking better than PBKDF2. The Django line uses the salt as text, as Django does. Don't type passwords you really use into any website. This one runs locally and sends nothing. The hash generator, the HMAC generator and the password generator are related.
Frequently asked questions
How many PBKDF2 iterations should I use?
OWASP (2023) recommends at least 600,000 for PBKDF2-HMAC-SHA256 and 210,000 for SHA-512.
Is PBKDF2 still secure?
Yes, with a high iteration count and unique salts, though Argon2id or bcrypt are preferred for new systems.
Why is a salt needed?
It makes every hash unique, so identical passwords don't share hashes and precomputed tables don't work.
Is anything uploaded?
No. Everything runs in your browser and nothing is stored or sent.