Bcrypt Generator & Verifier
Hash passwords with bcrypt. Configurable cost rounds, prefix choice, and built-in verifier. Runs 100% in your browser.
Runs entirely in your browser — no upload, no loggingOWASP recommends cost ≥ 10. Each step doubles compute time. Cost 14 = ~1 second/hash.
$2y$ for Apache htpasswd. $2b$ for most modern libraries. $2a$ for legacy compatibility.
Written by Ishan Karunaratne · Last reviewed:
What Is Bcrypt?
Bcrypt is an adaptive password-hashing function published by Niels Provos and David Mazières in 1999. It is based on the Blowfish cipher's expensive key setup, deliberately tuned to be slow. The cost parameter controls how slow — every increment doubles the work factor, so an attacker who could brute-force a cost-10 hash in 1 hour needs ~1024 hours for the same password at cost 20.
Bcrypt is automatically salted (16-byte random salt embedded in the output), survives 25+ years of cryptanalysis without weakening, and is implemented in every major language. OWASP recommends bcrypt cost ≥ 10 for new password storage in 2026.
Hash Format Explained
$2y$10$N9qo8uLOickgx2ZMRZoMye IjZAgcfl7p92ldGxad68LJZdL17lhWy └┬┘ └┬┘ └────────┬────────┘ └──────────────┬───────────────┘ │ │ │ │ │ │ │ └─ 31 chars: bcrypt checksum │ │ └─ 22 chars: base64 salt (16 raw bytes) │ └─ Cost: 10 → 2^10 iterations └─ Prefix: bcrypt variant identifier
The total length is always 60 characters. The prefix + cost + salt is enough to verify any password against the hash, so you only need to store the single 60-char string in your database.
Cost Tuning
| Cost | Iterations | ~Time (modern CPU) | Use case |
|---|---|---|---|
| 4 | 16 | <1ms | Testing only — insecure |
| 10 | 1,024 | ~100ms | OWASP minimum (2024) |
| 12 | 4,096 | ~400ms | Modern default |
| 14 | 16,384 | ~1.5s | High-value accounts |
| 15 | 32,768 | ~3s | Acceptable upper bound |