Toolonit
  1. Home
  2. Encrypt
  3. Bcrypt

Bcrypt Hash Generator & Checker

Hash a password with bcrypt and check a password against a hash.

Hash a password

0 of 72 bytes

Cost

Each step up doubles the time. 10–12 is usual for sign-ins. The hash records its cost, so checking needs no setting.

Type a password: its hash appears here.

Check a password against a hash

$2a$, $2b$ or $2y$, 60 characters. The cost is read from the hash.

Enter a password and a hash to check them.

Bcrypt is a slow password hash: servers store the bcrypt hash instead of the password and check a sign-in by hashing what was typed. Each hash carries its own random salt and its cost, so the same password gives a different hash every time and any of them verifies. Use this page to create a hash for a config file or test account, or to find out whether a password matches a stored hash. Hashing runs in your browser, so the password never leaves your device; it's free and needs no sign-up.

How to generate and check a bcrypt hash

  1. Type the password. The hash appears as you type, with how long it took on your device.
  2. Move the Cost slider if your system needs a different cost (10 is the default).
  3. Copy the $2b$ hash, or click Check it below to see it verify.
  4. To check an existing hash, paste it with the password under Check a password against a hash: you see Match or No match.

Features

  • $2b$ hashes with a new random 16-byte salt every time
  • Cost 4–16 (default 10), with the time the hash took on your device
  • Checks a password against $2a$, $2b$ and $2y$ hashes: Match or No match, with the version and cost
  • Counts the bytes against bcrypt's 72-byte limit and warns which characters are ignored
  • Runs in a background worker, so a high cost never freezes the page: Stop it, or Hash again for a new salt
  • Recognizes an Argon2 hash and links to the Argon2 tool

Is it private?

Yes. Hashing and checking run in your browser with WebAssembly, in a background worker; the password is never uploaded or stored.

Frequently asked questions

Can a bcrypt hash be decrypted?

No. Bcrypt is a one-way hash: there is no key that turns it back into the password. The only way to find a password is to guess and hash each guess, which bcrypt makes slow on purpose. To test a password you think is right, use Check a password against a hash.

Why is the hash different every time for the same password?

Every hash gets a new random 16-byte salt, stored inside the hash string itself. Checking reads the salt back from the hash, so every one of those hashes verifies with the same password.

Which cost should I choose?

Each step up doubles the work. 10 to 12 is usual for sign-ins; pick the highest cost your server can afford for each login, often about a quarter to half a second. The time shown here is for your own device.

Why does bcrypt ignore part of a long password?

Bcrypt reads only the first 72 bytes of a password, in UTF-8. Letters such as Korean take 3 bytes each, so 24 of them already fill the limit. The tool warns you when characters are being ignored; for longer passphrases, Argon2 has no such limit.

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

The letters mark fixes of old bugs in particular implementations; for ordinary passwords they compute the same result. This tool writes $2b$, the current OpenBSD prefix, and checks all three. Hashes made here verified with Python's bcrypt library and with Linux crypt().

Related tools