Bcrypt Hash Generator & Checker
Hash a password with bcrypt, or check whether a password matches an existing bcrypt hash.
Generate a bcrypt hash
Each extra round doubles the time. 10–12 is typical for web logins.
Verify a password against a hash
What is bcrypt?
Bcrypt is a password hashing function designed to be slow. A random 16-byte salt is built into every hash, so the same password gives a different hash each time, and the cost factor sets how much work each guess takes. A hash looks like $2b$12$ followed by 22 characters of salt and 31 characters of hash. Hashing uses the open-source bcrypt.js library, entirely in your browser.
Frequently asked questions
Which cost factor should I use?
Pick the highest cost that keeps a login under about a quarter of a second on your server. That is usually 10 to 12 today; OWASP recommends at least 10. Raise it over time as hardware gets faster.
What is the difference between $2a$, $2b$ and $2y$?
They are version markers for the same algorithm. $2b$ and $2y$ were introduced to fix a bug in old implementations; for normal passwords all three produce compatible hashes. This tool creates $2a$ hashes and verifies all three, so it works with hashes from PHP and Laravel ($2y$), Node.js and Python ($2b$).
Is there a maximum password length?
Yes. Bcrypt only uses the first 72 bytes of a password; anything after that is ignored. Accented letters and emoji take more than one byte each.
Can a bcrypt hash be decrypted?
No. Bcrypt is a one-way hash, not encryption. The only way to find the password is to guess it, and the cost factor makes every guess slow. To encrypt data so it can be decrypted later, use the encryption tool.