Bcrypt Hash Generator

Hash passwords with bcrypt — configure cost factor, verify hashes

Free Client-Side No Login No Storage
Loading tool...

How to Use the Bcrypt Hash Generator

  1. Enter the password you want to hash.
  2. Choose a cost factor (10-12 recommended for production).
  3. Click Hash. Copy the bcrypt hash.
  4. Use Verify to check if a password matches a stored hash.

Why bcrypt for passwords?

Unlike SHA-256 or MD5, bcrypt is specifically designed for password hashing. It is intentionally slow (configurable via the cost factor) and includes a random salt automatically, making rainbow table attacks and brute-force attacks impractical.

Cost factor guide: 10 = ~100ms, 12 = ~400ms, 14 = ~1.5s. Higher is more secure but slower. For most web apps, 10-12 is the right balance.

What is Bcrypt?

Bcrypt is a password hashing function designed specifically for storing passwords securely. Unlike general-purpose hash functions (MD5, SHA-256), bcrypt is intentionally slow — it applies a cost factor that makes brute-force attacks computationally expensive. It also automatically handles salting to prevent rainbow table attacks.

Common Uses

  • Hashing user passwords before storing in a database
  • Verifying passwords by comparing a plaintext attempt against a stored hash
  • Choosing an appropriate cost factor for your server's performance budget

Frequently Asked Questions

What is the bcrypt cost factor?

The cost factor (work factor) determines how many iterations bcrypt performs: 2^cost rounds. Cost 10 = 1,024 rounds, cost 12 = 4,096 rounds. A higher cost means slower hashing (harder to brute-force) but also slower login. Cost 10–12 is standard for most applications.

Can I reverse a bcrypt hash?

No. Bcrypt is a one-way function. The only way to "crack" a bcrypt hash is by trying candidate passwords one by one — which the cost factor makes intentionally slow (e.g., 100 ms per attempt at cost 10).

Why does bcrypt have a 72-character input limit?

The original bcrypt algorithm only processes the first 72 bytes of input. Passwords longer than 72 characters are silently truncated. For very long passwords, pre-hash with SHA-256 before bcrypt if needed.