ToolsForWeb

Saved

Tap ☆ on any tool to keep it here.

toolsforweb

Bcrypt Generator & Verifier

Hash a password with bcrypt or check a password against a bcrypt hash — in your browser.

Runs in your browser — nothing is uploaded

Loading tool…

Results are provided as is, for general information. Check anything important before relying on it. See the Terms of Use.

About this tool

bcrypt is the workhorse password-hashing function: it salts every hash automatically and its cost factor lets you slow hashing down as hardware gets faster. This tool hashes a password at cost 10-12 and verifies a password against any $2a$/$2b$/$2y$/$2x$ hash, showing the version, cost, 22-character salt and 31-character checksum that make up the 60-character string. It also warns when a password exceeds bcrypt's 72-byte limit, where extra characters are silently ignored. Hashing runs in your browser with a vetted pure-JS bcrypt; the password never leaves the page.

When to use it

Checking what a bcrypt hash of a password will look like before storing it in your own database.
Verifying a password against an existing hash when debugging an authentication flow.
Comparing how cost 10, 11 and 12 feel in wall-clock time on your device.
Inspecting a hash's version prefix, cost and salt at a glance.

Questions

Why does hashing the same password twice give different hashes?

bcrypt generates a fresh random 16-byte salt for every hash and folds it into the result, so identical passwords produce different hashes by design. Verification works because the salt travels inside the hash string: the checker reads it, re-runs the same computation and compares checksums. Two different hashes of the same password are both correct.

What does the cost factor actually control?

The number between the $ signs (the 10 in $2b$10$) is a base-2 logarithm: cost 10 means 2^10 = 1,024 key-expansion rounds, cost 12 means 4,096. Each +1 doubles the work. Pick the highest cost your login flow tolerates — 10 is a common floor, 12 is a good target for new systems. This tool times each hash so you can feel the difference on your own hardware.

What happens to passwords longer than 72 bytes?

bcrypt silently ignores everything after 72 UTF-8 bytes, so a 100-character passphrase is no stronger than its first 72 bytes. The tool flags this before you rely on it. It matters most for long passphrases and for non-Latin text, where 72 bytes can be under 24 characters. If you need longer secrets, hash the password with SHA-256 first and bcrypt the hex digest — but only with a library that handles the length-extension pitfalls for you.

Is it safe to paste a password into a web tool?

Here, the password is hashed in your browser's memory and never sent to any server — you can load the page, go offline, and it still works. That said, the habit of typing real production passwords into any web page is worth avoiding; use this for testing with throwaway passwords, and let your own backend do the real hashing.

Why is bcrypt so slow compared with SHA-256?

Deliberately. SHA-256 computes in microseconds, which lets an attacker with stolen hashes try billions of guesses per second on a graphics card. bcrypt's key schedule runs the expensive Blowfish setup 2^cost times, and its memory access pattern resists GPU and ASIC acceleration. Slow for attackers, barely noticeable for a user logging in once.

bcrypt or argon2?

For new systems where you control the server, argon2id is the better default — it wins a memory-hardness game bcrypt cannot play, and memory hardness hurts GPU crackers more than bcrypt's approach. But bcrypt remains solid, battle-tested, and is what most existing frameworks and tutorials use. If your stack already uses bcrypt, there is no urgency to migrate; this tool covers the format you actually have.

Related tools