PBKDF2 Key Derivation

Derive a key from a password and salt with PBKDF2 (HMAC-SHA-1, 256, 384 or 512), with the iteration count and key length you choose.

Processed on your device. Files are not uploaded

How to derive a key with PBKDF2

  1. Paste your password

    Paste or type it into the box, or press Try an example.

  2. Set the salt, iterations and length

    More iterations make guessing slower.

  3. Copy or download

    Copy the derived key.

Worked example

This is what PBKDF2 Key Derivation gives for its own sample values. Open the tool above and change anything to try your own.

Password

correct horse battery staple
Salt
random-salt
Iterations
600000
Key length (bytes)
32
Hash
SHA-256

Result

Derived key (hex)
bb6ac607a040a058a2cd53e80791030221c741bebbaa87920bd2e0ab94c827e5
Derived key (Base64)
u2rGB6BAoFiizVPoB5EDAiHHQb67qoeSC9Lgq5TIJ+U=

About PBKDF2 Key Derivation

PBKDF2 turns a password into a key by running a hash many times. It is used to make encryption keys from passwords and to store password hashes. You choose the salt, the number of iterations, the key length and the hash.

FAQs

How many iterations should I use?

At least 600,000 for PBKDF2 with HMAC-SHA-256, and a random salt of 16 bytes or more for each password.

Is it better than bcrypt?

bcrypt, scrypt and Argon2 resist graphics cards better, but PBKDF2 is widely supported and approved.

Why does it take a moment?

The slowness is deliberate.

Related tools