Get online today — Domain + Hosting at discounted prices View Combo Offers ›

Bcrypt & Argon2 Hash Generator

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

Only used when Mode is set to Verify.

Hash a password with bcrypt or Argon2id, or switch to verify mode to check whether a password matches a hash you already have. Useful for seeding a user row by hand, or for working out why a login is being rejected.

Nothing you type is stored, logged or reused — the hash is computed in memory and returned.

How it works

A password hash is not encryption. There is no key and no way back: the only way to check a password is to hash the attempt and compare. What separates a good password hash from a bad one is how slow it is. MD5 and SHA-256 were designed to be fast, which is exactly wrong here — a modern GPU computes billions of them per second, so a stolen database of SHA-256 passwords is largely readable within hours.

bcrypt solves this with a cost factor. The cost is an exponent: raising it by one doubles the work. At cost 10 a single hash takes roughly 50–100 ms on a typical server; at cost 12, four times that. Legitimate logins happen once and can absorb a tenth of a second, while an attacker grinding through a wordlist pays that cost on every guess. The cost is stored in the hash itself, which is why old hashes keep verifying after you raise the default — and why you can rehash a user's password at the new cost the next time they log in successfully.

Argon2id is the newer answer and the one the Password Hashing Competition selected. Besides time, it deliberately consumes memory, which blunts the advantage of GPUs and custom hardware — those can parallelise arithmetic cheaply but not RAM. If your platform supports it and you are choosing today, Argon2id is the better default. bcrypt remains entirely respectable and is far more widely supported.

One bcrypt quirk worth knowing: it silently truncates input beyond 72 bytes. A passphrase longer than that is no stronger than its first 72 bytes, and because UTF-8 multibyte characters cost more than one byte each, the limit arrives sooner than the character count suggests. Argon2 has no such limit.

Finally, the $2y$ prefix you see is PHP's identifier for bcrypt. $2a$ and $2b$ appear in hashes from other languages and verify identically in PHP; the prefixes record which implementation minted the hash, not a different algorithm.

Frequently asked questions

What cost factor should I use?

Pick the highest cost your server can absorb in about 100 ms under real login load — on current hardware that is usually 11 or 12. Cost 10 remains the common default and is defensible. Below 10 is too fast to be worth the trouble.

Why does the same password produce a different hash each time?

Every bcrypt and Argon2 hash embeds a fresh random salt. That is what stops an attacker precomputing a rainbow table, and stops two users with the same password having identical hashes. All of them verify correctly — use verify mode to confirm.

bcrypt or Argon2id?

Argon2id if the platform supports it, because it resists GPU and ASIC attacks by demanding memory as well as time. bcrypt otherwise — it is twenty-five years old, extremely well studied, and supported everywhere. Either is a sound choice; SHA-256 and MD5 are not.

Can I decrypt a bcrypt hash back to the password?

No, and not because the tool refuses to. A hash is one-way by construction: the original password is not present in it in any recoverable form. The only attack is guessing candidates and hashing each one, which is precisely what the cost factor makes expensive.

Why does my long passphrase not work as expected?

bcrypt ignores everything past the first 72 bytes. Two passphrases sharing a 72-byte prefix hash identically. Accented characters and emoji consume several bytes each, so the cut can land earlier than it looks. Use Argon2id if you need long passphrases to count in full.

Are these hashes compatible with Laravel, Django or Rails?

Yes. All three use standard bcrypt in the modular crypt format shown here, so a hash generated on this page verifies in any of them, and vice versa. Laravel in particular reads the cost directly from the hash string, so mixed costs coexist without trouble.

Related tools

Need hosting that just works?

Free SSL, daily backups and 24×7 support on every Loudhost plan.

View Hosting Plans