About the Bcrypt Generator
Bcrypt is the most widely used password-hashing function: it is deliberately slow and salted, making brute-force attacks expensive. Use this tool to create a hash for seeding a database user, or to check whether a password matches a stored hash while debugging authentication.
Hashes are compatible with Spring Security’s BCryptPasswordEncoder, PHP’s password_hash, Node’s bcrypt and Python’s bcrypt/passlib.
Features
- Cost factor 4–14
- $2a$, $2b$ and $2y$ prefixes
- Verify password against hash
- Hash anatomy breakdown (cost, salt, hash)
- Timing information
How to use it
- Enter a password, choose the cost factor and click Generate.
- To verify, paste the hash and the candidate password and click Verify.
Frequently asked questions
What cost factor should I use?
Pick the highest cost that keeps login under ~250 ms on your servers — typically 10–12 today. Each +1 doubles the work.
Why does the same password give different hashes?
Each hash embeds a random 16-byte salt (the 22 characters after the cost). Verification extracts the salt from the hash, so all variants verify correctly.
Is there a password length limit?
Yes — bcrypt only uses the first 72 bytes of the password.