Skip to content

PBKDF2 Key Derivation Generator

Compute a PBKDF2 derived key from a password, salt, iteration count and hash, and check it against test vectors.

Processed locally in your browser

Options
0 chars · 0 lines
The result will appear here.

What is PBKDF2 Key Derivation Generator?

PBKDF2 (RFC 8018) stretches a password into a cryptographic key by applying HMAC many times. The salt makes every derivation unique, and the iteration count makes each guess expensive for an attacker. It is used to protect stored passwords, to derive encryption keys (including the AES tool on this site) and in Wi-Fi WPA2 passphrases.

Enter the password, a salt (UTF-8 text or hex), the number of iterations, the HMAC hash (SHA-1, SHA-256, SHA-384 or SHA-512) and the key length in bytes. The tool runs the Web Crypto implementation and returns the key in hex or Base64. For example, password "password", salt "salt", 4096 iterations with SHA-256 gives c5e478d59288c841…

How does it work?

  1. Type a test password, then set the salt and its encoding.
  2. Choose the hash, the iteration count and the key length in bytes.
  3. Click Derive key and copy the hex or Base64 result.

Common use cases

  • Checking your own PBKDF2 code against known test vectors.
  • Reproducing a stored password hash format for a migration or debugging session.
  • Learning how iterations and salts change the derived key.
  • Deriving a key for a test fixture in a cryptography exercise.

Examples

Try this input in the tool above:

Input
password
Output
c5e478d59288c841aa530db6845c4c8d962893a001ce4e11a4963873aa98134a

Privacy

PBKDF2 Key Derivation Generator runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.

Limitations

Do not enter real passwords: use test values. Current guidance (OWASP) is 600,000 iterations for PBKDF2-HMAC-SHA-256 and a unique random salt of 16 bytes or more per password. Modern password storage should prefer memory-hard functions such as Argon2id or scrypt where available.

Frequently asked questions

How many iterations should I use?

OWASP currently suggests 600,000 for HMAC-SHA-256, 210,000 for HMAC-SHA-512 and 1,300,000 for HMAC-SHA-1. Use the highest count your system can afford.

Why does the same password give a different key with another salt?

The salt is mixed into every block. It ensures identical passwords do not share hashes and defeats precomputed tables.

What key length should I request?

Request what your algorithm needs: 32 bytes for an AES-256 key. Asking for more than the hash output length costs an attacker nothing extra but multiplies your own work.

More tools in Developer Tools →