BCrypt Hash Generator

Generate and verify BCrypt password hashes with automatic salting and adjustable cost factor. All hashing happens locally in your browser.

Generate Hash

Password strength: enter a password
Higher = more secure but slower. Default: 10

Verify Password

Hash will appear here...
Each generation produces a unique hash (different salt)
Statistics
Cost: 10 | Iterations: 1,024 | Est. Time: ~100ms
Cost Guide
4 = ~1ms (testing) | 10 = ~100ms (standard) | 12 = ~400ms (high security) | 14 = ~1.6s (maximum)

How to Use

1

Enter Password

Type the password you want to hash. Set cost factor (10 recommended).

2

Generate Hash

Click "Generate BCrypt Hash" to create a unique salted hash.

3

Verify or Copy

Verify passwords against hashes, or copy/download the result.

Use Cases

Database Storage
Store user passwords securely in your database.
Authentication
Verify user login credentials against stored hashes.
Security Audits
Test password hashing in security reviews.
Development
Generate test hashes during application development.
✓ Copied to clipboard!

What Is BCrypt Hash Generator?

BCrypt Hash Generator creates and verifies bcrypt password hashes directly in your browser. Enter a password, set the cost factor (salt rounds), and generate a unique salted hash — or paste an existing hash to verify a password against it.

Key Facts

  • Modes: Generate a hash and verify a password against a hash
  • Cost factor: 4–15 (default 10; higher = slower = more secure)
  • Salting: Every hash is unique — bcrypt automatically generates a random salt
  • Processing: 100 % browser-based — your password never leaves your device
  • Price: Free
  • Account required: No

Cost Factor Reference (estimates; actual time varies by device)

Cost (rounds)IterationsApprox. time*Typical use
416~1 msUnit tests only — too fast for production
8256~5–10 msLow-latency APIs with many concurrent logins
101 024~100 msStandard recommendation for most web apps
124 096~400 msHigh-security applications
1416 384~1.5 sMaximum practical for interactive login

* Measured on a modern mid-range desktop CPU. Mobile devices will be slower.

BCrypt vs MD5 / SHA for passwords: bcrypt is designed for passwords — it is intentionally slow and applies a random salt so that identical passwords produce different hashes. MD5 and SHA-1/SHA-256 are fast cryptographic hash functions designed for data integrity and checksums, not password storage. A modern GPU can compute billions of SHA-256 hashes per second, making pre-computed rainbow tables and brute-force attacks trivial. Never use MD5 or SHA to store passwords. Use bcrypt, scrypt, or Argon2 instead.

How to Use

1

Enter a Password

Type the password you want to hash into the password field. The strength meter updates in real time.

2

Set Cost Factor

Drag the cost slider. Cost 10 is the standard for most applications. Higher values are more secure but take longer to compute on login.

3

Generate Hash

Click Generate BCrypt Hash. Because bcrypt uses a random salt, each click produces a different hash even for the same password — this is expected and correct.

4

Verify (Optional)

Switch to the Verify tab, paste a hash and enter a password, then click Verify Password to confirm whether the password matches the hash.

Common Use Cases

Testing Password Storage

Generate test hashes to verify your application's password hashing and verification logic before going to production.

Learning BCrypt Behaviour

Explore how cost factor affects hash time, observe the unique salt prefix in the hash string, and verify the one-way property.

Development & Debugging

Generate known-good bcrypt hashes to seed a development database or debug authentication middleware.

Security Reviews

Audit that a stored hash uses an acceptable cost factor by inspecting the prefix (e.g. $2b$10$ = cost 10).

Frequently Asked Questions

What cost factor should I use?
Cost 10 is the widely accepted default for most web applications — it takes about 100 ms on a server, which is fast enough for users but slow enough to deter brute-force attacks. OWASP recommends choosing the highest cost that keeps authentication time under 1 second for your specific server hardware. Increase the cost over time as hardware improves.
Why is bcrypt intentionally slow?
Bcrypt's slowness is its key security property. If an attacker steals your password database, they must compute bcrypt for every guess they make. At cost 10, a modern GPU can check only a few thousand passwords per second — compared to billions per second with MD5. The cost factor lets you calibrate this resistance and increase it as hardware gets faster, without changing the algorithm.
Why are two bcrypt hashes of the same password different?
Bcrypt generates a unique random 128-bit salt for every hash. The salt is embedded in the hash string (the 22-character section after the cost prefix). When verifying, bcrypt extracts the stored salt and uses it to re-hash the candidate password — so two different hashes of "mypassword" are both correct and both verify successfully against the original password.
Should I use bcrypt or Argon2?
Both are good choices. BCrypt has 25+ years of production use, is supported by virtually every language ecosystem, and is still considered secure. Argon2 (winner of the 2015 Password Hashing Competition) is the more modern option — it is memory-hard, which resists GPU and ASIC attacks more effectively, and allows tuning memory and parallelism in addition to iterations. OWASP now recommends Argon2id as the first choice for new projects, with bcrypt as the acceptable fallback.