Bcrypt Hash Generator

Create bcrypt password hashes for your app's users or config files, or check whether a password matches a hash from your database, all without the password leaving your browser. Choose the cost to balance security and login speed, see the salt and cost inside any hash, and get a warning when bcrypt would silently cut a long password.

Cost factor

CostRoundsTypical use
416Tests only
101,024Common default
124,096Stronger logins
1416,384High security, slow

When to use it

  1. Seed a test user with a known password hash.
  2. Check that a password matches a hash from your database.
  3. Pick a cost factor by seeing how long a hash takes.
  4. Inspect the cost and salt inside an existing hash.

How to Use

  1. Choose Generate or Verify.
  2. Type the password (and paste the hash to verify).
  3. Set the cost, generate, and copy the hash — or read the match result.

Features

  1. Generate and verify
  2. Cost 4–15 with timing
  3. $2a$, $2b$, $2y$ support
  4. Salt and cost breakdown
  5. 72-byte warning
  6. Progress bar, no freezing
  7. Never uploaded

FAQs

What cost should I use?

10 to 12 for logins. Each +1 doubles the time to hash, for you and for an attacker.

Why is the hash different every time?

Each hash gets a new random salt. Every one of them still verifies against the same password.

Does it work with PHP's $2y$ hashes?

Yes. $2y$, $2a$ and $2b$ use the same algorithm for normal passwords.

Is there a password length limit?

bcrypt only uses the first 72 bytes. Longer passwords are cut silently, and the tool warns you.

Is my password sent anywhere?

No. Hashing and checking run in your browser.

Technical Details

Hashing uses bcryptjs, a pure-JavaScript implementation of bcrypt. A fresh 16-byte salt comes from the browser's cryptographic random generator, and the cost sets the number of key-expansion rounds to 2^cost. The work runs in small chunks with a progress bar, so the page stays responsive even at cost 15. The result is a standard $2b$ string: cost, 22 salt characters, then 31 hash characters. Verification re-hashes your password with the salt and cost read from the existing hash. $2y$ (PHP) and $2x$ prefixes are read as $2b$, because the algorithm is identical for normal passwords. bcrypt only uses the first 72 bytes of a password (UTF-8 bytes, not characters), so the tool warns when a password is longer. The time estimate is measured on your device and doubles with each step of cost.

Security Tools

Security Tools

  • BIP39 Mnemonic Generator
  • CVSS Calculator
  • CORS Debugger
  • RSA Key Generator
  • SRI Hash Generator
  • Permissions-Policy Builder
  • htpasswd Generator
  • Common Port Reference