Bcrypt Generator
Hash and Check Passwords Safely
You can use the bcrypt generator to generate a hash for a given password using the cost of your choice. You may then use the same tool to compare a password to a previously generated bcrypt hash, while remaining in your web browser.
- FreePrice
- 4 to 16Cost
- NoneSign-up
- In your browserRuns
Bcrypt Generator
Hash a password with bcrypt, or check one against a hash
- Cost
- 10
- Rounds
- 1,024
- Time here
- —
Ready. Type a password and press Hash it, or check one on the other side.
| Part | Value | Meaning |
|---|
| Result | Check | Details |
|---|
Keep secrets secret
The result is made in your browser and never sent to us. Store passwords in a password manager, not in plain text, and never reuse one across sites.
Guides for this tool
Articles with worked examples, tables and a short video that help you get more from this tool.
Building a Password That Is Hard to CrackHow to make a strong password: what makes one strong, easy methods, examples, and password managers.
9 minutes of reading · video guide inside
What This Bcrypt Generator Does
The bcrypt generator creates a bcrypt hash from a password. Most web sites create hashes using bcrypt for storage of passwords. Choose a cost, type your password and in seconds you will have the hash. You can then copy it and paste it into either a database or a configuration file.
It is also used to verify whether a given password matches the bcrypt hash (created using PHP, Node, Python, Laravel or Django). Once you enter the hash into the input field and enter the password, you will be notified instantly if they match. A table below shows what each component of the hash represents.
The entire hashing process is handled by your browser. No part of the password is sent to our server, and this is especially important when using a tool such as this one compared to virtually all other tools.
How Bcrypt Works
Bcrypt was created in 1999 to take a long time. It does this by first adding a randomly generated "salt" to each user’s password, which means even if two users have the same password, they will have unique hash values. It also performs a very expensive key setup many times depending upon the user’s choice of "cost."
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
In 1999, Niels Provos and David Mazières introduced bcrypt to the world, and OpenBSD quickly adopted it as their standard password hashing algorithm. Their basic concept was straightforward – use increased computation to maintain security with ever faster computer hardware. This principle is still valid over two decades later.
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.

Every time you use the press it generates a new random salt. So, if you hash the same password two times you will produce two separate results, but both will still be valid. This is standard behavior and is the way your users are protected.
Check A Password Against A Saved 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.

This is useful when a login fails and you need to work out the cause of the failure. For example, this will allow you to verify whether a password reset was successful, and if a hash that has been imported from another system is accepted by the correct 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.

The most frameworks now use 10 or 12 and PHP 8.4 increased its default setting to 12. The time displayed in the above example is based on what is given by your browser, thus, consider the time as an estimate. Your server could be faster or slower than the browser, so, test the speed of your server before selecting a specific 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.
The Meaning Of $2a$, $2b$ And $2y$
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 puts Argon2id at the top and names bcrypt as a sound option when Argon2 is missing. 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.
How the Bcrypt Generator Works, Step by Step
This brief video shows each step from start to finish. Choose your language below, and switch on captions if they help.
How to Make a Bcrypt Hash
At the default cost, the hash is ready in a fraction of a second.
Pick a cost
A cost of 10 makes a sensible starting point. A cost of 12 resists attacks better, though each login takes longer.
Type the password
Press Show to see the password you entered.
Press Hash it
A bar shows the progress for higher costs.
Copy or test it
Copy the hash, or check it on the other side.
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.
Tips for Storing Passwords With Bcrypt
Follow these, and a stolen database stays a dead end.
- Use cost 10 or higher. Target roughly a quarter of a second per hash on your server.
- Let the library salt it. Never make or reuse salts by hand.
- Verify, do not compare. Check passwords with your library’s verify function, never by comparing strings.
- 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.
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
Stick to tools that work inside your browser, such as this one.
Bcrypt Generator Questions People Ask
How can I make a bcrypt hash?
Enter the password, choose a cost and click Hash it. The 60-character hash appears in a moment.
How can I test 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 higher. 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 Tools for Security
Handy next steps for passwords, hashes and IDs.
- Password Generator
Tough passwords and word-based passphrases, generated on your own device.
- Hash Generator
MD5, SHA-1, SHA-256 and more for any text or file.
- UUID Generator
Versions 1 to 7 in bulk, with a checker.
Ready to Hash Your Password?
Enter it, choose a cost and click Hash it. This bcrypt generator is free, needs no account and works in your browser.