Bcrypt Generator

Hash a password with bcrypt at the cost you choose, or check whether a password matches an existing $2a$, $2b$ or $2y$ hash.

Processed on your device. Files are not uploaded

How to make and check a bcrypt hash

  1. Choose hash or check

    Hash a new password, or check one against an existing hash.

  2. Type the password

    For a new hash, pick the cost. Each step up doubles the time.

  3. Copy the hash

    The hash holds the cost and salt, so store just this one string.

When to use Bcrypt Generator

You need a bcrypt hash for a seed user, a config file or an .htpasswd entry without writing a script.

A login fails and you want to know whether the stored hash really matches the password you expect.

Tips for a better Bcrypt Generator result

Raise the cost until a hash takes about a quarter of a second on your server, then use that cost in your app's settings.

When checking an old hash, copy it straight from the database, since a missing character or trailing space makes every check fail.

Bcrypt Generator: limits and what to check

Passwords longer than 72 bytes are cut silently by bcrypt, and accented or emoji characters count as several bytes each.

Hashes made here use the $2a$ prefix, which almost every library reads; PHP writes $2y$ and Node's bcrypt writes $2b$, and all three check the same way.

About Bcrypt Generator

bcrypt is a slow-by-design password hash that has protected passwords for decades. The cost sets how slow it is, which is what makes guessing expensive for an attacker. Checking reads the cost and salt from the hash, so any standard bcrypt hash from PHP, Node, Python or Ruby works.

FAQs

What cost should I use?

The highest your server can afford for each login, usually 10 to 12. The time shown is on this device; servers are often faster.

Why does the hash change every time?

Each hash gets a new random salt, so two users with the same password get different hashes. Checking still works.

What is the 72 byte limit?

bcrypt ignores everything after the first 72 bytes of a password. Very long passphrases need a different hash, such as Argon2.

Related tools