Generate and verify bcrypt password hashes. Configure work factor and algorithm. All hashing happens locally in your browser — your passwords are never sent to any server.
A random 128-bit (16 byte) salt is generated using a CSPRNG. Salts prevent rainbow table attacks - identical passwords produce different hashes.
The Eksblowfish algorithm runs 2^n iterations (where n is your cost factor). Doubling cost doubles compute time - making brute-force attacks proportionally harder.
The output encodes everything: $2b$12$[22-char salt][31-char hash]. The "$2b$12$" prefix tells bcrypt to use cost=12. No separate salt column needed.
$2b$12$eImiTAiTAi25sDB8iBjEJfF2PbO0oagzXCgKCQfHIFnOSuJl.J2
$2b$Algorithm version (2a, 2b, 2y)
12$Cost factor (2^12 = 4,096 rounds)
22 charsBase64-encoded salt (128 bits)
31 charsBase64-encoded hash (184 bits)
| Cost | Iterations | Approx Time | Recommendation |
|---|---|---|---|
| 10 | 1,024 | ~50-100ms | Minimum for new applications |
| 11 | 2,048 | ~100-200ms | Good for high-traffic APIs |
| 12 | 4,096 | ~200-400ms | Recommended default (2025) |
| 13 | 8,192 | ~400-800ms | High-security applications |
| 14 | 16,384 | ~800ms-1.6s | Maximum practical cost |
Times approximate on a modern server CPU. Always benchmark on your target hardware.
Also see the Hash Generator for MD5, SHA-1, SHA-256, SHA-512 and other cryptographic hash functions.
Bcrypt is a password hashing function designed by Niels Provos and David Mazières for OpenBSD in 1999. Unlike MD5 or SHA, bcrypt is intentionally slow and CPU-intensive, making brute-force attacks impractical. It incorporates a salt automatically, preventing rainbow table attacks. Use bcrypt (or Argon2) for all password storage — never store plain text or fast-hash (MD5/SHA) passwords.
The cost factor (work factor) controls how slow bcrypt is. Each increment doubles the computation time. For user authentication, aim for 100-300ms hash time on your server hardware. Start at 12 and benchmark — use the highest value that keeps login time under 500ms. Higher is more secure but slower. Cost 10 is the minimum recommended for new applications in 2025.
Both are modern password hashing algorithms. Bcrypt is battle-tested (25+ years) and widely supported. Argon2 won the Password Hashing Competition (2015) and is more resistant to GPU attacks by using memory-hardness. Argon2id (the recommended variant) combines Argon2i and Argon2d for resistance to both side-channel and GPU attacks. For new applications, Argon2id is the preferred choice.
This tool generates standard bcrypt hashes compatible with any bcrypt library. The hashing runs entirely in your browser using the bcryptjs library — no passwords are sent to servers. However, always generate password hashes server-side in production applications. Client-side demos are for learning and testing purposes only.
All hashing happens locally in your browser. Passwords are never transmitted or stored.