KDF Hash Generator Online | PBKDF2, Argon2 & Scrypt Key Derivation

Password & Security
100% client-side. Processed locally in your browser using the Web Crypto API. Nothing is sent to any server.

How It Works

This tool implements three modern Key Derivation Functions — PBKDF2, Argon2id, and Scrypt — using the @noble/hashes library, an audited pure-JavaScript cryptographic suite. Each algorithm serves different security and compatibility needs; Argon2id is recommended for new projects. All computation runs entirely in your browser, making it safe for learning and testing reference values.

KDF Algorithm Selection

Feature PBKDF2 Argon2id Scrypt
Standard RFC 2898 RFC 9106 RFC 7914
GPU resistance Low High Medium
Memory-hard No Yes Yes
Side-channel resistant Partial Yes (Argon2i mode) Partial
Best for Legacy compatibility New projects (recommended) When Argon2 unavailable

Code Examples

Derive keys programmatically using well-audited libraries:

// JavaScript (@noble/hashes)
import { pbkdf2 } from '@noble/hashes/pbkdf2';
import { sha256 } from '@noble/hashes/sha256';

const key = pbkdf2(sha256, 'password', 'salt', { c: 600000, dkLen: 32 });
console.log(Buffer.from(key).toString('hex'));
# Python (libsodium via PyNaCl)
import nacl.pwhash

hashed = nacl.pwhash.str(
    b'mypassword',
    opslimit=nacl.pwhash.argon2id.OPSLIMIT_INTERACTIVE,
    memlimit=nacl.pwhash.argon2id.MEMLIMIT_INTERACTIVE
)

Security Notes

  • Argon2id for new projects — winner of the Password Hashing Competition, resists both GPU and side-channel attacks.
  • Use OWASP 2024 parameters as baseline — click the preset button to auto-fill recommended iterations/memory/parallelism.
  • Salt must be unique per password — never reuse salts; 16 bytes (128 bits) minimum, generated via crypto.getRandomValues.
  • Production: run server-side — this tool is for learning and testing; use libsodium or Bouncy Castle in production.

Related Tools

Need to verify the strength of your derived key? The Password Strength Checker scores it on a 0-4 scale. For raw SHA hashing without key derivation, try the SHA Hash Generator. To generate the initial password, the Password Generator creates cryptographically secure random strings.

Frequently Asked Questions

What are the OWASP 2024 recommended parameters?

PBKDF2-HMAC-SHA256: ≥ 600,000 iterations. Argon2id: 64 MiB memory, 3 iterations, 4 parallel lanes. Scrypt: N=2^14 (16384), r=8, p=1. Click "Apply OWASP Recommended Parameters" to auto-fill these values.

What is PHC string format?

PHC (Password Hashing Competition) string format embeds the algorithm identifier, parameters, salt, and derived key in a single portable string — e.g., $argon2id$v=19$m=65536,t=3,p=4$<salt>$<hash>. This format is self-describing and compatible with modern password hashing libraries.

How is the salt generated?

Click the "Random" button next to the salt field to generate a cryptographically secure random salt using the Web Crypto API (crypto.getRandomValues). A minimum of 16 bytes (128 bits) is recommended. The salt must be unique per password and stored alongside the derived key.

Is this tool safe for production password hashing?

This tool is designed for learning, testing, and generating reference values. For production use, run KDF computations server-side with a well-audited library (e.g., libsodium, Bouncy Castle). Never transmit raw passwords over the network.

What output formats are supported?

Three formats: Hex (raw bytes as hex string), Base64 (standard Base64 encoding), and PHC string format (embeds algorithm, parameters, salt, and hash in one portable string). PHC format is recommended for password storage as it is self-describing.

Privacy: This tool runs entirely in your browser — nothing is uploaded or stored. · Disclaimer: For educational purposes only. Not professional security advice.

More in Password