Bcrypt Generator

Hash passwords with bcrypt or verify a bcrypt hash

Create bcrypt password hashes with a chosen cost factor, or check whether a password matches an existing bcrypt hash. See each part of the hash explained, how long it took, and warnings for weak settings. Runs in your browser.
Try an example:

Output will appear here...

About Bcrypt Generator

How it works

  1. A random 128-bit salt is created, then the password and salt go through 2^cost rounds of the Blowfish-based bcrypt algorithm.
  2. The result packs everything needed to check a password later: algorithm version, cost, salt and hash, in 60 characters.
  3. To verify, the tool re-hashes the password with the salt and cost stored in the hash and compares the results.
  4. The anatomy table explains each part, and the timing shows how slow the hash is - slowness is what protects passwords.

What you need

  • A password. To verify, also the full 60-character bcrypt hash ($2a$, $2b$ or $2y$).

Tips

  • Choose the highest cost your server can handle while keeping logins around 100-500 ms; 10-12 is typical today.
  • Hashing the same password twice gives different results because the salt is random - that is expected.
  • bcrypt only uses the first 72 bytes of a password; the tool warns if yours is longer.
  • For new systems, Argon2id is the modern recommendation; bcrypt remains a solid, widely supported choice.

Limitations

  • Your browser may be faster or slower than your server, so timings are a guide.
  • Costs above 14 are disabled because they would freeze the page for many seconds.

Runs in your browser. Hashing and verification run in your browser; passwords and hashes are never sent anywhere.

Frequently asked questions

Why does the same password give different hashes?+

Each hash uses a new random salt. This stops attackers using precomputed tables and hides which users share a password. Verification still works because the salt is stored inside the hash.

What cost factor should I use?+

The highest your server can afford: about 100-500 ms per hash. Today that is usually 10-12. Each +1 doubles the time for you and for attackers.

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

Version markers from bug fixes in different implementations. Modern libraries treat them the same for normal passwords, and all three can be verified here.

Can a bcrypt hash be reversed?+

No. Attackers can only guess passwords one by one, and bcrypt's slowness makes each guess expensive. Strong, unique passwords stay safe.