Skip to content

PBKDF2 Key Derivation Tool

Derive AES-128, AES-192, or AES-256 encryption keys from a password using PBKDF2.

Key derivation runs in your browser using the Web Crypto API. The derivation tool keeps your passphrase and key in the browser.

Key derivation settings

Enter an existing salt or generate 16 random bytes in Hex.

Derived key

What is PBKDF2 key derivation?

PBKDF2 applies HMAC repeatedly to derive key bytes from a passphrase and salt. AES-128 uses 16 bytes, AES-192 uses 24 bytes, and AES-256 uses 32 bytes. Hex and Base64 encode the same derived bytes for copying.

How to derive an AES key from a password

  1. Enter a passphrase and choose the HMAC algorithm and iteration count.
  2. Use the generated salt for a new key, or enter the original salt and its encoding to reproduce a key.
  3. Choose the AES key size, derive the key, and copy either Hex or Base64.
  4. In the AES tool, set the matching key size and key encoding, then paste the key into the secret key field.

PBKDF2 with SHA-256 or SHA-512

SHA-256 and SHA-512 select the hash used by HMAC. Either can derive any of the three AES key sizes. For interoperability, match the algorithm and iteration count used by the other application.

Reproduce a derived key

Keep the salt bytes, HMAC algorithm, iteration count, and key size with your encryption metadata. This tool encodes passwords as UTF-8 and preserves spaces and Unicode spelling as entered. Check the password bytes and salt encoding if another implementation gives a different result.

Protect your key

Use a strong passphrase and a fresh random salt for each new derivation. Treat the derived key like a secret and keep it out of logs, messages, and shared documents. Use the timing result to evaluate iteration settings on your target devices.

The DevGlan AES tool processes encryption requests on the server. Use the key in your own local application if it needs to stay on your device.

Frequently asked questions

Does the salt need to be secret?

You can store the salt alongside the ciphertext. Keep the passphrase and derived key private.

Can I reverse PBKDF2 to recover the passphrase?

PBKDF2 is one-way. Someone with the key and settings can still test passphrase guesses, so use a strong passphrase.

How many iterations should I use?

The tool starts at 600,000 for SHA-256 and 220,000 for SHA-512. For new keys, choose a cost your target devices can tolerate. To reproduce a key, use its exact original count.

Where can I generate or verify password hashes?

Use the PBKDF2 Hash Generator for password storage and verification.

❤️ Liked this tool?

If it saved you time, consider buying me a coffee to support future improvements.

Help Others Find This