UTILS.
100% in-browser
🔐

Bcrypt Hash Generator & Verifier

Generate a bcrypt password hash with a selectable cost factor, or verify a plaintext password against an existing $2b$ hash. Runs fully in your browser.

Passwords are hashed 100% in your browser — nothing is uploaded.

— output appears here —

About this tool

The Bcrypt Hash Generator & Verifier produces and checks bcrypt password hashes without ever sending your password to a server. Bcrypt, designed by Provos and Mazières in 1999, wraps the Eksblowfish key schedule in an adaptive work factor: the cost parameter sets 2^cost key-setup rounds, so raising the cost makes every guess exponentially slower for an attacker while staying cheap for a single legitimate login. Generate mode reads 16 random salt bytes from the browser's crypto.getRandomValues, runs the Eksblowfish setup at your chosen cost, encrypts the 192-bit "OrpheanBeholderScryDoubt" constant 64 times, and emits the standard Modular Crypt Format string $2b$NN$ + 22-char base64 salt + 31-char base64 digest.

The algorithm runs as an eval-free WebAssembly build of bcrypt loaded locally, so nothing is uploaded and the tool works offline once loaded. Bcrypt only considers the first 72 bytes of the password — the tool warns you when your input exceeds that limit so you are never surprised by silent truncation. The cost factor is selectable from 4 to 16 (default 10); each step doubles the work, so 12 is four times slower than 10.

Verify mode parses the $2b$/$2a$/$2y$ prefix, the two-digit cost, and the embedded salt out of an existing hash, recomputes the digest with the candidate password, and reports match or no-match. Because the salt and cost travel inside the hash string itself, you only need the password and the stored hash to check a login. Everything is computed in-page — passwords are hashed 100% in your browser and nothing is uploaded.

Frequently asked questions

What cost factor should I choose?
Cost sets 2^cost key-setup rounds. 10 (the default) is a common baseline; 12 is four times slower and a good modern choice for interactive logins. Higher costs resist brute force better but take longer to compute, so balance security against the delay each login can tolerate.
Why is my long password truncated?
Bcrypt only hashes the first 72 bytes of the input by design — bytes beyond that are ignored. The tool warns you when a password exceeds 72 UTF-8 bytes so you know the tail is not contributing to the hash. For longer secrets, pre-hash with SHA-256 before bcrypt.
Can I verify a hash that starts with $2a$ or $2y$?
Yes. Verify mode accepts the $2a$, $2b$, and $2y$ prefixes, which are interchangeable variants of the same algorithm. It reads the cost and salt from the hash, recomputes with your password, and reports whether they match.
Is my password sent anywhere?
No. Hashing and verification run entirely in your browser via a local WebAssembly build of bcrypt. The password, salt, and hash never leave your device, so you can safely test real credentials offline.

More tools