Bcrypt Password Hash Generator: Online Hash & Verify Tool
Generate bcrypt password hashes with adjustable cost factor, and verify passwords against existing hashes. Industry-standard for secure storage.
Updated 2026-08-16
Related Tools
SHA-256 Hash Calculator: Bitcoin & HTTPS Standard Hash
SHA-512 Hash Calculator: 512-bit Maximum Security Hash
MD5 Hash Calculator: Online Generator & Checksum Verifier
Adler-32 Checksum: zlib & PNG Fast Integrity Check
BLAKE2b-256 Hash: Faster Than MD5, Secure as SHA-3
BLAKE2b-512 Hash: 512-bit High-Speed BLAKE2 Hash Online
Features
- Generate bcrypt password hashes instantly
- Adjustable cost factor (rounds 4–16) for future-proof hash strength
- Built-in password verification against existing bcrypt hashes
- Industry-standard salt generation: unique salt per hash, no configuration needed
- One-click copy hash to clipboard
- Password strength estimation: visual indicator shows weak/fair/good/strong rating alongside the hash
- Cost factor timing estimation: displays estimated computation time for the selected rounds value
- Detailed hash breakdown: view the version, cost factor, salt, and hash body separately for educational purposes
- 72-byte truncation warning: alerts when input exceeds bcrypt's 72-byte limit
How to Use
- 1Select a mode: Hash (generate a new hash) or Verify (check a password against an existing hash).
- 2In Hash mode, type or paste your password into the input field and adjust the cost factor slider.
- 3Click Generate; your bcrypt hash appears instantly with the salt and cost embedded.
- 4Click the copy icon to copy the full hash string (e.g. $2b$10$...).
- 5In Verify mode, enter both the password and the bcrypt hash, then click Verify to check for a match.
- 6How to choose the right cost factor: start with 10 (default) for most applications. Increase to 12 for sensitive data. Use 14+ only if you can tolerate 1+ second hashing time on your target hardware.
- 7How to verify an existing password hash from your database: switch to Verify mode, paste the stored bcrypt hash, enter the user's password, and click Verify. The tool extracts the salt and cost automatically.
- 8How to read a bcrypt hash: $2b$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy; the version is $2b$, cost is 10, followed by 22-character salt and 31-character hash body.
- 9How to handle the 72-byte limit: bcrypt only processes the first 72 bytes of your password. For longer passwords, consider pre-hashing with SHA-256 before bcrypt, or use a bcrypt variant that supports longer inputs.
- 10How to test password strength: type a password and observe the strength indicator. A strong password combined with cost factor 10+ provides strong protection against brute-force attacks.
Frequently Asked Questions
What is bcrypt and why is it used for passwords?
Bcrypt is a password hashing function designed by Niels Provos and David Mazières in 1999. It incorporates a salt to protect against rainbow table attacks and an adjustable cost factor that makes it deliberately slow, thwarting brute-force attacks even as hardware improves. It is the industry standard for password storage. (See: bcrypt paper (1999))
What does the cost factor (rounds) mean?
The cost factor (also called rounds) controls how computationally expensive the hash is. Each increment doubles the time required. A cost of 10 (default) runs 2^10 = 1024 rounds. For most applications, 10–12 is recommended. Higher values (14+) provide stronger protection but may cause noticeable delays on slower devices. (See: bcrypt paper (1999))
Why is bcrypt better than SHA-256 for passwords?
SHA-256 is designed to be fast, which makes it vulnerable to brute-force and GPU-accelerated attacks. Bcrypt is deliberately slow and includes a unique salt per password, preventing rainbow table attacks. Even a modest cost factor of 10 makes bcrypt hundreds of times slower than a single SHA-256 pass.
Can I verify a password from my database?
Yes. Use the Verify mode: paste the existing bcrypt hash from your database along with the password. The tool extracts the salt and cost from the hash and recomputes it to check for a match. Your data stays entirely in your browser.
What does a bcrypt hash look like?
A bcrypt hash follows the format: $2b$<cost>$<22-char-salt><31-char-hash>. For example: $2b$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy. The components are: version ($2b$), cost factor (10), 22-character base64 salt, and 31-character base64 hash.
Can bcrypt hashes be cracked?
Bcrypt is designed to resist cracking by being deliberately slow. However, weak passwords can still be cracked through dictionary attacks, even with bcrypt. Always use strong, randomly generated passwords combined with an appropriate cost factor (10+).
What is the difference between $2a$, $2b$, and $2y$ versions?
$2a$ was the original version. $2b$ (current standard) fixed a bug in $2a$ related to handling of non-ASCII characters. $2y$ is a PHP-specific variant. Most modern systems use $2b$, and this tool generates $2b$ hashes.
How does bcrypt's salt work?
Bcrypt automatically generates a cryptographically random 128-bit (22-character base64) salt for every hash. This salt is embedded in the hash output string, so you don't need to store it separately. The salt ensures that identical passwords produce different hashes.
Can I use bcrypt for API authentication?
Yes, but bcrypt is slower than HMAC-based approaches. For API authentication where speed matters, consider using HMAC-SHA256 with a per-user secret. Reserve bcrypt for password storage in databases and user authentication workflows.
Is bcrypt vulnerable to GPU attacks?
Bcrypt's design inherently resists GPU acceleration because it requires significant memory and has a complex initialization phase. Unlike SHA-256 (which GPUs can compute millions per second), bcrypt's structure makes it about as fast on a GPU as on a CPU, a major security advantage.
What happens to passwords longer than 72 bytes?
Bcrypt silently truncates input to the first 72 bytes. Characters beyond 72 bytes are ignored. To work around this, either pre-hash the password with SHA-256 before bcrypt, or use a modern algorithm like Argon2id that doesn't have this limitation.
Should I use bcrypt or Argon2id for new projects?
Both are excellent choices. Argon2id is the winner of the Password Hashing Competition (2015) and is considered the modern standard. Bcrypt remains widely supported and is easier to find in legacy systems. For new projects, Argon2id is recommended; for maximum compatibility, bcrypt is a proven alternative.
I lost my password and only have the bcrypt hash: can you recover it?
No. Bcrypt is one-way by design. There is no decryption, and no tool, online or offline, can turn a hash back into the original password. The only option is to test candidate guesses against the hash: a weak password might be found by dictionary attack, but a strong one is effectively unrecoverable. If a user forgets their password, reset it and store the new hash.
Can I trust an online bcrypt generator with a real password?
With this page, yes: hashing runs entirely in your browser and nothing is sent over the network; you can confirm this with your browser's network inspector. That said, for production systems you should hash passwords in your own server code with a maintained library, and never paste real user passwords into a website you have not inspected.
The same password produces different hashes every time: is the tool broken?
No. That is bcrypt working correctly. Each hash embeds a randomly generated 22-character salt, and the salt changes the output even for identical passwords. Verification still succeeds because Verify mode reads the salt and cost factor out of the hash itself. If two hashes for the same password were identical, that would be the bug; it would mean the salt was not random.
Verify says 'no match' but the password is definitely right: how do I fix this?
Work through the checklist: copy the full hash including the $2b$ prefix (a truncated hash always fails); make sure the version matches: $2a$ hashes from older systems verify fine, while a $2y$ prefix may need normalizing; and check for stray spaces or a trailing newline from paste. Also confirm the cost factor: any value verifies, it is just slower for 14+. If it still fails, generate a fresh hash and verify against that.