What bcrypt is for
Bcrypt is a password hashing function. Unlike a fast hash such as MD5 or SHA-256, bcrypt is deliberately slow and adds a random salt, so an attacker who steals a database of hashes needs a lot of time to try each guess. That is exactly what you want for stored passwords.
This tool hashes a password with bcrypt and lets you choose the cost (also called rounds), or verifies a password against a hash you already have. It produces a standard bcrypt hash that starts with $2b$, which other bcrypt libraries can verify.
How to use it
- Hash mode: enter the password, choose the cost and generate the hash.
- Verify mode: enter the password and paste an existing bcrypt hash to see whether they match.
- Choose a cost from 4 to 14. Each step up doubles the time the hash takes.
Reading a bcrypt hash
A bcrypt hash looks like this and carries everything needed to verify it:
$2a$12$R9h/cIPz0gi.URNNX3kh2OPST9/PgBkqquzi.Ss7KIUgO2t0jWMUW
$2a$ the algorithm version
12 the cost: 2^12 = 4096 rounds
next 22 the salt
rest the hash itselfChoosing the cost
Pick the highest cost that keeps a login fast enough for your users, usually between 100 and 500 milliseconds on your server. A cost of 10 to 12 is a common starting point today. Because the cost is stored inside the hash, you can raise it later and re-hash each password the next time a user signs in.
Good to know
- The same password gives a different hash every time because the salt is random. Verify, do not compare strings.
- Bcrypt only uses the first 72 bytes of a password. Very long passwords are cut off.
- A hash cannot be reversed. If a password is lost, it has to be reset, not recovered.
Related tools
- Secure Password Generator: Generate strong, random passwords with customizable length and character sets.
- Password Strength Analyzer: Analyze your password strength with real-time scoring, crack time estimates, and dictionary attack detection.
- Bulk SHA & MD5 Hash Generator: Generate MD5, SHA-1, SHA-256, and SHA-512 hashes in bulk from text or files.
- AES Encryption & Decryption: Encrypt and decrypt with AES — ECB, CBC, CTR, and GCM modes. Multiple key formats, IV generator, and Base64/Hex output.
