bcrypt hash generator and checker
Hash a password with bcrypt at the cost you choose, or check a password against an existing $2a$/$2b$/$2y$ hash.
Input
Result
The result will appear here.bcrypt is still the password hash most frameworks reach for by default — Laravel, Rails' has_secure_password, Spring Security, Django's optional hasher — so sooner or later you need to make a hash for a seed user or find out why a login keeps failing. This tool does both: hash a password at a chosen cost factor, or paste a stored hash and see whether a password matches it. It runs on bcrypt.js (dcodeIO/bcrypt.js, 3.8k stars, BSD-3-Clause), a zero-dependency JavaScript implementation whose hashes are interchangeable with the C library behind PHP's password_hash, Python's bcrypt and Go's x/crypto/bcrypt.
How it works
- A new 128-bit salt comes from crypto.getRandomValues on every run, so hashing the same password twice gives two different 60-character hashes that both verify.
- The cost factor is the base-2 logarithm of the number of key-expansion rounds: cost 10 is 1,024 rounds, and every step up doubles the time — the timing on the result is measured on your device.
- Verification re-hashes the password with the salt and cost embedded in the stored hash and compares the result in constant time, which is exactly what a server's login check does.
- Only the first 72 bytes of a password reach bcrypt; the result flags a longer password, and a trailing line break from pasting is dropped while spaces are kept.
Where your data goes
Nowhere. This tool runs entirely in your browser: the text you paste is processed by the page and is never transmitted to a server or written to a log.
This tool handles keys and credentials, so nothing about a run is saved, not even to your own history.
What it costs
This tool is free, with no sign-in and no points.
Common questions
- What cost factor should I use?
- OWASP's Password Storage Cheat Sheet asks for at least 10. The practical rule is to pick the highest cost your login server can afford — somewhere around 100–250 ms per hash on that machine, measured there, not here. Cost 12 takes four times as long as cost 10, and 15 is thirty-two times; from 13 up the tool warns you, because every login and every attacker's guess pays that price.
- What is the difference between $2a$, $2b$ and $2y$?
- They are the same algorithm with different bug-fix labels. $2y$ was introduced by PHP's crypt_blowfish in 2011 to mark hashes made after it fixed a sign-extension bug with non-ASCII bytes; $2b$ was introduced by OpenBSD in 2014 after a bug that wrapped password length at 256 bytes. For any password under 72 bytes all three produce identical hashes apart from the prefix, and most libraries verify all three.
- Why does a very long password still match after I change its end?
- Because bcrypt never sees anything past byte 72, in every implementation. Seventy-two bytes is 72 ASCII characters but only 24 Chinese characters in UTF-8. If you must accept longer passphrases, some systems pre-hash with SHA-256 and Base64-encode the digest before bcrypt — never pass the raw binary digest, since a zero byte ends the password in many implementations.
- Is bcrypt still a good choice in 2026?
- It is still acceptable, and far better than any fast hash such as SHA-256 or MD5. OWASP now lists Argon2id first and scrypt second, because bcrypt uses little memory and is therefore cheaper to attack with GPUs and custom hardware. For an existing bcrypt system the usual path is to raise the cost over time and rehash on next login.
- Does the password or hash leave my browser?
- No. Hashing and checking both happen in this page's JavaScript, nothing is transmitted, and the site keeps no record of the run — not even in a signed-in member's history.
The open-source behind it
This tool runs on dcodeIO/bcrypt.js, released under BSD-3-Clause. If you need the same behaviour inside your own program, that is the library to reach for.
dcodeIO/bcrypt.jsAlso known as
- bcrypt generator
- bcrypt hash online
- bcrypt checker
- bcrypt verify password
- bcrypt cost factor
- $2y$ hash