Tech News, Tech & Coding · Free Online Tools

IT Question Answer
Tools

Bcrypt Generator

Advertisement

Runs in your browser

Your input is processed on your device and is not uploaded to our servers.

Fast

No queues and no upload wait, so results appear as soon as you act.

Clean and simple

Dark mode, no popups, and no signup.

What you get

  • Hash & verify modes
  • Adjustable cost (4–14)
  • Standard $2a$ bcrypt format

What bcrypt is for

Bcrypt is a password hashing function. Unlike a fast hash such as MD5 or SHA-256, bcrypt is deliberately slow and adds a random salt, so an attacker who steals a database of hashes needs a lot of time to try each guess. That is exactly what you want for stored passwords.

This tool hashes a password with bcrypt and lets you choose the cost (also called rounds), or verifies a password against a hash you already have. It produces a standard bcrypt hash that starts with $2b$, which other bcrypt libraries can verify.

How to use it

  • Hash mode: enter the password, choose the cost and generate the hash.
  • Verify mode: enter the password and paste an existing bcrypt hash to see whether they match.
  • Choose a cost from 4 to 14. Each step up doubles the time the hash takes.

Reading a bcrypt hash

A bcrypt hash looks like this and carries everything needed to verify it:

$2a$12$R9h/cIPz0gi.URNNX3kh2OPST9/PgBkqquzi.Ss7KIUgO2t0jWMUW

$2a$      the algorithm version
12        the cost: 2^12 = 4096 rounds
next 22   the salt
rest      the hash itself

Choosing the cost

Pick the highest cost that keeps a login fast enough for your users, usually between 100 and 500 milliseconds on your server. A cost of 10 to 12 is a common starting point today. Because the cost is stored inside the hash, you can raise it later and re-hash each password the next time a user signs in.

Good to know

  • The same password gives a different hash every time because the salt is random. Verify, do not compare strings.
  • Bcrypt only uses the first 72 bytes of a password. Very long passwords are cut off.
  • A hash cannot be reversed. If a password is lost, it has to be reset, not recovered.

Related tools

Advertisement

Frequently asked questions

It sets how much work the hash needs. Each increase of 1 doubles the time. A higher cost makes password guessing slower for an attacker.

Bcrypt adds a random salt to every hash. Verification reads the salt from the stored hash, so a match still works.

No. Hashing and verification run in your browser.

No. Bcrypt is a one-way function. The only way to test a password is to hash a guess and compare.

Start around 10 to 12 and raise it as hardware gets faster, as long as sign-in stays quick. Higher costs are slower for you too.