Bcrypt Hash Generator & Checker
Guide: What Is a Hash Function? MD5, SHA-256 and Bcrypt Explained
Each +1 doubles the time. 10–12 is typical. Above 12 can take several seconds in a browser.
Everything runs in your browser. bcrypt only uses the first 72 bytes of a password.
Nothing you enter or choose here leaves your device. This tool runs in your browser.
Reading a bcrypt hash
Every bcrypt hash is 60 characters and has the same layout. Learning it makes a stored hash much less mysterious:
$2b$12$ABCDEFGHIJKLMNOPQRSTUuVWXYZabcdefghijklmnopqrstuvwxyz0 \_/ \/ \____________________/\___________________________/ | | salt (22 chars) hash (31 chars) | cost factor (12) version (2b)
The version says which edition of the algorithm was used. The cost is the work factor. The salt is random and unique to this hash, and the last part is the result. Everything needed to check a password later is inside the one string, so you store it in a single database column.
Picking a cost
The cost is a power of two: cost 10 means 1,024 rounds of the expensive step, and cost 12 means 4,096. Every step up doubles the time, both for you and for anyone trying to guess passwords from a stolen list. The target is a hash that takes your server roughly 100 to 300 milliseconds, slow enough to hurt an attacker and quick enough that nobody notices at login.
| Cost | Rounds | Typical use |
|---|---|---|
| 10 | 1,024 | Lowest value that's still reasonable today |
| 12 | 4,096 | A common default for web apps |
| 14 | 16,384 | High-security accounts, if the server can afford it |
Computers get faster, so revisit the number every year or two. You can raise the cost for new hashes at any time, and rehash an old one the next time the user logs in.
Why the same password gives a different hash
Generate a hash for the same password twice and the two strings differ, because each gets a fresh random salt. That's by design. Two users with the same password end up with different stored values, and precomputed lookup tables are useless. To check a password, switch to Check a hash, paste the password and any one of the hashes, and the tool says whether they match.
Limits and gotchas
- 72 bytes. bcrypt reads only the first 72 bytes of a password. Longer ones are cut off, so two very long passwords with the same start would match. Accented letters and emoji use several bytes each.
- Version prefixes. You'll see $2a$, $2b$ and $2y$. Modern libraries treat them as the same thing for ordinary passwords.
- Never compare hashes as plain strings in your own code. Use the library's check function, which compares in a safe way.
- Use real passwords only in your own code. For experiments here, use test passwords.
bcrypt or something newer?
bcrypt is old, well tested and still acceptable. Argon2id is the newer choice and is often recommended for new systems because it also resists attacks that use lots of memory. If your framework already makes a choice for you, keep it and set a sensible cost. The big win is moving off fast hashes like MD5 and SHA-256, as explained in the guide to hash functions.
Hashing runs in your browser and nothing is sent anywhere. For quick checksums, use the hash generator. To make passwords worth hashing, use the password generator, and read how to create a strong password.
Written by Akinrinmade Michael · Updated October 24, 2026
How to use
- 1Choose Generate hash or Check a hash.
- 2To generate, type the password and choose a cost factor.
- 3Click the button and copy the hash.
- 4To check, paste a password and a bcrypt hash and see if they match.
Frequently asked questions
What is bcrypt?
A slow password-hashing function. It adds a random salt and is deliberately expensive to compute, which makes guessing passwords from a stolen database much harder than with fast hashes such as SHA-256.
What cost factor should I use?
10 to 12 is common today. Each step up doubles the work, so choose the highest value that still feels quick for your server, typically 100 to 300 ms per hash.
Why is the hash different every time?
Each hash includes a fresh random salt. That is expected, and the checker still tells you whether a password matches any one of them.
Is it safe to type a real password here?
Hashing runs in your browser and nothing is sent anywhere. Even so, use test passwords for experiments and real hashing code on your server for real accounts.
Read the guides
Learn how this works and how to get the most from it.
Security
What Is a Hash Function? MD5, SHA-256 and Bcrypt Explained
Learn what hashing does, why the same input always gives the same hash, which algorithms are still safe, and why passwords need bcrypt.
3 min read
Security
How to Create a Strong Password (and Keep It Safe)
Why length beats complexity, how long a password should be, how passphrases work and how developers should store passwords.
4 min read
Related tools
Hash Generator
Generate MD5, SHA-1, SHA-256 and SHA-512 hashes and HMACs.
Password Generator
Create strong random passwords or passphrases, one or many at a time.
JWT Decoder
Decode a JSON Web Token and check its expiry and signature.
UUID & Random Number Generator
Generate secure UUIDs (v4, v7) and random numbers.