Bcrypt Hash Generator and Verifier
EncodingEverything runs locally in your browser — nothing is uploaded
Generate or verify bcrypt password hashes — the scheme you should be using for stored passwords today, alongside scrypt and Argon2. Its point is not speed but deliberate slowness: each step of the cost factor doubles the work, doubling an attacker's brute-force cost, while a legitimate login pays only tens of milliseconds. The hash string already carries the algorithm marker, cost factor and salt, so nothing extra needs storing — keep the whole string in your users table. This tool emits the `$2y$` prefix (what PHP's password_hash uses) and accepts `$2a$` and `$2b$` when verifying — all three are equivalent on standard input. Everything is computed locally; neither password nor hash is uploaded.
Features
- Both directions: generate a hash, or verify a password against one
- Adjustable cost factor from 4 to 15, with the rough timing of each shown
- Emits the `$2y$` prefix (PHP-compatible) and accepts `$2a$` / `$2b$` when verifying
- The hash carries its own salt and parameters — nothing else needs saving
- A fresh random salt each time, so the same password hashes differently every run
- A wrong length or format is explained specifically, rather than a bare "verification failed"
How to use
- Choose the mode: generate or verify
- Set the cost factor when generating; paste the existing hash when verifying
- Paste the password into the input box
- Press Ctrl/⌘ + Enter or click Run, then copy the result
FAQ
- What cost factor should I use?
- The default of 10 (about 60 ms) suits the vast majority of cases. The trade-off is "how long does my server wait per verification" against "how long does an attacker compute per attempt" — the same number, which is why you cannot simply crank it up. 12 is a common choice; 15 makes each verification approach two seconds and will visibly strain a busy site. For stronger protection, switch to scrypt or Argon2, which can demand more memory at the same wall-clock cost — and memory is exactly the resource attackers struggle to scale.
- Why does the same password produce a different hash each time?
- Because a random salt is generated every time and embedded in the hash string (the 22 characters after `$2y$10$`). That is what defeats rainbow tables: without a salt, an attacker precomputes hashes of common passwords once and looks up every matching record at once. With a per-record random salt, the same password hashes differently in every row, and that table is useless. So different output on each run is correct behaviour, not a bug.
- When verification fails, how do I tell a wrong password from a malformed hash?
- This tool distinguishes them. A malformed hash (no `$2y$` prefix, or not 60 characters) reports specifically that it is not a bcrypt hash and shows the expected format. A well-formed hash that simply does not match reports "no match". Also note that copying a hash out of a database often drags in whitespace or a newline — that is trimmed automatically at both ends.
- What are bcrypt's limitations?
- Two are worth knowing. First, it truncates at 72 bytes, so the tail of a longer password is ignored — "a longer password is safer" does not hold for bcrypt (this tool will not error on it, but you should know). Second, it consumes CPU but not memory, which makes GPU-parallel cracking comparatively cheap — precisely the problem scrypt and Argon2 were designed to fix. For an ordinary website bcrypt remains entirely adequate; where the cryptographic bar is higher, use Argon2id.
Related tools
Scrypt
EncodingGenerate or verify scrypt password hashes in PHC format. Output as PHC, hex or Base64; hitting the memory ceiling warns, not silently lowering parameters.
Hash
EncodingCompute MD5, SHA-1, SHA-256, SHA-512 or MD4 digests of any text, hashed as UTF-8 bytes so they match openssl exactly. Runs in your browser.
Database Passwords
EncodingGenerate PostgreSQL md5 and MySQL/MariaDB mysql_native_password hashes, each with a ready-to-run SQL statement.
Base64
EncodingConvert text to Base64 and back, with correct UTF-8 handling for accents, CJK and emoji. Runs entirely in your browser — nothing is uploaded.
URL Encode
EncodingEscape text into %XX form and back again, treating a whole URL and a single parameter value as different jobs. Runs entirely in your browser.
HTML Entities
EncodingTurn < > & and quotes into HTML entities and decode them back in a single pass, so &lt; becomes <, not an angle bracket. Runs in your browser.