Bcrypt Hash & Verify
Generate bcrypt hashes with adjustable cost factor, or verify an existing hash against a password — runs entirely in your browser.
—
How to use
- Hash mode: type the password, choose cost (10 is the modern default), click generate.
- Verify mode: paste a hash starting with
$2a$,$2b$, or$2y$, type the candidate password, click verify. - Copy the hash.
About this tool
ShowHide
Bcrypt is the default choice for storing passwords: deliberately slow, and with the salt carried inside the hash string itself. This tool generates hashes at a cost factor from 4 to 14 — each step doubles the work, so 12 takes roughly 256 times as long as 4 — and verifies an existing hash against a candidate password. Because a fresh random salt is used every time, hashing the same password twice gives two different strings, and both still verify; that is the design working, not a bug. Hashes are produced with the $2b$ prefix, and verification also accepts the older $2a$ and $2y$ forms. Note that bcrypt only reads the first 72 bytes of a password, so anything past that does not affect the result. Everything runs in your browser via bcryptjs; the password never leaves the page.
Frequently asked questions
Which cost factor should I use?
10 is the modern default (~100ms on a server CPU). Use 12 for high-value secrets; 14 for offline-only secrets. Below 8 is too fast in 2026.
Why is cost 14 slow in my browser?
Each cost increment doubles the work. Cost 14 takes ~1–4s on a typical laptop — that's the point.
What's the difference between $2a$, $2b$, $2y$?
Format prefixes from different bcrypt implementations. All modern libraries verify all three interchangeably.
Is bcrypt still recommended in 2026?
Yes, with cost ≥10. Argon2id is preferred for new projects but bcrypt remains widely supported and safe at appropriate cost.
The same password gives a different hash every time. Is something wrong?
No — that is the design working. A fresh random salt goes into each hash, so two hashes of one password never match, and both still verify because the salt is stored inside the string. Identical hashes would mean no salt, which is what makes rainbow tables possible.
Does a very long passphrase make the hash stronger?
Only up to 72 bytes. Bcrypt reads no further, so everything past that point is ignored and two passphrases sharing their first 72 bytes verify against the same hash. Note that is bytes, not characters — accented letters and emoji reach the limit sooner.
Guides on this topic
- Hashing vs Encryption vs Encoding: What's the DifferenceThree terms that are constantly confused — hashing, encryption and encoding — explained clearly, with what each is for, when to use which, and the mistakes to avoid.
- Passwords and Passphrases: What Actually Makes One StrongWhy length beats symbol substitution, where password strength meters mislead, how passphrases work, and what two-factor authentication does and does not protect.
Related tools
Argon2 Hash Generator & Verifier (Argon2id)
Hash a password with Argon2id, Argon2i or Argon2d and get the $argon2id$ PHC string, or check a password against one. Runs in your browser.
Developer
PKCS#12 Keystore Inspector
Open a .p12 or .pfx in your browser: MAC and ciphers before the password, then the certificate chain, the private key, and whether they match.
Developer
File Hash (Checksum)
Compute SHA-1, SHA-256, and SHA-512 checksums of any file.
File
File Hash Verifier
Drop a file and paste an expected SHA-1 / 256 / 384 / 512 — see if the actual hash matches. Useful before installing downloaded binaries.
File
PBKDF2 Key Derivation
Derive a key from a password with PBKDF2-HMAC in your browser — pick the hash, iteration count and output length, and read the result as hex or Base64.
Developer
Hash Generator (SHA)
Generate SHA-1, SHA-256, SHA-384, and SHA-512 hashes from text.
Developer