{ Bcrypt Generator }

// hash and verify passwords with bcrypt — browser-based

Generate and verify bcrypt password hashes in the browser. Configurable cost factor, salt preview, hash anatomy breakdown, timing info. Free, no signup, your password never leaves your device.

// PASSWORD INPUT
// COST FACTOR
4 16
🔒 Processed entirely in your browser. Your password never leaves your device.
// RESULT
🔒

Bcrypt hash appears here

Enter a password and click Hash to begin

HOW TO USE

  1. 01
    Enter password and cost

    Type a password and choose a cost factor (10–12 recommended for production). Higher cost means more iterations and longer computation — but significantly harder to crack.

  2. 02
    Generate the hash

    Click "Hash Password". The hash is computed in your browser using a pure-JS bcrypt implementation. The timing shows how long it took at the chosen cost factor.

  3. 03
    Verify passwords

    Switch to the Verify tab. Paste a bcrypt hash and enter the original password — the tool confirms whether they match, using the same secure comparison logic.

FEATURES

Bcrypt Hashing Password Verify Cost Factor 4–31 Hash Anatomy Timing Info Cost Timing Table Copy Hash Free & No Signup

WHY BCRYPT?

Bcrypt is designed to be slow. Unlike MD5 or SHA-256, which can run billions of times per second on a GPU, bcrypt is intentionally computationally expensive. The cost factor lets you tune this — doubling cost = double the computation. As hardware gets faster, you increase the cost to maintain attack resistance.

WHAT IS THIS?

A bcrypt hash contains three parts: the algorithm version ($2b$), the cost factor ($12$), and a 53-character string combining a 22-character salt with the 31-character hash output — all encoded in a modified Base64 alphabet. The hash is 60 characters total. Every call produces a different hash due to the random salt, but all verify correctly.

RELATED TOOLS

FREQUENTLY ASKED QUESTIONS

What cost factor should I use?

For production user authentication, cost factor 12 is the current standard recommendation. At cost 12, hashing takes roughly 250ms on a modern server — fast enough for users not to notice, slow enough to make brute-force attacks expensive. Increase by 1 every few years as hardware improves. Never go below 10 for real passwords. The default here is 12.

Why does hashing take so long at high cost factors?

Bcrypt runs the Blowfish cipher setup routine 2^cost times. At cost 10, that's 1024 iterations. At cost 12, 4096. At cost 16, 65536. This deliberate slowness is the security mechanism — an attacker who steals your password database can only test as many guesses per second as your hardware allows (roughly the same as your server), making offline dictionary attacks impractically slow.

Why does the same password produce different hashes?

Each call to bcrypt generates a fresh random 16-byte salt, which is mixed into the hash. The salt is stored inside the 60-character bcrypt string, so the verification function can extract it. Two hashes of the same password differ because they used different salts, but both verify correctly against the original password. This prevents rainbow table attacks.

What is the difference between $2a, $2b, and $2y?

$2a$ is the original bcrypt version. $2b$ fixes a bug in the handling of 8-bit characters in passwords — it is the current correct version produced by OpenBSD and most modern libraries. $2y$ is a PHP-specific variant that is equivalent to $2b$. All three verify correctly against each other in modern implementations. This tool always produces $2b$.

Is the password sent to a server?

No. All bcrypt computation happens entirely in your browser using a pure-JavaScript implementation. Your password, the generated hash, and the salt never leave your device. The computation is done by your browser's JavaScript engine, not by any remote server. You can verify this by using the tool offline after the page has loaded.

Can bcrypt be reversed or cracked?

Bcrypt is a one-way function — there is no mathematical way to reverse it. Cracking requires brute-force guessing. At cost 12, even a specialized GPU cracking rig can only test around 5,000–20,000 guesses per second per card (vs billions per second for MD5). A strong password with cost 12 is practically uncrackable. Weak passwords remain vulnerable — bcrypt protects against offline attacks, not weak password choices.

Bcrypt Generator — Secure Password Hashing Explained

Bcrypt was designed in 1999 by Niels Provos and David Mazières specifically for password hashing. Unlike general-purpose hash functions (MD5, SHA-256) that optimize for speed, bcrypt optimizes for slowness — deliberately consuming CPU cycles through its key setup phase. This property makes bcrypt fundamentally resistant to the GPU-accelerated cracking techniques that have made MD5 and SHA-1 password hashes practically worthless for security.

The Cost Factor — Future-Proofing Security

The cost factor is bcrypt's key innovation. It is stored inside the hash itself ($12$ means cost 12), and the verifier uses the stored cost to perform the same number of iterations. This means you can increase the cost factor over time as hardware improves — old hashes remain verifiable at their original cost, while new hashes use the higher cost. Most authentication libraries support transparent re-hashing: when a user logs in successfully, the old hash is replaced with a new higher-cost hash.

What Bcrypt Does Not Protect Against

Bcrypt protects your stored passwords if your database is leaked — an attacker who obtains the hash file cannot reverse the hashes or test guesses at GPU speed. However, bcrypt does not protect against: weak passwords (an attacker can still guess password123 quickly), credential stuffing (trying stolen credentials from other sites), phishing, or server-side vulnerabilities that expose passwords before hashing. Password security requires both strong hashing and strong passwords.

☕