What is bcrypt?
bcrypt is the industry-standard algorithm for hashing passwords. Unlike general-purpose hash functions (MD5, SHA), bcrypt is intentionally slow and includes a random salt, making it extremely resistant to brute-force attacks and rainbow tables.
A bcrypt hash looks like: $2b$12$KIXpLB0hJk8fJO2swYpNlOkVRuQV5oUWmX7QHH8lhz0ULhLAG7KNO
How to Use It
Open the tool
Go to Encode / Decode and scroll to the bcrypt Tester section.
Hash a password
Enter the plaintext password, set the cost factor (12 recommended), and click Hash. Copy the resulting hash string.
Verify a hash
Switch to Verify mode, enter the plaintext password and the bcrypt hash. Click Verify to see if they match.
Use in your application
Store the bcrypt hash (not the plaintext) in your database. On login, use bcrypt's compare function to verify the password.
Cost Factor Guide
The cost factor determines how many iterations bcrypt performs. Each increment doubles the work. Higher values provide better security but take more time to compute:
Cost 10 — Fast (≈100ms). Minimum for most applications. Cost 12 — Recommended (≈300ms). Good balance for 2024. Cost 14 — Strong (≈1200ms). Use for highly sensitive accounts. Never go below 10 in production.
Pro Tips
Frequently Asked Questions
$2b$12$ means: bcrypt version 2b, cost factor 12. The following 22 characters are the random salt, and the remaining characters are the hash.Test bcrypt now
Open the bcrypt Tester and hash or verify passwords instantly — no login, no server required.
Open bcrypt Tester →