Cookies This site keeps only what it needs to work. There is no analytics and no advertising on it today, and nothing here follows you to other sites. Read the privacy policy

Choose what to allow
+92 312 8299940Free Quote
Free tool, works in your browser

Bcrypt Generator
Hash and Check Passwords Safely

Hash any password with this bcrypt generator, at the cost you choose, then check a password against any bcrypt hash, all without leaving your browser.

  • FreePrice
  • 4 to 16Cost
  • NoneSign-up
  • In your browserRuns

Bcrypt Generator

Hash a password with bcrypt, or check one against a hash

Hash a password
Check a password
Cost
10
Rounds
1,024
Time here
—

Ready. Type a password and press Hash it, or check one on the other side.

Your browser does all of the work here, in this tab. We upload nothing, store nothing and log nothing.
The basics

What This Bcrypt Generator Does

This bcrypt generator turns a password into a bcrypt hash, the format most websites use to store passwords. Pick a cost, type the password, and the hash appears in a moment, ready to paste into a database or a config file.

It also works as a bcrypt checker. Paste a hash from PHP, Node, Python, Laravel or Django, type a password, and you learn at once whether they match. Below that, a table explains every part of the hash.

Your browser handles every bit of the hashing. The password never travels to our server, which matters for a tool like this more than for almost any other.

How Bcrypt Works

Bcrypt was designed in 1999 to be slow on purpose. First, it adds a random salt, so two people with the same password still get different hashes. Then it runs an expensive key setup many times over, and the cost setting decides how many.

Diagram of a bcrypt hash split into its four parts: the $2b$ prefix, the cost 10, the 22-character salt and the 31-character hash
A bcrypt hash carries its own version, cost and salt.

The result is a 60-character string that holds everything needed to check a password later: the version, the cost, the salt and the hash itself. So your database needs only one column, and nothing else has to be stored.

Where Bcrypt Came From

Niels Provos and David Mazières presented bcrypt in 1999, and OpenBSD made it the default for its own passwords. Their key idea was simple: as computers get faster, raise the cost, so the hash keeps pace with the hardware. More than twenty years later, that idea still holds.

Hash a Password

Type the password in the first box and press Hash it. A bar shows the progress, because higher costs take real time. When it finishes, you see the hash, the time it took in your browser, and a breakdown of its parts.

Bcrypt generator hashing the password correct horse battery staple at cost 10, with the $2b$ hash shown below and the time it took
The hash, the time it took and a copy button.

Each press makes a new random salt. As a result, hashing the same password twice gives two different hashes, and both of them still check out. That is normal, and it is exactly what protects your users.

Test a Password Against a Stored Bcrypt Hash

To test a login, paste the stored hash and type the password you want to try. The checker reads the cost and salt from the hash, repeats the same work and compares the results. Within a moment, a green or red message tells you if they match.

Bcrypt checker confirming that a password matches a $2y$ hash, with a green match message
A clear match or no match, with the reason when it fails.

This helps when a login fails and you need to know why. For example, you can confirm that a reset worked, or that an imported hash from another system still accepts the right password.

Picking a Bcrypt Cost Factor That Fits Your Server

Each step of the cost doubles the work. Cost 10 means 1,024 rounds of setup, and cost 11 means 2,048, so each step doubles the time. The goal is a hash that takes your server about a quarter of a second, which is fine for one login but painful for an attacker trying billions.

Table explaining each part of a bcrypt hash: the algorithm prefix, the cost with its number of rounds, the salt and the hash
Every hash is taken apart and explained.

Most frameworks use 10 or 12 today, and PHP 8.4 raised its default to 12. The time shown here comes from your browser, so treat it as a rough guide. Your server may be faster or slower, therefore measure there before you settle on a number.

The 72-Byte Limit

Bcrypt ignores everything past byte 72 of a password. For normal passwords that never matters. However, long passphrases in languages such as Arabic or Chinese use two or three bytes per letter, so they can reach the limit sooner. The checks table warns you when a password goes past it.

What $2a$, $2b$ and $2y$ Mean

The prefix names the version of bcrypt. $2b$ is the current one from OpenBSD, and $2y$ is what PHP writes for the very same algorithm. $2a$ is the older name, which is still fine for any normal password.

In practice, all three check each other correctly here. If you see $2x$, though, the hash came from a buggy old PHP build, and you should rehash that password at the next login.

Bcrypt, Argon2 or SHA-256?

Never store passwords with a fast hash such as MD5 or SHA-256. A single graphics card can test billions of those every second. Bcrypt, scrypt and Argon2 are built to be slow and to resist that kind of hardware.

The OWASP password storage cheat sheet lists Argon2id first and bcrypt as a solid choice where Argon2 is not available. Since bcrypt is built into PHP, Laravel, Django, Rails and Spring, it is often the easiest safe option.

What Attackers Do With a Leaked User Table

Imagine an attacker copies your users table. With MD5 or SHA-1, most weak passwords are found in minutes, because those hashes are built to be fast. With bcrypt at cost 12, each single guess takes a real slice of a second, so the same attack takes years instead.

Here, too, the salt plays its part. Because every hash has its own salt, the attacker must attack each user one by one. Precomputed tables of common passwords, often called rainbow tables, become useless.

