Bcrypt Generator and Verifier

Hash a password with bcrypt and an adjustable cost factor, or check a password against a hash you already have. Computed locally with bcryptjs — nothing you type here is sent to a server.

Cost factor 12 or higher can take a few seconds to compute in a browser tab — this is bcrypt working as intended (it's deliberately slow to resist brute-force attempts), not the page freezing. Wait for the button to re-enable.

Why bcrypt looks the way it does

A bcrypt hash packs a version tag, cost factor, salt and hash into one string, for example $2a$10$N9qo8uLOickgx2ZMRZoMy.... The $2a$ (or $2b$/$2y$) identifies the bcrypt variant, 10 is the cost factor (210 rounds), and everything after the next $ is the 22-character salt followed by the 31-character hash. All of that lives in the stored string, which is why bcrypt doesn't need a separate salt column — bcrypt.compare() reads the salt back out of the hash itself.

Not sure a hash is actually bcrypt in the first place? Check it with the hash identifier first — and if you're about to run it through hashcat or John, don't assume a matching prefix means a matching mode.

FAQ

Why does a higher cost factor take so much longer?

Cost factor n means 2n rounds of the underlying Blowfish-based key schedule, so each increment doubles the work. Going from 10 to 12 is roughly 4x slower, by design.

Can I store the output directly in a database?

Yes, the full generated string (including the $2a$10$... prefix, salt and hash) is what you store. No separate salt column is needed.

Is this the same as the bcrypt used by my backend language?

bcryptjs is a pure-JavaScript implementation designed to produce hashes compatible with standard bcrypt implementations (including the common Node, Python and Ruby libraries), so hashes generated here should verify correctly elsewhere — test against your actual stack before relying on it in production.

© PacketUtils. Tools run in your browser. Review every command before using it in production.HomeAboutContactPrivacy PolicyGitHub