Generate cryptographically strong bcrypt hashes from any password. Choose cost factor (salt rounds), verify existing hashes, and learn why bcrypt remains the industry standard for password storage. No logs, all in your browser.
Bcrypt is an adaptive cryptographic hash function designed for password hashing by Niels Provos and David Mazières in 1999. It is based on the Blowfish cipher and incorporates a salt to protect against rainbow table attacks, and a cost factor (work factor) to deliberately slow down the hash computation, making brute‑force attacks exponentially harder.
Bcrypt structure: $2b$[cost]$[22‑character salt][31‑character hash]
Example: $2a$10$N9qo8uLOickgx2ZMRZoMy.Mr/.PpE1xLZw5oV1Vm4pKtYdQ1N1S/q
Before bcrypt, many systems stored passwords as plain MD5 or SHA‑1, often without salt. This made them extremely vulnerable to precomputed rainbow tables. Bcrypt introduced three revolutionary ideas: (1) built‑in salt, (2) adaptive cost (can be increased as hardware gets faster), and (3) resistance to GPU/FPGA cracking due to its memory‑hard and sequential nature. In 2023, NIST SP 800‑63B still recommends bcrypt (with cost ≥10) as one of the approved password storage schemes.
| Rounds | Iterations (2^rounds) | Time (est.) | Security Level | Use Case |
|---|---|---|---|---|
| 4 | 16 | <1ms | ❌ Critical | Never use |
| 6 | 64 | 2ms | ❌ Insecure | Testing only |
| 8 | 256 | 8ms | ⚠️ Weak | Legacy systems |
| 10 | 1,024 | 40ms | ⚠️ Minimal | High-traffic APIs |
| 12 | 4,096 | 250ms | ✅ Recommended | General use |
| 14 | 16,384 | 1.0s | ✅ Strong | Admin, sensitive |
| 16 | 65,536 | 4.2s | ? Very Strong | High-security |
| 18+ | 262k+ | 17s+ | ⚠️ Overkill | Impractical |
Bcrypt derives from the Blowfish cipher key schedule. The password is used to encrypt the string "OrpheanBeholderScryDoubt" (24 bytes) 64 times. The salt modifies the E‑boxes of Blowfish. The cost parameter c determines the number of key expansion iterations: 2c rounds. This exponential slowdown ensures that increasing cost by 1 doubles the computation time. The final hash is the Base64 encoding of the 24‑byte ciphertext plus the salt and cost header.
From a developer perspective, you don't need to implement the algorithm yourself – robust libraries exist in all languages. Our tool uses the well‑audited bcrypt.js library, which faithfully implements the same algorithm as OpenBSD's original.
Estimated hash times on a modern server (single core).
| Cost (2n rounds) | Approximate time | Use case / recommendation |
|---|---|---|
| 4 – 6 | < 0.01 s | Not recommended – too fast for modern hardware (legacy systems) |
| 8 – 9 | ~0.02 – 0.05 s | Minimal acceptable for low‑security internal tools |
| 10 – 12 | ~0.1 – 0.4 s | Recommended for most web applications (good balance) |
| 13 – 14 | ~0.8 – 1.6 s | High‑security financial or master passwords |
| 15 – 16 | ~3 – 12 s | Overkill for interactive login; may be used for password derivation |
A startup originally stored user passwords as salted SHA‑256. After a security audit, they decided to migrate to bcrypt. Using our tool, the team generated bcrypt hashes for a set of test passwords (cost 12) to estimate the performance impact on login. They found that hash computation added ~200 ms per login, which was acceptable. They also used the verify functionality to ensure that existing passwords could be rehashed on‑the‑fly during user login, implementing a seamless upgrade. The tool helped them choose cost 12 as the sweet spot between security and user experience.
Early implementations had minor bugs. Modern libraries produce $2b$ (OpenBSD) or $2y$ (crypt_blowfish). Our tool generates $2a$ (compatible) which is accepted by virtually all systems. The differences are negligible for interoperability.
For new hashes, use $2b$. All versions can be verified correctly.