Skip to content
100% local

PBKDF2 hash generator

Derive a PBKDF2 key from a password with a salt, iteration count and hash algorithm you choose.

Input
Output

PBKDF2 hash generator

Paste a password and this tool derives a key from it using PBKDF2 (Password-Based Key Derivation Function 2), the same algorithm behind countless password-storage schemes, encrypted files and key-stretching setups. It runs the underlying HMAC hash over the password and salt the number of times you specify, which is what makes brute-forcing the result far slower than hashing the password once.

Choose the hash algorithm (SHA-1, SHA-256, SHA-384 or SHA-512), the salt to mix in, the iteration count and the derived key length in bits. Higher iteration counts slow the derivation down and make it more resistant to attack — 100,000 or more is a reasonable starting point for SHA-256, and current OWASP guidance runs higher still. The password format option accepts raw text, or bytes already encoded as hex or Base64, so you can reproduce a derivation from another tool exactly. The output format switches the result between hex and Base64. If you already have a value to check against — a spec, a test vector, another implementation — paste it into the expected-value field and the tally reports whether it matches.

Because PBKDF2 works on raw bytes, the exact input matters: a password containing a Windows-style CRLF line break derives a different key than the same text with a plain LF, and every character — including diacritics and emoji — is hashed as its UTF-8 encoding. The live tally under the output reports the algorithm, iteration count, key length and result length as you type or adjust the options.

Everything runs locally in your browser using the Web Crypto API — the password, salt and derived key are never uploaded anywhere. When you're done, copy the result, download it as a .txt file, or send it to another tool's input to continue working with it.

FAQ

What is PBKDF2 used for?
PBKDF2 turns a password into a fixed-length key, deliberately slowing the process down with repeated hashing so that guessing many passwords is expensive. It is used to store password hashes, derive encryption keys from passphrases and implement key stretching.
How many iterations should I use?
More iterations make the derivation slower and more resistant to brute-force attacks, at the cost of taking longer to compute. 100,000 iterations is a common baseline for SHA-256; current OWASP guidance recommends higher counts, and this tool caps the value at 2,000,000 to keep your browser responsive.
Why doesn't the tool generate a random salt for me?
A salt is meant to be unique per password and stored alongside the derived key, not regenerated on every keystroke. Type or paste the exact salt you want to use — including an empty one, if you are reproducing a specific test vector.
How does the expected-value comparison work?
Paste a hash into the expected-value field and the tally reports "match" or "no match" against the derived key. Hex comparisons ignore letter case; Base64 comparisons are exact.
Is my password uploaded anywhere?
No. The derivation runs entirely in your browser using the Web Crypto API — your password, salt and result never leave your device.