About this tool
What is bcrypt?
Bcrypt is a password-hashing function designed to be slow: an adaptive cost factor makes each hash deliberately expensive, so stolen hash databases resist brute force. It bakes a random salt into every output, and verification re-hashes the candidate with the stored parameters.
How to use it
- Enter a password and a cost factor (10–12 is today’s sane default) to hash.
- Paste an existing hash plus candidate to verify a match.
- Never use fast hashes (MD5/SHA) for passwords — use this.
Examples
- Hashing a new user’s password before storing it in your database.
- Verifying a login attempt against the stored hash.
- Comparing cost factors: cost 12 takes ~4× longer than cost 10.
Important limitations
- Bcrypt caps input at 72 bytes — longer passwords silently truncate; pre-hash with SHA-256 if you must exceed it.
- Slow hashes protect stored passwords, not live logins: rate-limit and MFA still required.
- This demo page is for learning and testing — generate production secrets in your own backend.
Privacy
Hashing runs locally. As with the strength checker: test with disposable values, never paste a real production password into any web page.
Frequently asked questions
What cost factor should I use?
The highest your login latency budget allows — 10 minimum, 12 typical in 2026. Revisit yearly.
Why does the same password give different hashes?
A fresh random salt each time — identical hashes would leak that two users share a password.
Bcrypt vs Argon2?
Argon2id wins on paper (memory-hardness). Bcrypt remains a solid, battle-tested default with universal library support.