Bcrypt Hash Generator and Verifier
Generate bcrypt hashes with configurable rounds and verify passwords against existing bcrypt hashes.
Bcrypt Hash Generator and Verifier tool
Example
Input: Password hunter2, Rounds (Cost Factor) 10, then Generate Hash
Result: A 60-character hash starting with $2b$10$, followed by a 22-character random salt and a 31-character hash; Rounds 10 (2^10 = 1,024 iterations)
A new random salt is used each time, so the same password never gives the same hash. Verify mode re-hashes the password with the salt stored in the hash and reports Match or No match.
Bcrypt Cost Factor and Work
| Cost | Rounds (2^cost) | Work vs cost 10 |
|---|---|---|
| 4 | 16 | 1/64 |
| 8 | 256 | 1/4 |
| 10 | 1,024 | 1x |
| 11 | 2,048 | 2x |
| 12 | 4,096 | 4x |
| 13 | 8,192 | 8x |
| 14 | 16,384 | 16x |
| 16 | 65,536 | 64x |
Each step up doubles the time per hash. Measure actual times on your own server.
- Enter the password you want to hash.
- Set the Rounds (Cost Factor) slider. Higher values are slower and harder to attack.
- Click Generate Hash to create the bcrypt hash.
- To check a password, switch to Verify Hash, enter the password and paste the existing bcrypt hash.
- Click verify to see whether the password matches the hash.
Bcrypt Cost Factor and Password Hashing
This tool creates bcrypt password hashes and checks whether a password matches an existing hash. Bcrypt is a slow, salted way to store passwords. OWASP suggests a cost factor of at least 10, and 10 to 12 is common for web apps.
The cost factor sets the work per hash: 2 to the power of the cost. Cost 10 means 1,024 rounds of the expensive setup step, and each step up doubles the time. That delay hardly matters for one login, but it adds up fast for an attacker trying millions of guesses. Choose the highest cost your server can handle while logins stay quick. The slider runs from 4 to 16, and anything above 12 can take several seconds in a browser.
Each hash gets a new random salt, so the same password gives a different result every time. The output packs everything into 60 characters: the version ($2b$), the two-digit cost, a 22-character salt and a 31-character hash. To verify, the tool reads the cost and salt back out of the stored hash, hashes your password the same way and reports Match or No match. Hashes that start with $2a$, $2b$ or $2y$ can be checked.
Bcrypt only uses the first 72 bytes of a password and ignores the rest. The tool warns you when you go past that. Hashing runs in your browser with the bcryptjs library, and nothing is sent anywhere. Even so, test with sample passwords rather than live production ones. For fast checksums of files and text, which are not suitable for passwords, see the Hash Generator. To make a strong password to hash, use the Password Generator.
Sources
Frequently Asked Questions
Related Tools
Password Generator
Generate strong, secure passwords with customizable length, character types, and multi-word passphrases.
Security and EncryptionPassword Strength Checker
Check how strong your password is with a visual meter, entropy score, and estimated crack time.
Security and EncryptionHash Generator
Create MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of text or files, right in your browser.
Security and EncryptionHMAC Generator
Generate HMAC signatures using SHA-256, SHA-384, or SHA-512 with custom secret keys for message authentication.
Security and Encryption