bcrypt

bcrypt

Generate and verify bcrypt password hashes entirely in your browser — passwords never touch the network.

What is bcrypt?

bcrypt is a password-hashing function built on the Blowfish cipher, designed by Niels Provos and David Mazières in 1999. Unlike fast hashes (SHA-256, MD5), bcrypt is slow by design: hashing a password takes a deliberate, tunable amount of CPU time. That slowness is the whole point — an attacker who steals your database must pay that cost for *every guess of every password*, making brute-force and rainbow-table attacks impractical.

The cost factor

The number after the prefix (e.g. the 10 in $2b$10$…) is the log2 cost: the work factor is 2^cost iterations. Every +1 doubles the time. Cost 10 is a sane default today; go higher as hardware gets faster. This tool caps at 18 — cost 19+ crawls even on fast hardware.

$2a$ vs $2b$ vs $2y$

  • $2a$ — the original OpenBSD prefix.
  • $2b$ — fixed version after a wraparound bug was found in crypt_blowfish's $2a$ implementation. Current standard; this tool generates $2b$.
  • $2y$ — PHP's spelling of $2b$; semantically identical, verified the same way.
  • $2x$ — marks hashes produced by the *buggy* crypt_blowfish. They can't be verified reliably, so this tool refuses them.

The 72-byte limit

bcrypt only uses the first 72 bytes of a password — anything beyond is silently ignored. Bytes, not characters: a 30-character emoji password can exceed the limit. This tool counts bytes live, warns you, and truncates exactly like real bcrypt does.

bcrypt vs Argon2

Argon2 (winner of the 2015 Password Hashing Competition) adds memory-hardness on top of time cost and is the modern recommendation for new systems; bcrypt remains everywhere in existing stacks and is still considered secure with an adequate cost factor.

Privacy

Everything runs locally via WebAssembly in a background worker — paste a hash, disconnect from the internet, and verification still works.

Read the full bcrypt guide.