Bcrypt Hash Generator & VerifierPrivacy: All processing runs locally
Generate bcrypt password hashes, verify passwords against existing hashes, inspect cost factor, salt, and digest — entirely in your browser.
How Bcrypt Works
Bcrypt is a password hashing function designed by Niels Provos and David Mazières in 1999, based on the Blowfish cipher. It is not encryption — a bcrypt hash cannot be reversed to recover the password.
Each bcrypt hash includes a variant ($2a$, $2b$, or $2y$), a cost factor, a 22-character salt, and a 31-character digest. Because the salt is different each time, the same password always produces a different hash.
Cost Factor
The cost factor controls how many rounds of key expansion are performed: 2cost rounds. Higher cost makes hashing slower, which increases resistance to brute-force attacks. A cost of 10 means 1,024 rounds; cost 12 means 4,096 rounds.
72-Byte Password Limit
Most bcrypt implementations silently truncate the password input to 72 bytes. Characters like ü (2 UTF-8 bytes) and 🙂 (4 UTF-8 bytes) consume multiple bytes. A 72-character ASCII password fits, but passwords with multi-byte characters may be truncated sooner.
Verification
To verify a password, bcrypt extracts the salt and cost from the stored hash, recomputes the hash with the candidate password, and compares the results. You never compare hash strings directly.
Production Use
Bcrypt is widely supported in many frameworks. For new systems, Argon2id is generally preferred. scrypt and PBKDF2 are also common alternatives.
FAQ
Can I decrypt a bcrypt hash?
No. Bcrypt is a one-way function. The password cannot be recovered from the hash.
Is it safe to paste a real password here?
This tool runs entirely in your browser — nothing is sent to any server. However, avoid pasting real production passwords into any online tool. Use test passwords.
Should I hash passwords in the browser before login?
No. If you hash in the browser and send the hash, the hash becomes the password. Hash on the server side.
What is a salt?
A random value mixed into the hash. It ensures identical passwords produce different hashes. In bcrypt, the salt is embedded in the hash string.
Why does the same password produce different hashes?
Because bcrypt generates a new random salt each time. The salt is stored inside the hash string, so verification still works.
Which algorithm should I use in production?
Follow your platform's current security guidance. Argon2id is generally recommended for new systems. Bcrypt is well-established and widely supported. PBKDF2 is used where compliance matters.
Why is hashing slow?
Intentionally. Slow hashing makes brute-force attacks impractical. In the browser, cost 10–12 is typically manageable.
What do cost factor numbers mean?
The cost is an exponent: 2^cost rounds. Cost 10 = 1,024 rounds, cost 12 = 4,096, cost 14 = 16,384. Each increment doubles the work.