Bcrypt Compare — Check a Password Against a Hash
- This tool runs entirely in your browser. Nothing you enter or upload is sent to a server.
0 of 72 bytes bcrypt reads
Use the same pepper the hash was made with, or a correct password will not match.
Everything runs in this tab. The password and the hash are never sent anywhere.
See also
About this tool
You cannot decrypt a bcrypt hash, so the only way to check one is to hash the password again with the same salt and cost and compare the results. Paste the stored hash and a password here and the tool does exactly that, then tells you whether they match and how long the check took.
The algorithm, cost and salt are read from the hash itself, so there is nothing else to enter. For $2a$10$/uaF… it detects bcrypt at cost 10; for $argon2id$v=19$m=19456,t=2,p=1$… it detects Argon2id with 19 MiB, 2 passes and 1 lane. Try the sample: the password correct horse battery staple matches the bcrypt hash that is filled in, and changing one letter does not.
If a correct password does not match, the usual causes are a pepper that is missing or different, a hash cut short when copied (a bcrypt hash is always 60 characters), a trailing space or newline in the password, or a password longer than 72 bytes, which bcrypt trims. Enter the pepper your application uses in its field.
The check takes about as long as creating the hash did, which is the point of a slow hash. Nothing is uploaded. To create a hash instead, use the Password Hash Generator.
Frequently asked questions
How does bcrypt compare a password with a hash?
It reads the salt and cost out of the stored hash, hashes the password you typed with them, and compares the result with the stored one. The password is never recovered from the hash.
Why does a correct password say no match?
Check for a pepper the hash was made with, a truncated hash, a stray space or newline, or a password over 72 bytes. A bcrypt hash should be 60 characters long.
Does it check Argon2 hashes too?
Yes. Hashes that start with `$argon2id$`, `$argon2i$` or `$argon2d$` are detected and checked the same way.
What do $2a, $2b and $2y mean?
They are versions of the bcrypt format. The differences concern old bugs in some implementations, and current libraries read all of them.