PBKDF2 hash generator
Derive a key from a password with PBKDF2: choose the hash, iterations, salt and length, and get hex and Base64. Checked against RFC 6070. Browser only.
Read as UTF-8. It is not sent or stored.
1 to 10,000,000
1 to 128
The result appears here.The result appears here.Computed in your browser with Web Crypto. For new password storage, prefer Argon2id, or bcrypt where Argon2id is not available; choose PBKDF2 when you need FIPS-validated algorithms or have to match an existing system.
Everything you type here stays in your browser. Nothing is sent to HardenKit or to anyone else.
How to use the PBKDF2 hash generator
- Enter the password.
- Enter the salt as hex, Base64 or text, or press Random 16-byte salt.
- Choose the hash, the iteration count and the key length in bytes.
- Press Derive key and copy the hex or Base64 result.
About this tool
PBKDF2 turns a password into a key by running HMAC over it many thousands of times together with a salt. The repetition is the point: it makes each guess expensive, so an attacker who steals the result cannot try billions of passwords a second. It is defined in RFC 8018, approved by NIST, and built into nearly everything: Wi-Fi WPA2, disk encryption, password managers and the default password hashers of several web frameworks.
Four inputs decide the output besides the password. The salt, random and unique per password, stops attackers from sharing work between users. The iteration count sets the cost. The hash is the HMAC underneath, SHA-256 in most modern uses. The length is how many bytes you want. Change any of them and the result is entirely different, which is what to check first when two systems disagree. This tool lets you reproduce a value or a test vector exactly.
For storing passwords in a new system, PBKDF2 is the fallback, not the first choice. It uses almost no memory, so graphics cards and custom chips run it very efficiently. Argon2id, which fills memory as well as time, resists that far better, and bcrypt is a reasonable second. Choose PBKDF2 when you need FIPS-validated algorithms or must match an existing format, and then use at least 600,000 iterations with SHA-256.
Sources
Questions
For password storage, the OWASP Password Storage Cheat Sheet currently gives 600,000 for PBKDF2-HMAC-SHA-256, 210,000 for SHA-512 and 1,300,000 for SHA-1. Those numbers rise as hardware gets faster, so store the count beside each hash and raise it over time.
No. Argon2id is the current recommendation because it is memory-hard, which blunts graphics cards and custom hardware. bcrypt also holds up better than PBKDF2 per unit of time. PBKDF2’s advantages are that it is standardized by NIST, FIPS-approved and available everywhere.
A random value of at least 16 bytes, new for every password, stored next to the hash. NIST SP 800-132 asks for at least 128 bits. The salt is not secret. Its job is to make every user’s hash different even when passwords are the same.
PBKDF2 produces output in blocks the size of the hash. Asking for more than one block makes the defender do the full work for each block, while an attacker checking guesses only needs the first. So keep the length at or below 32 bytes for SHA-256 and 64 for SHA-512.
It is a key derivation function: one-way like a hash, deliberately slow, and salted. Nothing can be decrypted from its output. It is used either to check a password by deriving again and comparing, or to produce a key for a cipher such as AES.