Shiklo Tools
PDF40
Image20
Calculators & Converters25
Text & Writing13
Developer26
Video14
Audio14
Document14
Data & Spreadsheet12
Web & SEO9
OCR & Scanning5
Archive & File12
Security & Privacy23
Health & Medical29
QR & Barcode5

Bcrypt Generator

Hash a password with bcrypt at the cost you choose, or check a password against an existing $2a$, $2b$ or $2y$ bcrypt hash.

Bcrypt is one of the most widely used ways to store passwords safely. Instead of keeping the password, a site stores a bcrypt hash: a one-way fingerprint that includes a random salt and a cost factor which makes every guess slow for attackers. Frameworks such as Laravel, Django (as an option), Spring Security, Ruby on Rails and many others use it, and you often need a bcrypt hash by hand — to seed an admin account, write a test fixture or reset a password directly in a database.

This tool hashes a password with bcrypt at the cost you choose and shows how long it took, or checks whether a password matches an existing hash in the $2a$, $2b$ or $2y$ format. It uses hash-wasm, a fast WebAssembly implementation, inside your browser: the password is never stored, logged or sent anywhere.

How to use Bcrypt Generator

  1. Choose Create a hash or Check a password.
  2. Type the password.
  3. To hash: choose the cost and press Hash password. To check: paste the hash and press Check password.
  4. Copy the hash, or read whether the password matches.

Features

  • Bcrypt hashes with cost 4 to 15 (12 by default).
  • Random 16-byte salt for every hash.
  • Checks passwords against $2a$, $2b$ and $2y$ hashes.
  • Shows the cost and how long hashing took.
  • Warns when a password is longer than bcrypt's 72-byte limit.
  • WebAssembly (hash-wasm) in your browser; nothing is sent.

Reading a bcrypt hash

A bcrypt hash is 60 characters long and contains everything needed to check a password later. The parts are separated by dollar signs.

PartExampleMeaning
Version2bBcrypt variant ($2a$, $2b$ and $2y$ are compatible)
Cost122 to the power of 12 = 4,096 rounds of the key setup
Saltfirst 22 charactersRandom salt, different for every hash
Hashlast 31 charactersThe result for this password and salt

Choosing the cost

Each step up in cost doubles the work, both for your server when a user logs in and for an attacker trying passwords. A common guideline is to choose the highest cost that keeps hashing around a quarter of a second on your server; today that is usually 12, which is also this tool's default. The time shown here is measured in your browser and only a rough guide to your server's speed. Cost 4 is useful only for quick tests, never for real passwords.

The 72-byte limit

Bcrypt only uses the first 72 bytes of a password; anything after that is ignored, so two long passwords that share the first 72 bytes produce matching hashes. Accented letters and other non-ASCII characters take two to four bytes each, so the limit can be reached sooner than you think. The tool warns you when a password is too long. For new systems, Argon2id avoids this limit and resists attacks with graphics cards better — use the Argon2 Hash Generator.

Why the hash changes every time

Each hash gets a new random salt, so hashing the same password twice gives two different hashes — and both are correct. That is what stops attackers from using precomputed tables of common passwords. To check a password, the salt and cost are read from the stored hash and the password is hashed again in the same way, which is exactly what Check a password does. $2y$ hashes from PHP are checked as the equivalent $2b$ format.

Use it safely

Because hashing runs on your device, the password never leaves your browser. Even so, avoid typing real production passwords into any website unless you trust it; for live systems, generate hashes with your framework's own tools. To create strong passwords first, use the Password Generator, and to see how hard a password is to crack, use the Password Strength Checker.

Frequently asked questions

How do I generate a bcrypt hash?

Type the password, choose the cost and press Hash password.

How do I check a password against a bcrypt hash?

Choose Check a password, type the password, paste the hash and press Check password.

What cost should I use?

12 is a sensible default today; higher if your server can afford it.

Why is the hash different each time?

A new random salt is used for every hash. All of them verify correctly.

Are $2y$ hashes from PHP supported?

Yes. They are checked as the equivalent $2b$ format.

Is my password sent anywhere?

No. Hashing runs in your browser with WebAssembly.

Should I use bcrypt or Argon2?

Both are good; Argon2id is the modern recommendation for new systems.

Related tools