Security Tools
PBKDF2 Generator and Key Derivation Tool
Derive a PBKDF2-HMAC key from a password and salt with SHA-256, SHA-512, SHA-384 or SHA-1, your own iterations and length, in hex or Base64, in your browser.
How to use PBKDF2 Generator and Key Derivation Tool
Enter the password and a salt, or tick the random salt option, then choose the hash, iterations, output length and format. Press Derive key to see the derived key, the salt in hex and the time taken on your device.
- Enter password and saltType the password and a salt as text, hex or Base64, or tick Use a random salt for 16 fresh bytes.
- Set the parametersChoose the hash, the iterations (600,000 by default), the output length in bytes and hex or Base64.
- Derive and storePress Derive key, then keep the salt and parameters together with the derived key.
Choosing iterations and salt
PBKDF2 repeats HMAC many thousands of times so that every password guess costs an attacker the same effort. OWASP currently recommends at least 600,000 iterations for PBKDF2-HMAC-SHA256, 210,000 for SHA-512 and 1,300,000 for SHA-1, and the tool warns when you go below these; OWASP gives no figure for SHA-384, which costs the same per iteration as SHA-512, so the SHA-512 figure is applied to it. Every stored password needs its own random salt of 16 bytes or more, saved alongside the result. The time shown is measured on your own device, which helps you judge what each login check will cost on similar hardware.
Matching other implementations
If your result differs from another library, check that all four inputs match: hash, iteration count, output length in bytes and the exact salt bytes. A salt stored as hex or Base64 must be entered in that format, not as text. As a reference, the password correct horse battery staple with the salt salt, 600,000 iterations and 32 bytes gives a PBKDF2-HMAC-SHA256 key starting 28ec9e24cc98159f, the same as Python's hashlib.pbkdf2_hmac('sha256', …). The password is used as UTF-8 exactly as typed, including spaces at either end.
Accuracy and data handling
A format or strength result covers only the checks shown here and does not replace a full security review or secure key management. The calculation runs in your current browser; the tool code does not send the input to a processing API.
FAQ
How many PBKDF2 iterations should I use?
OWASP currently recommends at least 600,000 for PBKDF2-HMAC-SHA256. More is safer but makes every login check slower, so test the cost on your own servers.
What's the difference between PBKDF2 and bcrypt?
Both are deliberately slow password hashes. bcrypt has a built-in salt and cost factor; PBKDF2 leaves salt and iterations to you but is in NIST SP 800-132 and built into Web Crypto. OWASP's first choice today is Argon2id.
Is my password sent anywhere?
No. The key is derived in your browser with Web Crypto, and the password and salt aren't sent to the server. Use a test password when experimenting.
More Security Tools
Related toolsCreate prefixed random API keys and the SHA-256 hashes to store server-side.
Make cryptographically random PINs that skip 0000, 1234, years and dates.
Create easy-to-type passphrases from random words, with the entropy shown for each setting.
Create random one-time code samples and see how easy each length is to guess.
Get CRC-32, CRC-16, CRC-8, Adler-32 and other checksums from text, hex or Base64.
See a password's estimated entropy, crack times and the patterns that weaken it.