Bcrypt Hash Generator & Verifier

Hash a password with a chosen cost factor, or verify one against an existing hash, without the password leaving your browser.
Client-side · verifiable
How this tool works

Bcrypt is the password hash that refused to get faster. Designed in 1999 around the Blowfish cipher, it has a cost factor: each increase doubles the work, so as hardware improves you simply raise the number. Cost 12 takes a few hundred milliseconds today, which is nothing for one login and ruinous for an attacker trying billions.

A bcrypt string has four parts, all visible in the output:

  • $2b$ the algorithm version
  • 12$ the cost, meaning 2¹² key-expansion rounds
  • 22 characters of base64-encoded 128-bit salt, generated fresh from crypto.getRandomValues() each time
  • 31 characters of hash

Because the salt is embedded, verification needs only the password and the stored string: the tool reads the salt and cost out of the hash and recomputes. This page runs bcrypt in WebAssembly in your tab, so both operations take as long here as they would on a server.

Security note

What leaves your browser

Hashing and verification run in a WebAssembly sandbox inside your browser. No password or hash is transmitted or stored. The page is useful for testing, migrating or debugging, not as a place to keep hashes.

FAQ
What cost factor should I use?

The highest your login latency budget allows, typically 12 in 2026 (about 250 ms). Raise it as servers get faster. Anything below 10 is too weak for new systems.

Why is the hash different every time?

A new random salt is generated per hash. Verification still works because the salt is stored inside the hash string.

What are $2a$, $2b$ and $2y$?

Versions that fixed implementation bugs over the years. All current libraries produce $2b$ and verify all three. PHP historically wrote $2y$.

Bcrypt or Argon2?

Argon2id is the current OWASP first choice because it is also memory-hard. Bcrypt remains perfectly acceptable and has the wider library support. Either beats any SHA-based scheme.

Why is input limited to 72 bytes?

Bcrypt uses only the first 72 bytes of the password. Longer inputs are silently truncated, which matters for long passphrases; some systems pre-hash to avoid it.