PBKDF2 Key Derivation

Derive a key from a password with PBKDF2 using your chosen salt, iteration count, output length and hash, and read the result in hex and Base64.

Use the tool

Why this tool exists

PBKDF2 turns a password into a key by running an HMAC many thousands of times, which makes guessing slower. It appears in WPA2 Wi-Fi, disk and archive encryption, password managers and many framework password hashers, and its test vectors are published in RFCs.

When you are writing or debugging code that uses it, comparing against a trusted output saves hours: a different iteration count, salt encoding or hash function gives a completely different key. This tool uses the browser WebCrypto implementation, so results match standard libraries. For new password storage, prefer Argon2 or scrypt; PBKDF2 is acceptable only with a high iteration count and a unique salt per user.

How to use it

  1. Enter the password, then the salt as text.
  2. Set the iteration count, the output length in bytes and the hash function.
  3. Copy the derived key as hex or Base64.

Frequently asked questions

How many iterations should I use?

More is better until it slows your server too much. Current guidance for PBKDF2-HMAC-SHA256 is several hundred thousand iterations. Follow the latest OWASP recommendation for your hash.

Is the salt treated as text or bytes?

As text, encoded as UTF-8. If your library uses a binary salt, the result will differ unless you encode the same bytes in both places.

Is it safe to use real passwords?

The calculation runs in your browser and nothing is uploaded, but do not enter live production passwords into pages you do not trust. Use test values for debugging.

What are the limits?

Output length is limited to between 1 and 1024 bytes, and iterations must be at least 1. A very high count will make the page pause while it works.