BCrypt Security Guide
Complete guide to BCrypt password hashing, cost factors, and security best practices.
Adjustable cost factor · Password strength meter · Benchmark · Verify mode · Code snippets · 100% browser-side
Enter a password and click Generate
bcrypt · Adjustable cost factor · Random salt · One-way hash
Hash passwords with bcrypt directly in your browser. Adjustable cost factor from 8 to 18, password strength meter with entropy and crack time, benchmark to find the right cost for your server, and verify mode to test existing hashes. Code snippets for Node.js, Python, and PHP included. Your password never leaves your device.
Bcrypt is a password hashing algorithm designed by Niels Provos and David Mazières in 1999. Unlike general-purpose hash functions (MD5, SHA-256), bcrypt is intentionally computationally expensive. It uses a configurable cost factor to ensure hashing always takes a significant amount of time — making brute-force and dictionary attacks impractical even with modern GPU hardware.
The cost factor (work factor) controls how slow bcrypt is. Cost 12 means 2^12 = 4,096 internal rounds. Each increment doubles the time. The OWASP recommendation is to target 100–300ms hashing time on your production server. Cost 12 is typically right for modern hardware — run the benchmark to find the right value for your specific server.
Bcrypt is a password hashing algorithm designed to be slow and computationally expensive. It uses a configurable cost factor so that as hardware gets faster, you can increase the cost to keep hashing time constant. Used by Django, Laravel, Spring Security, and most major frameworks.
OWASP recommends targeting 100-300ms hashing time on your production server. Run the benchmark in this tool to find the right cost. Cost 12 is recommended for most modern servers in 2026. Use cost 10 for high-traffic APIs where login speed matters.
No. Bcrypt is a one-way hash — mathematically impossible to reverse. Verification works by hashing the input again with the stored salt and comparing. This is why bcrypt is used for passwords, not encryption.
Bcrypt generates a new cryptographically random 128-bit salt for every hash. This prevents rainbow table attacks and means two users with the same password have completely different hashes.
Yes. Bcrypt remains secure in 2026 with cost factor 12+. Argon2id is now preferred for new systems (PHC winner), but bcrypt is still considered safe. Both are vastly superior to MD5, SHA-256, or unsalted hashes for passwords.