Hash and verify strings using bcrypt
Generate a bcrypt hash with salt rounds, or compare plaintext against an existing hash

Bcrypt uses cost factor rounds in the range 4–31 (values outside are clamped).
This Bcrypt tool helps you do two practical things:
Conceptually, bcrypt hashing looks like:
where is your message (often a password), is random per-hash, and is the cost factor (“salt rounds”).
Hashing and comparison run locally in your browser. If you enable “share with results”, the plaintext can be included in the URL, so it’s best to avoid sharing when working with sensitive inputs.
If you need random strings (API keys, invite codes), pair this with our Token Generator. If you need fast digests for non-password use cases, try Hash Text.
Bcrypt cost is exponential. If you change the cost from to , the expected work scales roughly by:
For a concrete case, going from 10 to 12 rounds increases the work by about:
That’s why “just +2” can be a big change. Use rounds to balance security with acceptable login latency.
Suppose you stored a bcrypt hash for some plaintext . Later, you check a login attempt . The “Compare” section answers:
If the tool says Yes, then matches the original plaintext. If it says No, the plaintext is different (or the hash is malformed).
Scenario: You are building a signup flow and you want to store passwords safely.
Inputs: plaintext (user password), rounds .
Result: a bcrypt hash string (it will look like ).
How to use it: store in your database, and when the user logs in, compare the login plaintext to the stored hash.
Scenario: Your login feels slow in production.
Inputs: test costs .
Result: relative work grows roughly as . A single step (e.g., 11→12) is ~2×.
How to use it: pick the highest cost that keeps p95 login time acceptable for your system.
Scenario: You migrated users from another system and imported bcrypt hashes.
Inputs: known test password and imported hash .
Result: “Do they match?” should return for the test account.
How to use it: if compare fails, double-check version prefixes (e.g., , ) and whether the original system used a different hash format.
Scenario: You want to ensure your backend bcrypt library matches browser output.
Inputs: plaintext , cost .
Result: bcrypt hashes differ each time due to random salt, but compare should still return .
How to use it: generate a hash in one environment and verify in the other.
If you’re building a complete authentication experience, bcrypt is only one piece. You might also want a secure token generator for password resets or session identifiers.
Helpful companion tools: Token Generator, Hash Text.
Use this when you’re deciding on a default cost factor and want to reason about how changes affect compute time.
Use Compare to verify whether the stored hash matches what the user typed, without changing any database values.
Confirm imported bcrypt hashes still validate known test passwords after a user migration.
Show teammates why bcrypt outputs change each run and why salt is essential.
For demos and prototypes, hashing in-browser can be convenient, but avoid shipping client-only auth logic to production.
If you really just need a fast digest, bcrypt is usually not the right tool — consider Hash Text instead.
Never expect identical hashes for the same password
Bcrypt includes a random salt by default, so hashing the same plaintext twice produces different-looking hashes. That is normal.
Treat rounds as a performance knob
Raising cost improves resistance to guessing, but can increase CPU usage. Small changes matter because cost is roughly exponential.
Validate end-to-end with compare
When integrating with a backend, test by generating a hash in one environment and verifying in the other. Compare is the real compatibility check.
Avoid sharing secrets
The Share modal can include plaintext in the URL if enabled. For sensitive values, keep sharing disabled or clear the inputs first.
Tip for documentation: if you’re writing onboarding docs for your team, include a small “known test” account (with a non-sensitive password) and use this tool to demonstrate how compare works.
If your docs also mention API keys or reset tokens, generating realistic examples is easier with Token Generator.
Unlike simple hash functions (SHA-256, SHA-3), bcrypt is designed specifically for password hashing. It is intentionally expensive, and its “cost factor” controls how expensive each hash computation is.
A common way to explain bcrypt cost is to treat the expected work as roughly proportional to:
and an approximate time model as:
where depends on your device and implementation.
Variables you’ll see in this guide:
A random value mixed into the hash so the same password does not produce the same stored output. It also helps defend against precomputed “rainbow table” attacks.
The knob that controls how slow hashing is. Because cost is roughly exponential, raising cost makes offline guessing much more expensive.
SHA-256 is great for integrity, but too fast for passwords. Password hashes aim to be slow so attackers cannot try billions of guesses per second.
You never decrypt bcrypt hashes. You verify by hashing the candidate password using the salt and cost embedded in the stored hash, then comparing.
If you’re explaining “hashing” to a non-security audience, it can help to contrast bcrypt with a standard digest: a digest is typically used for equality checks and integrity; bcrypt is used for password storage.
For digest-style hashing, use Hash Text.
Because bcrypt uses a random salt. Even for the same plaintext and cost , the salt changes, so the stored string looks different. Verification still works because the salt is embedded in the hash.
Think of rounds as a dial that increases compute work roughly like . Increasing cost by 1 is about 2× more work.
There isn’t one universal number. A reasonable approach is: pick the highest cost where your login remains smooth on your slowest server and typical client devices. Use the scaling idea to understand tradeoffs.
No. You do not “decrypt” bcrypt hashes. You verify by recomputing with the embedded salt/cost and comparing.
Usually no. It’s intentionally slow and designed for passwords. For integrity checks and signatures, use a standard digest like SHA-256 or SHA-3 (see Hash Text).
The hashing and comparison run in your browser. However, always treat web tools with care: if you enable “share with results”, your plaintext may be placed in the URL.
If the hash is malformed or uses an unsupported format, compare can fail. Try pasting the full hash string (including the prefix) and confirm it begins with something like , , or .
OpenBSD bcrypt (background and history)
https://man.openbsd.org/bcryptOWASP Password Storage Cheat Sheet
https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.htmlbcrypt.js (JavaScript implementation used in many tools)
https://github.com/dcodeIO/bcrypt.jsUse a simple chronometer (stopwatch) to track elapsed time down to milliseconds. Runs locally in your browser.
Normalize email addresses to a standard format for easier comparison. Useful for deduplication and data cleaning. Runs locally in your browser.
Estimate the time needed to consume a total amount at a constant rate, and get an expected end time. Runs locally in your browser.
Parse and decode your JSON Web Token (JWT) and display its content. All computation runs locally in your browser.
Know which file extensions are associated to a MIME type, and which MIME type is associated to a file extension. Includes a full MIME types table.
Generate random Lorem Ipsum placeholder text with customizable paragraphs, sentences, and word counts. Runs locally in your browser.