Bcrypt & Argon2 Password Hash Generator and Checker
- This tool runs entirely in your browser. Nothing you enter or upload is sent to a server.
0 of 72 bytes bcrypt reads
Mixed in with HMAC-SHA256 before bcrypt runs.
Everything runs in this tab. The password and the hash are never sent anywhere.
Encoding & security
About this tool
A password hash is not the same thing as a SHA-256 checksum. Checksums are built to be fast; password hashes such as bcrypt and Argon2id are built to be slow on purpose, so an attacker who steals your database can only try a few guesses per second per machine. This tool makes one of those hashes from any password, shows the time it took on your device, estimates how long an attacker would need to guess that password and how much memory they would need, and lets you set the cost so you can see the slowdown for yourself.
Take the password correct horse battery staple at bcrypt cost 10. The result looks like $2a$10$/uaF…, and the string is a recipe: 2a is the bcrypt version, 10 is the cost (2 to the power of 10, so 1,024 rounds), the next 22 characters are the salt and the last 31 are the hash itself. Press the button again and you get a different string, because a fresh random salt is chosen each time, yet each one still verifies against the same password.
Switch to Check a password to test a password against a stored hash. The algorithm and its settings are read from the hash, so you only paste it in. If your application adds a pepper, a secret kept outside the database, enter the same one here: bcrypt gets it as an HMAC-SHA256 step before hashing and Argon2 takes it as its built-in secret. The Argon2id defaults are 19 MiB of memory, 2 passes and 1 lane, the minimum OWASP lists, and the aim for either algorithm is roughly 100 ms to 1 second per hash on your server.
Some limits. bcrypt reads only the first 72 bytes of a password, so anything longer is silently ignored; the tool warns you, and a pepper avoids it by shortening the input first. Timings are for this device, so a server will differ. High Argon2 memory settings can make the tab pause for a moment. Everything runs in your browser and nothing is uploaded. To compare with fast hashes, use the Hash Generator.
| Cost | Rounds | Relative time | Time per hash |
|---|---|---|---|
| 4 | 16 | 1× | ~2 ms |
| 8 | 256 | 16× | ~18 ms |
| 10 | 1,024 | 64× | ~65 ms |
| 12 | 4,096 | 256× | ~255 ms |
| 14 | 16,384 | 1,024× | ~1 s |
| Algorithm | Setting |
|---|---|
| Argon2id | 19 MiB memory, 2 passes, 1 lane |
| Argon2id (more memory) | 46 MiB memory, 1 pass, 1 lane |
| bcrypt | Cost 10 or higher, passwords up to 72 bytes |
Frequently asked questions
Should I use bcrypt or Argon2id?
Use Argon2id for new systems: it is memory-hard, which makes graphics cards and custom hardware much less effective. bcrypt is older, widely supported and still fine at cost 10 or higher, so keep it if your stack already uses it.
Why do I get a different hash every time for the same password?
A random salt is generated for each hash and stored inside it. The salt makes identical passwords produce different hashes, so one cracked password does not reveal everyone who chose it. Checking still works because the salt travels with the hash.
What is a pepper and how is it different from a salt?
A salt is random, unique per password and stored with the hash. A pepper is one secret shared by all passwords and kept outside the database, for example in an environment variable or a secrets manager. If only the database leaks, the pepper stays unknown, so the hashes cannot be tested at all.
How long should hashing take?
Roughly 100 ms to 1 second on your own server is the usual advice. That is imperceptible during a login but costly for someone trying billions of guesses. Raise the cost until it lands there, and revisit it every few years as hardware gets faster.
Can a bcrypt or Argon2 hash be decrypted?
No. They are one-way, and the only way to check a hash is to hash a guess the same way and compare. That is why a slow hash matters: each guess costs the attacker real time.
Is it safe to paste a real password here?
Everything runs in your browser and nothing is sent anywhere. Even so, make a habit of using sample passwords for testing and keep real ones in your password manager.