Upgrading Old MD5 Hashes to Bcrypt

You do not need every user to reset their password. Instead, at each successful login, check the old hash, then save a new bcrypt hash of the password they just typed. Over a few months, most active accounts move over on their own.

For the accounts that never log in again, you can wrap the old hash inside bcrypt, and then unwrap it at their next login. Either way, delete the old column once the move is done.

Using Bcrypt From Your Own Code

In PHP, call password_hash with PASSWORD_BCRYPT and check with password_verify, as the PHP manual for password_hash shows. In Node, the bcrypt and bcryptjs packages do the same, and Python has the bcrypt package.

Whatever the language, never compare hashes with a plain string check, and never build the hash yourself from pieces. Instead, use the library’s verify function, which also handles old prefixes and costs.

How Safe Is the Denwix Bcrypt Generator?

Yes. The whole bcrypt algorithm runs in this page, and the salt comes from your browser’s secure random source. No password or hash is sent anywhere, so the page even keeps working if you go offline after it loads.

Still, treat real passwords with care. Use this page to test, learn and set up accounts, but let your application do the hashing for live users. For new passwords, our password generator makes strong ones, and the Wikipedia article on bcrypt covers its history in depth.

Four steps

How to Make a Bcrypt Hash

At the default cost, the hash is ready in a fraction of a second.

  • 1

    Pick a cost

    A cost of 10 makes a sensible starting point. A cost of 12 resists attacks better, though each login takes longer.

  • 2

    Type the password

    Press Show to see the password you entered.

  • 3

    Press Hash it

    A bar shows the progress for higher costs.

  • 4

    Copy or test it

    Copy the hash, or check it on the other side.

Why this one

Made for Developers Who Take Password Storage Seriously

A basic bcrypt hash tool sends your password to a server. This one does not, and it explains what it makes.

  • Hash and check

    Make a hash, or test a password against one.

  • Never uploaded

    Bcrypt runs in your browser from start to finish.

  • Every prefix

    $2a$, $2b$ and $2y$ from any language.

  • Parts explained

    Prefix, cost, salt and hash, row by row.

  • Honest warnings

    Low cost, short passwords and the 72-byte limit.

  • Tested against PHP

    Matches OpenBSD test values and PHP’s password_hash.

Good habits

Tips for Storing Passwords With Bcrypt

Follow these, and a stolen database stays a dead end.

  • Use cost 10 or higher. Aim for about a quarter of a second on your server.
  • Let the library salt it. Never make or reuse salts by hand.
  • Verify, do not compare. Use the library’s verify function, not a string check.
  • Rehash when you log in. Upgrade old costs and prefixes after a correct password.
  • Store the whole string. Keep all 60 characters in one column.
  • Mind the 72 bytes. Very long passwords are cut, so warn users early.
Common slips

Six Mistakes With Bcrypt

Each one weakens logins or breaks them.

  • Storing passwords as MD5 or SHA-256 digests

    Fast hashes fall to guessing in hours.

  • A cost factor nobody ever raises

    Hardware gets faster, so raise the cost over time.

  • A database column below 60 characters

    A cut hash never matches again.

  • Trimming the password

    Stripping spaces at signup but not at login breaks it.

  • Hashing twice

    A hash of a hash can make old logins fail.

  • Sending passwords to online tools

    Use tools that run in your browser, like this one.

Questions

Bcrypt Generator Questions People Ask

How do I create a bcrypt hash?

Type the password, pick a cost and press Hash it. The 60-character hash appears in a moment.

How do I check a password against a bcrypt hash?

Paste the hash, type the password and press Check. The result reads either match or no match.

Is there any way to reverse a bcrypt hash back into the password?

No. Bcrypt is one-way. You can only test a guess, and the cost makes each guess slow.

Why does bcrypt give a new hash for the same password on each run?

Every bcrypt hash receives a fresh random salt. Both hashes still accept the same password.

Which bcrypt cost factor suits a login system in 2026?

10 is the common minimum and 12 is a good choice for most servers today.

Is $2y$ the same as $2b$?

Yes. $2y$ is the name PHP uses for the same algorithm, and this tool checks both.

Does bcrypt stop reading after 72 bytes?

Yes. Bcrypt ignores everything past byte 72 of a password, and the tool warns you past that.

Does it work with Laravel and Django hashes?

Yes. They use standard bcrypt strings, so you can paste them straight into the checker.

Is bcrypt still secure?

Yes, with a cost of 10 or more. Argon2id is newer, but bcrypt remains a solid choice.

Does the Denwix bcrypt page send my password to a server?

No. Hashing and checking both happen in your browser, and nothing leaves the page.

More free tools

More Tools for Security

Handy next steps for passwords, hashes and IDs.

  • Password Generator

    Tough passwords and word-based passphrases, generated on your own device.

    Open tool →
  • Hash Generator

    MD5, SHA-1, SHA-256 and more for any text or file.

    Open tool →
  • UUID Generator

    Versions 1 to 7 in bulk, with a checker.

    Open tool →

Ready to Hash Your Password?

Type it, pick a cost and press Hash it. This bcrypt generator is free, needs no account and works in your browser.