Bcrypt Hash Generator & Verifier

Hash or verify a password with bcrypt at any cost factor, fully in-browser

Ad placeholder (leaderboard)

Bcrypt is the password-hashing function of choice for many applications because it is deliberately slow and includes a tunable cost factor. This tool runs a complete bcrypt implementation in your browser so you can generate standard $2b$ hashes or verify a password against an existing hash — useful for building test fixtures, confirming a backend produces compatible output, and showing stakeholders how cost factors affect timing. Nothing is ever sent to a server.

How it works

Bcrypt is built on the Blowfish cipher’s expensive key schedule:

  1. A random 16-byte salt is generated and base64-encoded (bcrypt’s own alphabet).
  2. The password and salt feed EksBlowfishSetup, which runs the key schedule 2^cost times — this is the slow, attack-resisting step.
  3. The constant string OrpheanBeholderScryDoubt is encrypted 64 times with the resulting key schedule to produce the 24-byte hash.
  4. The cost, salt, and hash are assembled into the familiar $2b$cost$saltsalthashhash... string.

Verification re-derives the hash using the salt and cost embedded in the stored string, then compares the result. Because the salt is random per hash, the same password yields different strings each time, yet still verifies correctly.

Tips and notes

  • Pick a cost where a single hash takes a meaningful fraction of a second on your target hardware; cost 10–12 is common in 2026.
  • Bcrypt silently truncates passwords longer than 72 bytes — long passphrases beyond that length add no security with bcrypt alone.
  • Use generated hashes as seed/test fixtures, never reuse a real production password here.
  • A higher cost is not free: it costs your servers CPU on every login, so balance security against login latency.
Ad placeholder (rectangle)