PBKDF2 Password Hash
Hash or verify with configurable iterations — NIST-approved and runs locally via the Web Crypto API. Nothing leaves your device.
What is PBKDF2 Key Derivation?
Derive strong encryption keys or verify passwords by repeatedly hashing — this key-stretching technique is called "PBKDF2". Runs locally via Web Crypto API.
PBKDF2 (Password-Based Key Derivation Function 2) is a standardized key derivation function defined in RFC 8018 — the NIST-approved, widely supported way to turn a password into a cryptographic key or a stored password hash. It applies a pseudorandom function (like HMAC) to a password along with a salt, repeating the process many times to produce a derived key; thousands of iterations stretch weak human passwords into strong keys and slow offline brute-force attacks. Use this tool to derive keys with configurable iteration counts, or to verify an existing PBKDF2 hash. Derivation runs locally in your browser via the Web Crypto API, so your password never leaves your device.
Zero-Server Tool Data Guarantee
All hashing and verification happens locally in your browser using the Web Crypto API. Your password and salt are never sent to any server.
How to Use
Hash or Verify
Use Hash to generate a PBKDF2 key, or Verify to inspect and test an existing encoded PBKDF2 hash string.
Apply the OWASP Preset
The default preset uses 600,000 iterations (OWASP's 2026 recommendation). Choose Custom to set the iteration count, PRF hash, and key length manually.
Generate or enter a salt
Use the Generate button for a cryptographically random 16-byte salt, or paste your own. The salt is required and must be stored with the hash.
Extract the Key
The derived key is calculated in your browser. Copy it as an Encoded string (recommended — includes parameters and salt), or as hex/base64 for use in your security implementations.
Inspect Parsed Params
In Verify mode, paste an encoded PBKDF2 hash to see its parsed hash, iterations, len, and salt before checking for a match.
Common Use Cases
Password Storage
Derive a storage-safe hash from a user password with a per-user salt and high iteration count.
Encryption Key Derivation
Turn a passphrase into an AES-256 key for encrypting files, backups, or database fields.
Legacy WPA2 Authentication
WPA2 derives its session key from the passphrase with PBKDF2 (4096 iterations) — an example of PBKDF2 in the wild, but one that shows why low iteration counts age badly. WPA3/SAE uses a different key-exchange KDF.
Multi-Factor Key Derivation
Derive application-specific keys from a master password combined with a device-specific salt.
Implementation Examples
async function pbkdf2(password, salt, iterations = 600000) {const enc = new TextEncoder();const keyMaterial = await crypto.subtle.importKey('raw', enc.encode(password),{ name: 'PBKDF2' }, false, ['deriveBits']);const bits = await crypto.subtle.deriveBits({ name: 'PBKDF2', hash: 'SHA-256', salt: enc.encode(salt), iterations },keyMaterial, 256);return Array.from(new Uint8Array(bits)).map(b => b.toString(16).padStart(2, '0')).join('');}
PBKDF2 vs Bcrypt vs Scrypt
| Feature | PBKDF2 | Bcrypt | Scrypt |
|---|---|---|---|
| Memory hardness | None | Low (4KB) | High (configurable) |
| GPU/ASIC resistance | Low | Moderate | High |
| NIST approved? | Yes | No (but widely used) | No (RFC 7914) |
| Hardware acceleration | Yes (Web Crypto) | No (software only) | No (software only) |
| Configurable hash | Yes (any HMAC hash) | No (Blowfish only) | No (Salsa20/8) |
| Best for | FIPS/compliance needs | Web apps | High-security / crypto |
Production Best Practices & Security
Frequently Asked Questions
For most new projects in 2026, use Argon2id. It is memory-hard (64 MB per hash), making GPU and ASIC cracking far more expensive than Bcrypt or PBKDF2.
Bcrypt is a strong, widely compatible alternative supported by virtually every language and framework. Use it if Argon2 is not available in your stack.
PBKDF2 is the only option if you need FIPS 140-2 compliance or Web Crypto API support (hardware-accelerated in browsers). Its weakness is lack of memory-hardness — an attacker can parallelize millions of derivations on a single GPU.
Use 600,000+ iterations for PBKDF2-SHA256, cost 12-14 for Bcrypt, or m=65536/t=3/p=4 for Argon2id.