Password Salt Generator
Generate cryptographically secure random salts for password hashing. Choose length, output format, and quantity — pure client-side using window.crypto.getRandomValues.
Salt Options
Entropy: 256 bits
Generated Salts
Click "Generate New Salt" to start
How to use this salt
Copy the hex value and pass it to your hashing function. Example with bcrypt (Node.js):
const salt = await bcrypt.genSalt(12); // Or with a manual salt prefix (legacy): const hash = await bcrypt.hash(password, salt);
Note: bcrypt generates its own salt internally. Use these salts for PBKDF2, Argon2, or custom HMAC constructions.
Copied!
Summary
Generate cryptographically secure random salts for password hashing. Choose length, output format, and quantity — pure client-side using window.crypto.getRandomValues.
How it works
- Pick a salt length in bytes (8, 16, 32, or 64) and how many salts to generate.
- Choose an output format: hex, base64, base64url, or a decimal byte array.
- window.crypto.getRandomValues fills a Uint8Array with random bytes from the OS entropy pool.
- Bytes are encoded to your format and entropy (bytes × 8 bits) is shown. Copy and store the salt with the hash.
Use cases
- Generating salts for bcrypt, Argon2, or PBKDF2 before storing a new user password.
- Creating unique per-row salts for a legacy MD5/SHA-1 password column migration.
- Producing random nonce values for HMAC-based token generation.
- Supplying test vectors of known entropy for security unit tests.
- Teaching developers why salts prevent rainbow table attacks.
Frequently Asked Questions
Last updated: 2026-07-01 ·
Reviewed by Nham Vu