Shiklo Tools
PDF40
Image20
Calculators & Converters25
Text & Writing13
Developer26
Video14
Audio14
Document14
Data & Spreadsheet12
Web & SEO9
OCR & Scanning5
Archive & File12
Security & Privacy23
Health & Medical29
QR & Barcode5

PBKDF2 Generator

Derive a key from a password with PBKDF2 (HMAC-SHA-256, SHA-512 and more) — salt, iterations and length adjustable, hex or Base64 output.

PBKDF2 (Password-Based Key Derivation Function 2, RFC 8018) turns a password into a key by running a hash function many thousands of times with a salt. It is how many systems store passwords, how Wi-Fi WPA2 derives its keys, and how password managers and encrypted archives turn your master password into an encryption key. Developers often need to reproduce a PBKDF2 result — to check an implementation, debug a login, generate test vectors or derive a key for a script.

Enter a password, a salt (as text, hex or Base64, or generate a random one), the hash function, the number of iterations and the key length, and the derived key appears instantly as hex or Base64. The tool warns when the iteration count is below OWASP's current minimum. It uses the browser's Web Crypto API, so the password never leaves your device.

How to use PBKDF2 Generator

  1. Type the password.
  2. Enter the salt and say whether it is text, hex or Base64 — or press Random salt.
  3. Choose the hash, iterations and key length.
  4. Copy the derived key as hex or Base64.

Features

  • PBKDF2 with HMAC-SHA-256, SHA-384, SHA-512 or SHA-1.
  • Salt as text, hex or Base64, or a random 16-byte salt.
  • Iterations up to 10,000,000.
  • Key length up to 256 bytes.
  • Hex or Base64 output, updated as you type.
  • Warnings for short salts and low iteration counts.
  • Web Crypto API in your browser; nothing is sent.

Recommended iterations

More iterations make each password guess slower for an attacker. OWASP's Password Storage Cheat Sheet gives these minimums for PBKDF2 when storing passwords; the tool fills them in when you change the hash.

HashOWASP minimum iterations
HMAC-SHA-256600,000
HMAC-SHA-512210,000
HMAC-SHA-11,300,000

Salt, length and output

The salt must be unique for every password and stored next to the result; 16 random bytes is the usual size, and a salt shorter than that triggers a warning. The key length is the number of bytes you need — 32 bytes for an AES-256 key or a SHA-256-sized hash. Asking for more bytes than the hash produces makes PBKDF2 run its whole cost again for each extra block, which slows you down more than an attacker, so match the length to the hash when storing passwords.

Checking an implementation

To check code against known values, use published test vectors. For example, PBKDF2-HMAC-SHA-256 of the password password with the text salt salt, 1 iteration and 32 bytes gives 120fb6cffcf8b32c43e7225256c4f837a86548c92ccc35480805987cb70be17b. Make sure the salt form matches what your code uses — the text salt and the hex representation of the same bytes are different inputs.

PBKDF2 or something newer?

PBKDF2 is widely supported and approved by NIST, but it needs little memory, so graphics cards can test many guesses in parallel. For new password storage, Argon2id is the stronger choice, and bcrypt is also better than PBKDF2 at the same cost. PBKDF2 remains the right choice where FIPS compliance or broad compatibility is required, such as in the Web Crypto API itself.

Private

The derivation runs in your browser with the built-in Web Crypto API. The password and salt are never stored or sent. For password hashing with modern algorithms, see the Argon2 Hash Generator and the Bcrypt Generator; to encrypt data with a PBKDF2-derived key, use AES Encryption.

Frequently asked questions

Can I copy the result as Base64?

Yes. Choose Base64 as the output format.

Can I use a text salt instead of hex?

Yes. Choose Text as the salt form; it is converted to bytes as UTF-8.

What key length should I choose?

32 bytes for AES-256 keys and SHA-256-based password storage.

How do I calculate PBKDF2?

Enter the password, salt, hash, iterations and length; the derived key appears immediately.

How many iterations should I use?

For password storage, OWASP recommends at least 600,000 with SHA-256 or 210,000 with SHA-512.

How long should the salt be?

At least 16 random bytes, unique for every password.

Why doesn't my result match?

Check that the salt form (text, hex or Base64), hash, iterations and length are exactly the same.

Is PBKDF2 still secure?

Yes with enough iterations, but Argon2id is preferred for new systems.

Is my password sent anywhere?

No. It is processed in your browser.

Can I use SHA-1?

Yes, for compatibility; HMAC-SHA-1 is still acceptable in PBKDF2, but prefer SHA-256.

Related tools