UFOZoo

Bcrypt Password Hash Generator — Online Hash & Verify Tool

Generate bcrypt password hashes with adjustable cost factor. Verify passwords against existing hashes. Industry-standard password hashing, fully browser-based.

Features

  • Generate bcrypt password hashes instantly in your browser
  • Adjustable cost factor (rounds 4–16) for future-proof hash strength
  • Built-in password verification against existing bcrypt hashes
  • Industry-standard salt generation — unique salt per hash, no configuration needed
  • One-click copy hash to clipboard
  • 100% browser-based — your password never leaves your device
  • Password strength estimation — visual indicator shows weak/fair/good/strong rating alongside the hash
  • Cost factor timing estimation — displays estimated computation time for the selected rounds value
  • Detailed hash breakdown — view the version, cost factor, salt, and hash body separately for educational purposes
  • 72-byte truncation warning — alerts when input exceeds bcrypt's 72-byte limit

How to Use

  1. 1Select a mode: Hash (generate a new hash) or Verify (check a password against an existing hash).
  2. 2In Hash mode, type or paste your password into the input field and adjust the cost factor slider.
  3. 3Click Generate — your bcrypt hash appears instantly with the salt and cost embedded.
  4. 4Click the copy icon to copy the full hash string (e.g. $2b$10$...).
  5. 5In Verify mode, enter both the password and the bcrypt hash, then click Verify to check for a match.
  6. 6How to choose the right cost factor: start with 10 (default) for most applications. Increase to 12 for sensitive data. Use 14+ only if you can tolerate 1+ second hashing time on your target hardware.
  7. 7How to verify an existing password hash from your database: switch to Verify mode, paste the stored bcrypt hash, enter the user's password, and click Verify. The tool extracts the salt and cost automatically.
  8. 8How to read a bcrypt hash: $2b$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy — the version is $2b$, cost is 10, followed by 22-character salt and 31-character hash body.
  9. 9How to handle the 72-byte limit: bcrypt only processes the first 72 bytes of your password. For longer passwords, consider pre-hashing with SHA-256 before bcrypt, or use a bcrypt variant that supports longer inputs.
  10. 10How to test password strength: type a password and observe the strength indicator. A strong password combined with cost factor 10+ provides robust protection against brute-force attacks.

Frequently Asked Questions

What is bcrypt and why is it used for passwords?

Bcrypt is a password hashing function designed by Niels Provos and David Mazières in 1999. It incorporates a salt to protect against rainbow table attacks and an adjustable cost factor that makes it deliberately slow, thwarting brute-force attacks even as hardware improves. It is the industry standard for password storage.

What does the cost factor (rounds) mean?

The cost factor (also called rounds) controls how computationally expensive the hash is. Each increment doubles the time required. A cost of 10 (default) runs 2^10 = 1024 rounds. For most applications, 10–12 is recommended. Higher values (14+) provide stronger protection but may cause noticeable delays on slower devices.

Why is bcrypt better than SHA-256 for passwords?

SHA-256 is designed to be fast, which makes it vulnerable to brute-force and GPU-accelerated attacks. Bcrypt is deliberately slow and includes a unique salt per password, preventing rainbow table attacks. Even a modest cost factor of 10 makes bcrypt hundreds of times slower than a single SHA-256 pass.

Can I verify a password from my database?

Yes. Use the Verify mode: paste the existing bcrypt hash from your database along with the password. The tool extracts the salt and cost from the hash and recomputes it to check for a match. Your data stays entirely in your browser.

What does a bcrypt hash look like?

A bcrypt hash follows the format: $2b$<cost>$<22-char-salt><31-char-hash>. For example: $2b$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy. The components are: version ($2b$), cost factor (10), 22-character base64 salt, and 31-character base64 hash.

Can bcrypt hashes be cracked?

Bcrypt is designed to resist cracking by being deliberately slow. However, weak passwords can still be cracked through dictionary attacks, even with bcrypt. Always use strong, randomly generated passwords combined with an appropriate cost factor (10+).

What is the difference between $2a$, $2b$, and $2y$ versions?

$2a$ was the original version. $2b$ (current standard) fixed a bug in $2a$ related to handling of non-ASCII characters. $2y$ is a PHP-specific variant. Most modern systems use $2b$, and this tool generates $2b$ hashes.

How does bcrypt's salt work?

Bcrypt automatically generates a cryptographically random 128-bit (22-character base64) salt for every hash. This salt is embedded in the hash output string, so you don't need to store it separately. The salt ensures that identical passwords produce different hashes.

Can I use bcrypt for API authentication?

Yes, but bcrypt is slower than HMAC-based approaches. For API authentication where speed matters, consider using HMAC-SHA256 with a per-user secret. Reserve bcrypt for password storage in databases and user authentication workflows.

Is bcrypt vulnerable to GPU attacks?

Bcrypt's design inherently resists GPU acceleration because it requires significant memory and has a complex initialization phase. Unlike SHA-256 (which GPUs can compute millions per second), bcrypt's structure makes it about as fast on a GPU as on a CPU — a major security advantage.

What happens to passwords longer than 72 bytes?

Bcrypt silently truncates input to the first 72 bytes. Characters beyond 72 bytes are ignored. To work around this, either pre-hash the password with SHA-256 before bcrypt, or use a modern algorithm like Argon2id that doesn't have this limitation.

Should I use bcrypt or Argon2id for new projects?

Both are excellent choices. Argon2id is the winner of the Password Hashing Competition (2015) and is considered the modern standard. Bcrypt remains widely supported and is easier to find in legacy systems. For new projects, Argon2id is recommended; for maximum compatibility, bcrypt is a proven alternative.

Related Tools