Bcrypt Generator
Create a bcrypt hash from a password with the cost you choose, or check a password against an existing hash. Free, and the password never leaves your browser.
What is a bcrypt generator?
Bcrypt is a way to store passwords safely. Instead of keeping the password itself, a website keeps a hash: a scrambled string such as $2b$10$ followed by 53 more characters. When someone logs in, the site hashes what they typed and compares the two. If a database leaks, the attacker gets hashes, not passwords, and bcrypt makes every guess slow on purpose.
This tool does two jobs. In Create a hash mode it turns a password into a new bcrypt hash. Each hash gets a fresh random salt, so the same password gives a different hash every time you press the button. That is normal, and every one of those hashes still matches the password. In Check a password mode you paste a hash you already have and find out whether a password belongs to it. Developers use this to seed a test account, to fill in a config file, or to find out why a login keeps failing.
The Cost decides how slow the hash is. Each step up doubles the work. A cost of 10 takes a fraction of a second on a normal laptop, while 14 can take a few seconds, and an older phone is slower still. A higher cost protects a leaked hash better, but your server pays the same price on every login, so pick the highest cost your server can live with. Many projects use 10 to 12.
Bcrypt has one limit worth knowing. It only reads the first 72 bytes of a password and ignores the rest. A plain English letter is one byte, but a Vietnamese letter with a mark, such as “ơ” or “ệ”, takes two or three bytes, and an emoji takes four. So a long Vietnamese passphrase can pass 72 bytes well before it reaches 72 letters. When that happens, the tool warns you under Password and tells you how many bytes your password has.
The password never leaves your browser. The tool runs in a sealed-off part of the page that cannot reach the network, nothing is saved, and the password is gone when you close the tab.
How to use the bcrypt generator
- Choose Create a hash or Check a password under What to do.
- Type the password into Password. Tick Show the password if you want to see what you typed.
- To create a hash, pick a Cost from 4 to 14 and press Create hash. The new hash appears in the Hash box. Select the text and copy it.
- To check a password, paste the hash into Hash to check against and press Check password.
- Read the answer. “Match” means the password belongs to the hash, “No match” means it does not.
FAQ
Why do I get a different hash each time for the same password?
Every hash includes a random salt, stored inside the hash itself. That stops an attacker from spotting two users with the same password or using a ready-made table of hashes. To test a password, use Check a password instead of comparing two hashes by eye.
Which cost should I choose?
Pick the highest cost that keeps a login fast enough on your own server. Cost 10 is the common default. Try 12 if your server has room. Going one step up doubles the time for you and for anyone trying to guess the password.
What does the 72-byte warning mean?
Bcrypt reads at most 72 bytes of a password. Anything after that does not change the hash, so two long passwords that start with the same 72 bytes would match each other. Vietnamese letters with marks count as two or three bytes each, so the limit arrives sooner than you might expect. Shorten the password, or hash it another way first if you really need longer ones.
Which hashes can it check?
Hashes that start with $2a$, $2b$ or $2y$, then a two-digit cost, then 53 characters. Those come from PHP, Node.js, Python, Ruby and most other languages. If the box says “This is not a bcrypt hash”, look for a missing character or a space copied by mistake.
Why is there no copy button?
This tool runs in a sealed-off frame to keep the password away from everything else on the page, and that frame cannot use the clipboard. Select the hash in the Hash box and copy it with your keyboard or the right-click menu.
Is my password sent anywhere?
No. Hashing and checking happen on your device. The password is not uploaded, logged or stored.