🔒 100% private — runs in your browser, nothing is uploaded

Bcrypt Generator

Generate and verify bcrypt password hashes in your browser — a hand-written Blowfish implementation, tested against the OpenBSD reference vectors.

bcrypt (Provos and Mazières, 1999) hashes passwords by running the EksBlowfish key schedule: the Blowfish cipher&rsquo;s P-array and S-boxes — the hexadecimal digits of pi — are expanded with your password and a 16-byte salt, then re-expanded 2<sup>cost</sup> times, and finally the text “OrpheanBeholderScryDoubt” is encrypted 64 times to produce the hash. The implementation on this page is hand-written JavaScript, and it is verified against the published OpenBSD / crypt_blowfish regression vectors, exactly: hashing the password U*U with the salt $2a$05$CCCCCCCCCCCCCCCCCCCCC. produces $2a$05$CCCCCCCCCCCCCCCCCCCCC.E5YPO9kmyuRGyh0XouQYb4YMJKvyOeW, and the companion vectors for U*U* and U*U*U reproduce character for character as well. That matters: a bcrypt that merely looks right but differs in one S-box entry would produce hashes no other system could verify.

bcrypt is deliberately slow: at the default cost of 10 the key schedule runs 1,024 expansion rounds, and at cost 12 it runs 4,096 — so a hash may take a moment to appear, especially at the higher costs. That slowness is the point: it is what makes guessing passwords against a stolen hash expensive. Your password never leaves this device, is never stored, and is cleared from page memory when you close the page. The implementation on this page is hand-written JavaScript (Blowfish + EksBlowfish) and is tested against the published OpenBSD / crypt_blowfish regression vectors.

Quick answers

How do I generate a bcrypt hash?

Enter a password, pick a cost (10 is the standard default), and generate: you get a 60-character $2b$ hash with a fresh random salt included. Hashing U*U against the published test salt $2a$05$CCCCCCCCCCCCCCCCCCCCC. gives $2a$05$CCCCCCCCCCCCCCCCCCCCC.E5YPO9kmyuRGyh0XouQYb4YMJKvyOeW — the OpenBSD reference value, reproduced exactly.

The implementation is hand-written JavaScript (Blowfish + EksBlowfish) checked against the crypt_blowfish regression vectors, so its hashes verify in any standard bcrypt library.

How does bcrypt verification work?

The hash carries its own recipe — version, cost and salt in the first 29 characters. Verification re-hashes the candidate password with that stored salt and cost and compares the full 60-character strings; a match proves the password, without anything being decrypted.

That is also why two hashes of one password differ (different random salts) yet both verify.

How to use

  1. Enter the password to hash. It is read as UTF-8 text and, per the bcrypt standard, a trailing NUL byte is added inside the key schedule.
  2. Pick a cost factor — 10 is the usual default. Each step up doubles the work: cost 12 is four times slower than cost 10, for you and for an attacker alike.
  3. Press Generate hash and wait a moment: bcrypt is slow on purpose. The result is a standard 60-character $2b$ hash with a fresh random 16-byte salt baked in.
  4. To verify, paste any bcrypt hash and a candidate password and press Verify — the tool re-hashes with the salt and cost stored inside that hash and compares the full strings.

About this tool

Reading a hash tells you its whole recipe: $2b$ is the version, the next two digits are the cost, the following 22 characters are the salt in bcrypt&rsquo;s own base64 alphabet (./A–Z a–z 0–9 — not the standard base64 alphabet), and the last 31 characters are the hash itself. Because the salt is random and stored in the clear, the same password hashes differently every time, and verification is just re-running the recipe. Two limits to know: bcrypt only uses the first 72 bytes of a password (anything longer is silently ignored by the algorithm), and a hash is only as strong as the password — cost raises the price of guessing, it does not make a weak password safe. Check how a candidate password holds up with the Password Strength Checker (/password-strength/) before you hash it. Your password never leaves your device.

Frequently asked questions

What cost factor should I use?

Cost 10 is the long-standing default and takes a fraction of a second here; 11–12 is the cautious choice for anything new. Each +1 doubles the work for everyone. Going below 8 saves milliseconds and gives them back to an attacker with a stolen hash file, so the interesting range on this page is 10–12.

Why does the same password produce a different hash each time?

A fresh random 16-byte salt is generated for every hash and mixed into the key schedule, then stored inside the hash string itself (the 22 characters after the cost). Different salt, different hash — which is why verification works by re-hashing with the stored salt and comparing, never by decrypting anything.

Can this verify hashes made by other tools?

Yes — that is the point of reproducing the reference vectors exactly. Paste a $2a$, $2b$ or $2y$ hash from any standard implementation (PHP password_hash, Python bcrypt, htpasswd) and a password, and Verify re-runs the same algorithm with the salt and cost embedded in your hash.

Is my password sent anywhere or stored?

No. The Blowfish implementation runs entirely in this page on your device; the password is never uploaded, stored or written into the page address, and it is cleared from page memory when you close the page.

📦 Embed this tool on your site

<iframe src="https://verystep.com/embed/bcrypt-generator/" title="Bcrypt Generator" width="100%" height="520" loading="lazy" style="border:0"></iframe>

Free to use. The embed shows a small "Powered by Verystep" link.

First time embedding? Read the step-by-step guide →

More free tools