Productivity and Utilities

Bcrypt Hash Generator

Make or check a bcrypt password hash with a cost factor you choose.

Create a hash

Typed here only. It never leaves your device. Only the first 72 bytes are used.

Check a password against a hash

bcrypt turns a password into a 60 character hash that includes a random 16 byte salt and a cost. Every increase of the cost by 1 doubles the work, so a higher cost makes guessing slower, and also makes this page slower. The hash starts with $2b$, then the cost, then the salt and the result. Only the first 72 bytes of a password count in bcrypt. The work is done by code running in this page, and nothing you type is sent anywhere or stored. To protect real accounts, hash passwords on your own server with a well tested library.

Next step

How to use the bcrypt hash generator

  1. Under Create a hash, type a password and choose a cost. Tick Show the password to check what you typed.
  2. Press Create hash. A progress bar shows the work, and the 60 character hash appears with the time it took. Press Copy hash to copy it.
  3. To test a password, paste a hash in Check a password against a hash, type the password, and press Check password. The result says Match or No match.
  4. Each hash has its own random salt, so creating a hash twice from the same password gives two different hashes that both check as a match.

What a bcrypt hash looks like

The password "password" at cost 4 with a particular salt gives $2b$04$erB5dESMt6duLd/ZyhVvS.Vtj2Or.G7WpE8E.3G3.7SnEaddhAO4O. The hash is 60 characters. The part $2b$ is the version, 04 is the cost, the next 22 characters are the salt, and the last 31 characters are the hashed result. Checking "password" against it says Match, and checking "Password" says No match.

At cost 10 there are 1,024 rounds of the key setup, so a hash takes roughly a fraction of a second here, and each step up in cost doubles that. The results above were checked against two other bcrypt programs, the Python bcrypt package and the operating system's own library, and every hash was identical.

What bcrypt does

bcrypt is a password hashing function designed to be slow on purpose. It builds on the Blowfish cipher and repeats an expensive key setup 2 to the power of the cost times. A random 16 byte salt is mixed in, so two people with the same password get different hashes and a prepared table of hashes is useless. The cost can be raised as computers get faster.

A hash cannot be turned back into the password. To check a login, the system hashes the typed password with the salt and cost stored in the saved hash and compares the result. That is what the checker here does, and it compares all characters of the result in constant time.

Limits to know about

bcrypt reads at most 72 bytes of a password, and characters beyond that make no difference. Accented letters and emoji take two to four bytes each, so the limit can be reached with fewer than 72 characters. The page tells you when your password is longer than the limit. Some systems hash a long password with another function first to get around this.

The cost on this page runs from 4, which is fast and only for testing, to 14, which can take several seconds in a browser. A suitable cost for real use depends on your servers, and you should test on the hardware you use. This tool makes the $2b$ form and can check $2a$, $2b$ and $2y$ hashes. For plain digests such as SHA-256, use the hash generator. To make a strong password, see the password generator and the password strength checker.

Privacy

Everything runs in your browser. The password and the hash are not sent anywhere and are not stored. Even so, do not type a password you use for a real account into any website you do not control, and use this page for learning, testing and checking examples. To protect real accounts, hash passwords on your own server with a well tested library.

Assumptions and limits

  • The salt is 16 random bytes from your browser's secure random generator.
  • The cost is a whole number from 4 to 14, and the work doubles with each step.
  • Only the first 72 bytes of the password are used, as UTF-8 text with a zero byte added when it fits.
  • Hashes are made in the $2b$ form. The checker accepts $2a$, $2b$ and $2y$.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

What cost should I choose?

Choose the highest cost your server can afford for a login without making users wait too long, and test on your own hardware. Each step doubles the time. A cost of 4 is only for tests.

Why does the same password give different hashes?

Every hash includes a new random salt. Both hashes still check as a match for the password, because the checker reads the salt from the hash it is given.

Is a bcrypt hash encryption?

No. Encryption can be reversed with a key. A hash is a one way fingerprint of the password, and the only way to find the password is to guess and hash again.

Why is there a 72 byte limit?

It comes from the design of bcrypt, which uses a key of at most 72 bytes. Longer passwords are cut off, so two passwords that share their first 72 bytes make the same hash with the same salt.