bcrypt hash generator and verifier
Hash a password with bcrypt at the cost you choose, or check a password against an existing bcrypt hash. Runs in your browser; the password is never sent.
Hashed in your browser. It is never sent or stored.
$2b$… appears here.Each step of cost doubles the work. OWASP’s minimum is 10; pick the highest your login can afford, around a quarter of a second on your server. This page runs bcrypt in JavaScript, so the highest costs take a second or two here. A new random salt is drawn every time, so the same password gives a different hash on each run.
Everything you type here stays in your browser. Nothing is sent to HardenKit or to anyone else.
How to use the bcrypt hash generator and verifier
- Choose whether to hash a password or check one against a hash.
- Enter the password. To hash, set the cost; to check, paste the bcrypt hash.
- Press the button. The highest costs take a second or two in the browser.
- Copy the hash, or read whether the password matches.
About this tool
bcrypt is a password hashing function designed in 1999 by Niels Provos and David Mazières, and still one of the standard ways to store passwords. It is slow on purpose and has a cost setting: each step up doubles the work, so the same function can be made harder as computers get faster. Every hash includes its own random salt, which is why hashing the same password twice gives two different strings.
A bcrypt hash is 60 characters that describe themselves. In $2b$12$ followed by 53 characters, 2b is the version, 12 is the cost, the next 22 characters are the salt and the last 31 are the hash. To check a password, a server reads the cost and salt from the stored string, hashes the attempt the same way and compares. This tool does both: it creates hashes, and it checks a password against a hash from any standard library.
Two limits are worth knowing. bcrypt reads only the first 72 bytes of a password, so anything longer is ignored; the tool warns you when that happens. And the cost must be chosen, not left at an old default: OWASP’s minimum is 10. For a new system, Argon2id is the first recommendation today, with bcrypt the established alternative. Use this page for testing and fixtures, and let your server hash real users’ passwords.
Sources
Questions
The OWASP Password Storage Cheat Sheet gives 10 as the minimum. The practical rule is to pick the highest cost that keeps a login acceptably fast on your server, often 12 to 14 on current hardware, and to raise it as hardware improves. The cost is stored in each hash, so old hashes keep working.
Because bcrypt generates a new random 16-byte salt for every hash and stores it inside the result. That stops attackers from using precomputed tables and from spotting users who share a password. Verification still works, since the salt is read back from the stored hash.
They are version markers for the same algorithm. $2a$ is the original, $2b$ was introduced by OpenBSD in 2014 after a bug with very long passwords, and $2y$ is the marker PHP and Apache use for the corrected behavior. For passwords of normal length all three give the same hash, and this tool verifies any of them.
Yes. The algorithm takes at most 72 bytes of key, so two passwords that share their first 72 bytes produce the same hash. Characters outside ASCII use more than one byte each. Systems that need longer inputs usually pre-hash with SHA-256 and encode the result, which needs care to do safely.
No. It is a one-way function. The only attack is to guess passwords and hash each guess with the same salt and cost, which bcrypt makes slow. A strong password stays safe even if the hash leaks; a common one does not.