PBKDF2 Hash Generator
Derive a PBKDF2 key from a password with a chosen hash, salt and iteration count. Output in hex and Base64, computed locally with the Web Crypto API.
OWASP's 2023 password-storage guidance suggests at least 600,000 iterations for PBKDF2-HMAC-SHA256.
What is the PBKDF2 Hash Generator?
PBKDF2 stretches a password into a fixed-length key by running HMAC over it thousands of times with a salt. The high iteration count is the point: it makes each guess expensive for an attacker without inconveniencing a legitimate login.
- PBKDF2-HMAC with SHA-1, SHA-256, SHA-384 and SHA-512
- Salt entered as text or hex, or generated at random
- Configurable iteration count with OWASP guidance shown inline
- 128, 160, 256 and 512-bit output lengths
- Hex and Base64 output plus the exact salt used
- Runs in the browser with Web Crypto — nothing is uploaded
How to use the PBKDF2 Hash Generator
- 1
Type the password or passphrase you want to stretch.
- 2
Enter a salt, or click Random to generate 16 fresh bytes in hex.
- 3
Pick the PRF hash and set the iteration count.
- 4
Choose the derived key length in bits.
- 5
Click Derive key and copy the hex or Base64 output.
About the PBKDF2 Hash Generator
The ByteTools PBKDF2 Hash Generator derives a key from a password using PBKDF2-HMAC with SHA-1, SHA-256, SHA-384 or SHA-512. Set the salt, the iteration count and the output length, and the tool returns the derived key in both hexadecimal and Base64 along with the exact parameters used.
It is the tool you want when checking that a server-side implementation agrees with a reference, when producing a test vector, or when generating an encryption key from a passphrase. The derivation runs through your browser's Web Crypto engine, so it matches what Node.js, Python and Java produce for the same inputs.
The password, the salt and the derived key stay on your device. Nothing is uploaded, and the tool keeps no history. Remember that the salt, iteration count and hash name are not secrets — you must store them alongside the derived key or you can never reproduce it.
Frequently asked questions
How many PBKDF2 iterations should I use?
OWASP's 2023 guidance is at least 600,000 iterations for PBKDF2-HMAC-SHA256 and 210,000 for SHA-512. Raise the number until a single derivation takes a few hundred milliseconds on your slowest production server, then leave it there.
Can I verify this tool against a known test vector?
Yes. RFC 6070 specifies that PBKDF2-HMAC-SHA1 with the password 'password', the salt 'salt', 4096 iterations and a 160-bit output must produce 4b007901b765489abead49d926f721d065a429c1. Enter exactly those values and you will see that string.
Is PBKDF2 still a good choice for password storage?
It is acceptable and widely certified, but Argon2id and bcrypt are better because they also demand memory, which blunts GPU attacks. Choose PBKDF2 when a standard or platform requires it, and set the iteration count high.
Does the salt need to be secret?
No. A salt only needs to be unique per password so that two identical passwords produce different hashes and precomputed rainbow tables become useless. Store it in plain sight next to the derived key — that is normal and expected.
Why does a high iteration count freeze the page briefly?
Because the work is real. Half a million HMAC rounds take a noticeable amount of CPU time, which is exactly the cost an attacker also pays for every guess. If the tab stalls for a moment on 1,000,000 iterations, the algorithm is doing its job.
Related tools
Password Generator
Generate strong random passwords with cryptographically secure randomness. Choose length and character sets, see entropy strength, copy instantly.
HMAC Generator
Generate an HMAC of any message with a secret key using HMAC-SHA1, SHA-256 or SHA-512 via the Web Crypto API. Output in hex or Base64, computed entirely offline.
SHA-256 Hash Generator
Generate SHA-256 hashes of text or files with the browser's Web Crypto API. 64-character hex digest, uppercase option, instant copy. Free and private.
Htpasswd Generator
Create .htpasswd lines for Apache and Nginx basic auth using APR1-MD5 or {SHA}, with a random salt and a downloadable file. Hashed in your browser.
Password Entropy Calculator
Measure a password's entropy in bits from its character pool and length, then see estimated crack times for five different attackers. Runs locally.