Cryptography

PBKDF2 password hash generator

PBKDF2 Hash derives a 256-bit key from the password you type, using PBKDF2-HMAC-SHA256 (RFC 8018) through the browser's WebCrypto. Developers use it to exercise key-derivation code, make keys for local tooling and see how the iteration count scales the work. The Output shows the salt and the 64-character hex key. With "Salt (optional)" empty each run draws a fresh random salt, so the key differs every time; enter the salt to repeat a result. "Iterations" defaults to 600,000.

How to use PBKDF2 Hash

  1. Open PBKDF2 Hash in the Toolbox101 app.
  2. Type a password into the Password box. Leave Salt (optional) empty for a random salt, or enter one (hex or text) to repeat a result.
  3. Set Iterations. The default of 600,000 is OWASP's current figure for PBKDF2-HMAC-SHA256, and larger values take proportionally longer.
  4. Click Generate New and read the Salt: and Key: lines in the Output box.
  5. Click Copy to take both lines. Keep the salt with the key, since checking the key later needs it.

Worked example

PBKDF2 Hash returns the output below for this combination.

Input

MyPassword

Key

000102030405060708090a0b0c0d0e0f

Output

Salt: 000102030405060708090a0b0c0d0e0f
Key: 73239170e2113d49cced5357d16db3abc65409c3119ecc6218752ef918311d87

Check it yourself: open PBKDF2 Hash and enter the same input and key.

Frequently asked questions

Why does the key change every time I type the same password?

With Salt (optional) empty each run draws a fresh random 16-byte salt, and PBKDF2's output depends on the salt as much as on the password. The tool prints the salt on its own line, so paste it back into the Salt box to reproduce the same key. A hex salt of even length is decoded as bytes; any other text is used as UTF-8.

How many iterations should I use for PBKDF2?

The Iterations box starts at 600,000, OWASP's current figure for PBKDF2-HMAC-SHA256 (it asks for 1,300,000 with SHA-1 and 210,000 with SHA-512). Raise it where you can afford it; each increase slows the derivation in proportion. The box accepts 1 to 5,000,000.

Can I store passwords with this tool's output?

Not as is. The output is a raw 32-byte key plus its salt, not a self-describing hash string, so to verify a password later you must store the salt and the iteration count with it. The Argon2 tool's encoded format carries its parameters inside the string.

Is PBKDF2 still safe to use?

PBKDF2-HMAC-SHA256 is still acceptable for password storage at a high iteration count, and it is the NIST-approved option of the three derivation tools here. It is only CPU-hard, though, so memory-hard functions such as scrypt and Argon2id are the stronger choice for new systems.

Use PBKDF2 Hash now

Runs in your browser. Nothing you type is uploaded.