Use this free bcrypt generator to create a bcrypt hash from a password, or to check whether a password matches an existing hash. Choose a cost factor, run the hash, and copy the result. The hashing runs in your browser with a bcrypt library, so the password is not sent to a server.

Bcrypt is for storing passwords safely. The hash cannot be turned back into the password, and the cost factor sets how slow each guess is.

How to use the bcrypt generator

  • Create a hash: enter a password and a cost factor, then click Run. The hash includes the version, cost, salt, and result.
  • Check a password: switch modes, enter the password and the stored hash, then click Run to see whether they match.
  • Cost factor: 10 is a common default. Higher values are slower and harder to attack.
  • Copy: click the hash to copy it.

Anatomy of a bcrypt hash

PartExampleWhat it means
Version$2a$The bcrypt variant used.
Cost10$The cost factor. The work is 2 to the power of this value.
Salt22 charactersA random value, unique to each hash.
Hash31 charactersThe derived value that is stored and compared.

Worked example

A cost factor of 10 means 210 = 1,024 rounds of the key setup. Raising it to 12 means 4,096 rounds, four times the work. Each hash of the same password differs because the salt is random, but every one of them verifies against that password.

Limits to keep in mind

  • 72-byte limit. Bcrypt uses only the first 72 bytes of a password. Longer passwords are cut off, so the tool warns when a password is longer than that.
  • Cost is a trade-off. A higher cost slows attackers, but it also slows every login on your server.
  • Use it for storage, not transport. Bcrypt protects stored passwords. It does not encrypt anything sent over a network.

Frequently asked questions

Is this bcrypt generator free?

Yes. There is no sign-up and no limit on how many hashes you create or check.

Is my password sent or stored?

No. The hash is calculated in your browser and nothing is sent to a server. Fields are cleared when you click Clear or close the page.

Why is the hash different every time?

A new random salt is created for each hash. The salt is stored inside the hash, so checking still works.

Can I reverse a bcrypt hash?

No. A bcrypt hash cannot be reversed to get the password. An attacker has to guess passwords and hash each guess, which the cost factor makes slow.

Which cost factor should I choose?

Many systems use 10 to 12. Test how long a hash takes on your own server, and choose the highest cost that keeps logins comfortable.

Share this article