Skip to main content
CalcChef

PBKDF2 Calculator

Derive a PBKDF2 key in hex or Base64 from a password and salt with HMAC-SHA-1, SHA-256, SHA-384 or SHA-512, and check it against a key you paste. How it works

Use the PBKDF2 Calculator

Enter a password to derive a key.

4 bytes. NIST SP 800-132 asks for a random salt of at least 16 bytes.

Meets the OWASP figure of 600,000 for PBKDF2-HMAC-SHA-256.

A multiple of 8, from 8 to 4,096 bits.

Derived key
Press Derive Key

Paste a key to check the derived key against it. It is not saved.

About the PBKDF2 Calculator

The password password with the salt salt, 600,000 iterations of HMAC-SHA-256 and a 256-bit key gives the PBKDF2 key 669cfe52…005178 in hex. This PBKDF2 calculator derives that key from any password, salt, iteration count, key length and hash with the browser's Web Crypto API, and starts at those settings. For the count, the OWASP Password Storage Cheat Sheet (checked October 2026) recommends 600,000 iterations for PBKDF2-HMAC-SHA256, 220,000 for PBKDF2-HMAC-SHA512 and 1,400,000 for PBKDF2-HMAC-SHA1, which it lists as legacy only.

RFC 6070 test vectors (PBKDF2-HMAC-SHA1)

PasswordSaltIterationsKey length (bits)Derived key (hex)
passwordsalt11600c60c80f961f0e71f3a9b524af6012062fe037a6
passwordsalt2160ea6c014dc72d6f8ccd1ed92ace1d41f0d8de8957
passwordsalt4,0961604b007901b765489abead49d926f721d065a429c1
passwordPASSWORDpasswordsaltSALTsaltSALTsaltSALTsaltSALTsalt4,0962003d2eec4fe41c849b80c8d83662c0e44a8b291a964cf2f07038

Computed by this tool, with the salt as text; the keys match the ones printed in RFC 6070. The RFC also has a vector with 16,777,216 iterations, above the tool's limit, and one whose password and salt contain a NUL character.

SHA-256 and SHA-512 with the password password and the salt salt

HashIterationsKey length (bits)Derived key (hex)
SHA-2561256120fb6cffcf8b32c43e7225256c4f837a86548c92ccc35480805987cb70be17b
SHA-2564,096256c5e478d59288c841aa530db6845c4c8d962893a001ce4e11a4963873aa98134a
SHA-256600,000256669cfe52482116fda1aa2cbe409b2f56c8e4563752b7a28f6eaab614ee005178
SHA-512220,0005123ede6b8c2ba493194db1febc21d3be4fc1c7d63f4a6bcc14ad9ae07c63432c6a867beca4a0dc50070666875567d813cc3bfd3607e634ba6087934cb5ec4bb99a

OWASP iteration figures for PBKDF2

HashOWASP figureNote under Iterations at 600,000
SHA-11,400,000Below the OWASP figure of 1,400,000 for PBKDF2-HMAC-SHA-1. OWASP lists PBKDF2-HMAC-SHA1 as legacy only.
SHA-256600,000Meets the OWASP figure of 600,000 for PBKDF2-HMAC-SHA-256.
SHA-384None publishedOWASP publishes no iteration figure for SHA-384.
SHA-512220,000Meets the OWASP figure of 220,000 for PBKDF2-HMAC-SHA-512.

From the OWASP Password Storage Cheat Sheet. OWASP puts Argon2id first for new password storage and scrypt second.

Frequently asked questions

How many PBKDF2 iterations should I use?
OWASP's Password Storage Cheat Sheet gives 600,000 for HMAC-SHA256, 220,000 for HMAC-SHA512 and 1,400,000 for HMAC-SHA1, and no figure for SHA-384. The note under Iterations says whether your count meets the figure for the hash you chose. For new password storage OWASP puts Argon2id first and scrypt second, and recommends PBKDF2 where FIPS-140 validated algorithms are required.
How long should a PBKDF2 salt be?
NIST SP 800-132 says the randomly generated part of the salt shall be at least 128 bits, which is 16 bytes. The Random 16-byte salt button switches the salt format to Hex and fills in a new random salt; a shorter salt still works but gets a note.
What do the RFC 6070 test vectors give?
The password password and the salt salt with HMAC-SHA1 and 160 bits give 0c60c80f961f0e71f3a9b524af6012062fe037a6 after 1 iteration and 4b007901b765489abead49d926f721d065a429c1 after 4,096. Load RFC 6070 test vector fills in the 4,096-iteration case, so you can check the page against the RFC. In Base64 the 4,096-iteration key is SwB5AbdlSJq+rUnZJvch0GWkKcE=.
Is a PBKDF2 key the same as a stored password hash?
Not as this page shows it. The output is the raw derived key in hex or Base64. A stored password record also keeps the hash, iteration count and salt next to the key, in whatever format your framework uses.
Should the salt be text, hex or Base64?
Whichever matches how your code holds the salt bytes; the key depends only on the bytes. Text is read as UTF-8, so the text salt is the hex 73616c74 and the Base64 c2FsdA==, and all three give the same key. The text 00 is two bytes, while the hex 00 is one, so those give different keys.
What key length should I pick for PBKDF2?
Usually the hash output size: 160 bits for SHA-1, 256 for SHA-256, 384 for SHA-384, 512 for SHA-512. A longer key is built from more blocks, and each block runs the full iteration count again (RFC 8018), so 512 bits from SHA-256 takes twice the work. The first 256 bits of it are the 256-bit key: with password, salt and 4,096 iterations, both start c5e478d5…aa98134a.

Related Tools

View all tools