
Generate a hash password → bcrypt
The cost factor and a random salt are stored inside the hash, so you don't track them separately. Change the cost and generate again to compare.
Verify a hash password ↔ hash
Accepts $2a$, $2b$ and $2y$ hashes. Verifying re-runs bcrypt at the hash's own cost, so a high cost takes a moment.
What's inside a bcrypt hash
A bcrypt hash is one 60-character string that carries everything needed to check a password later. There's nothing else to store. Here's how the parts break down:
Choosing a cost factor
The cost factor, also called rounds or the work factor, decides how slow the hash is on purpose. Slow is good here: it's what makes a stolen hash expensive to crack. Each increase of one doubles the work, so cost 12 is about four times slower than cost 10.
For most applications, 10 to 12 is the usual range. Higher is safer but adds delay to every login, so it's a balance. Pick the highest cost your server can run in a fraction of a second under real load. This tester lets you go up to 16 so you can feel how much slower each step gets, but you'd rarely use that in production.
Questions
Why does the same password give a different hash each time?
Because each hash uses a new random salt, baked into the output string. That's a feature: it means two users with the same password get different hashes, and you can't tell from the hashes that the passwords match. To check a password, use Verify, which reads the salt out of the hash and re-runs bcrypt with it.
What's the difference between $2a$, $2b$ and $2y$?
They're revisions of the same algorithm. $2a$ is the original, $2y$ came from a PHP fix for an old bug, and $2b$ is the current OpenBSD version. For passwords shorter than 72 bytes they all produce the same result, and this tool verifies all three.
Does bcrypt have a length limit?
Yes. bcrypt only uses the first 72 bytes of a password; anything past that is ignored. Note that's 72 bytes, not characters, so accented letters and emoji count as several bytes each. This tool shows the byte count and warns you when you cross 72.
Is any of this sent to a server?
No. The bcrypt code is built into this page and runs entirely in your browser. Nothing you type is uploaded, and the page works with no network connection. Even so, treat it as a sandbox and keep real production passwords out of it.
My hash won't verify. What's wrong?
The most common causes are a stray space or line break copied with the hash, a truncated hash (a full bcrypt hash is exactly 60 characters), or simply the wrong password. The Verify panel shows the detected version and rounds, so if those read as invalid, the hash itself is malformed.
