Skip to content

Bcrypt Hash Generator and Verifier

Generate bcrypt hashes with configurable rounds and verify passwords against existing bcrypt hashes.

Bcrypt Hash Generator and Verifier tool

Loading...

Example

Input: Password hunter2, Rounds (Cost Factor) 10, then Generate Hash

Result: A 60-character hash starting with $2b$10$, followed by a 22-character random salt and a 31-character hash; Rounds 10 (2^10 = 1,024 iterations)

A new random salt is used each time, so the same password never gives the same hash. Verify mode re-hashes the password with the salt stored in the hash and reports Match or No match.

Bcrypt Cost Factor and Work

CostRounds (2^cost)Work vs cost 10
4161/64
82561/4
101,0241x
112,0482x
124,0964x
138,1928x
1416,38416x
1665,53664x

Each step up doubles the time per hash. Measure actual times on your own server.

  1. Enter the password you want to hash.
  2. Set the Rounds (Cost Factor) slider. Higher values are slower and harder to attack.
  3. Click Generate Hash to create the bcrypt hash.
  4. To check a password, switch to Verify Hash, enter the password and paste the existing bcrypt hash.
  5. Click verify to see whether the password matches the hash.

Bcrypt Cost Factor and Password Hashing

This tool creates bcrypt password hashes and checks whether a password matches an existing hash. Bcrypt is a slow, salted way to store passwords. OWASP suggests a cost factor of at least 10, and 10 to 12 is common for web apps.

The cost factor sets the work per hash: 2 to the power of the cost. Cost 10 means 1,024 rounds of the expensive setup step, and each step up doubles the time. That delay hardly matters for one login, but it adds up fast for an attacker trying millions of guesses. Choose the highest cost your server can handle while logins stay quick. The slider runs from 4 to 16, and anything above 12 can take several seconds in a browser.

Each hash gets a new random salt, so the same password gives a different result every time. The output packs everything into 60 characters: the version ($2b$), the two-digit cost, a 22-character salt and a 31-character hash. To verify, the tool reads the cost and salt back out of the stored hash, hashes your password the same way and reports Match or No match. Hashes that start with $2a$, $2b$ or $2y$ can be checked.

Bcrypt only uses the first 72 bytes of a password and ignores the rest. The tool warns you when you go past that. Hashing runs in your browser with the bcryptjs library, and nothing is sent anywhere. Even so, test with sample passwords rather than live production ones. For fast checksums of files and text, which are not suitable for passwords, see the Hash Generator. To make a strong password to hash, use the Password Generator.

Sources

Frequently Asked Questions

Use at least 10, and pick the highest value that keeps a login check to a fraction of a second on your own server. Many apps land on 10 to 12. Measure it, because hardware varies. Each step up doubles the time, so cost 12 takes four times as long as cost 10. You can raise the cost later by rehashing when users next log in.
Bcrypt creates a new random salt for every hash and stores it inside the result. Different salts give different hashes, so two users with the same password get different values, and precomputed lookup tables are useless. Verification still works because the checker reads the salt from the stored hash and repeats the calculation.
Yes. SHA-256 is built to be fast, so a graphics card can test billions of guesses per second against it. Bcrypt is slow on purpose, adds a salt automatically and lets you raise the cost as hardware gets faster. A plain or even salted SHA-256 is not a safe way to store passwords.
They mark revisions that fixed bugs in some older bcrypt code. $2b$ is the current version from OpenBSD and is what this tool creates. $2y$ comes from PHP. For normal passwords, modern libraries treat all three the same when verifying, and this tool can check any of them.
OWASP now lists Argon2id as its first choice for new systems, because it also needs a lot of memory, which slows down attacks on graphics cards. Bcrypt is still a sound, widely supported option, especially where Argon2 is not available. Either is far better than a fast hash such as SHA-256 or MD5.

Related Tools

Password Generator

Generate strong, secure passwords with customizable length, character types, and multi-word passphrases.

Security and Encryption

Password Strength Checker

Check how strong your password is with a visual meter, entropy score, and estimated crack time.

Security and Encryption

Hash Generator

Create MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of text or files, right in your browser.

Security and Encryption

HMAC Generator

Generate HMAC signatures using SHA-256, SHA-384, or SHA-512 with custom secret keys for message authentication.

Security and Encryption

Text Encryption and Decryption

Encrypt and decrypt text using AES-256 encryption entirely in your browser. No data sent to servers.

Security and Encryption

RSA Key Pair Generator

Generate RSA public and private key pairs in PEM format using the Web Crypto API in your browser.

Security and Encryption