Bcrypt Hash Generator & Verifier

Generate and verify bcrypt password hashes with adjustable cost factor using this free online tool. No sign-up required, runs entirely in your browser.

What Is Bcrypt Hashing?

Bcrypt is a password-hashing function designed by Niels Provos and David Mazières based on the Blowfish cipher. Unlike fast hash algorithms like SHA-256, bcrypt is intentionally slow and includes a configurable cost factor (work factor) that controls how computationally expensive it is to produce a hash. This makes brute-force attacks significantly harder. Bcrypt also automatically generates and embeds a random salt in each hash, so identical passwords produce different hash values. The output format ($2a$, $2b$, or $2y$ prefix) encodes the algorithm version, cost factor, salt, and hash in a single 60-character string.

How to Use This Bcrypt Hash Tool

  1. To generate a hash: enter a password, adjust the cost factor (10 is a good default), and click Generate.
  2. The bcrypt hash appears instantly — copy it for storage in your database.
  3. To verify: switch to the Verify tab, enter the original password and the stored hash.
  4. Click Verify to check if the password matches the hash.

Common Use Cases for Bcrypt

  • Secure password storage — Hash user passwords with bcrypt before storing them in a database. The built-in salt and adjustable cost factor protect against rainbow table and brute-force attacks.
  • Password migration testing — When migrating authentication systems, quickly verify that existing bcrypt hashes still match their original passwords.
  • Cost factor benchmarking — Test different cost factors to find the right balance between security and login performance for your server hardware.
  • Development and debugging — Generate sample bcrypt hashes for use in test fixtures, seed data, or API development without needing a running backend.

FAQ

What cost factor should I use?
A cost factor of 10 is a widely used default. Each increment doubles the computation time. For high-security applications, use 12 or higher, but ensure it does not make your login flow too slow — aim for under 250ms per hash on your server.
Why do identical passwords produce different bcrypt hashes?
Bcrypt generates a unique random salt for every hash operation. The salt is embedded in the output string, so even the same password hashed twice will produce different results. Verification still works because bcrypt extracts the salt from the stored hash.
Is bcrypt better than SHA-256 for passwords?
Yes. SHA-256 is designed to be fast, which makes it vulnerable to brute-force attacks on passwords. Bcrypt is intentionally slow and includes a tunable cost factor, making it far more resistant to password cracking.
Is this tool safe to use for real passwords?
The hashing runs entirely in your browser — no data is sent to any server. However, for production password storage, always hash passwords on the server side to prevent exposure of plaintext passwords in transit.

関連ツール