UtilDojo

Popular

Menu

Bcrypt Hash Generator — Create bcrypt Hashes Online

  • This tool runs entirely in your browser. Nothing you enter or upload is sent to a server.

0 of 72 bytes bcrypt reads

12 · 4,096 rounds

Mixed in with HMAC-SHA256 before bcrypt runs.

Everything runs in this tab. The password and the hash are never sent anywhere.

See also

About this tool

bcrypt turns a password into a 60-character string such as $2a$10$/uaF… that is safe to store in a database. It is deliberately slow, and the cost setting controls how slow: each step up doubles the number of rounds, so cost 12 does 4,096 rounds against 1,024 at cost 10.

Type a password, pick a cost between 4 and 15 and press Generate hash. The page shows the hash, the settings read back out of it and the time it took on your device, so you can see what each step of cost really costs. Most applications use 10 to 12; the aim is about 100 ms to 1 second per hash on the server that will run it. On a laptop, cost 10 takes about 65 ms, which is on the quick side, while cost 12 takes about 255 ms.

The hash contains its own salt, so generating it twice gives two different strings that both verify. If you add a pepper, the tool mixes it in with HMAC-SHA256 first, the common way to do it, so the same pepper has to be used when you check. To test a stored hash, use the Bcrypt Password Checker, which opens the same tool on its Check tab.

bcrypt reads only the first 72 bytes of a password, and the tool warns you if yours is longer. Timings on a phone or laptop will be slower or faster than on a server. Nothing you type leaves your browser.

Frequently asked questions

What bcrypt cost should I choose?

Choose the highest cost that keeps a single hash between about 100 ms and 1 second on your server. Cost 10 is the usual minimum and 12 is a common default today.

What do the parts of a bcrypt hash mean?

For `$2a$10$…`: `2a` is the version, `10` is the cost, the next 22 characters are the salt and the last 31 are the hash. A bcrypt hash is always 60 characters.

Why is the maximum password length 72 bytes?

bcrypt ignores everything after the first 72 bytes. Non-English characters take more than one byte each, so the limit can be reached sooner than 72 characters. A pepper step shortens the input, which avoids the problem.

Are bcrypt hashes from here compatible with other libraries?

Yes. The output is the standard format used by libraries such as bcrypt in Node and Python, PHP’s password_hash and Spring Security, and any of them can verify it.

Read the guide

Related tools