bcrypt Generator

Generate a bcrypt hash from any text with an adjustable cost factor, and verify whether plain text matches an existing hash.

Generate a bcrypt hash

Higher cost factors are slower but harder to brute-force. 10–12 is a common default. Everything runs in your browser — nothing is sent anywhere.

Verify text against a hash

Example input

correcthorsebattery

Example output

$2a$10$N9qo8uLOickgx2ZMRZoMy...

What is a bcrypt Generator?

bcrypt is a password-hashing algorithm specifically designed to be slow — unlike general-purpose hash functions like SHA-256, which are built for speed, bcrypt deliberately takes a configurable amount of computation time per hash. That's the entire point: if an attacker gets a database of bcrypt-hashed passwords, the slowness makes brute-forcing every possible password computationally expensive, whereas a fast hash function lets an attacker try billions of guesses per second on modern hardware.

When to use it

Reach for this tool when you need to manually generate a bcrypt hash for testing — seeding a test database with a known password hash, verifying that your application's bcrypt implementation produces output in the format you expect, or checking whether a specific plain-text password matches a hash you already have during debugging. This is a testing and learning tool, not a substitute for hashing passwords server-side in your actual application, where the language's standard bcrypt library should handle this as part of your authentication flow.

How it works

bcrypt combines the password with a randomly generated salt (preventing two identical passwords from producing the same hash) and runs the result through the Blowfish cipher's key setup phase repeatedly — the number of repetitions is controlled by the cost factor, where each increment doubles the computation time. A cost factor of 10 (a common default) means roughly 1,024 rounds; going to 12 means roughly 4,096 rounds, taking noticeably longer to compute but making brute-force attacks proportionally harder.

Frequently asked questions

What cost factor should I use for bcrypt?

10-12 is a common range for production systems as of now — high enough to meaningfully slow down attackers, low enough that legitimate login requests don't feel slow to users. The right value depends on your server's hardware and should ideally take somewhere around 100-300 milliseconds per hash; adjust based on testing on your actual infrastructure.

Why does hashing the same password twice give different results?

bcrypt generates a random salt for every hash, which gets embedded in the output string itself (you can see it as part of the hash). This means the same password produces a different-looking hash every time, but bcrypt's verify function can still correctly check a password against any of those hashes since the salt is stored alongside it.

Is bcrypt still considered secure in 2026?

Yes, bcrypt remains a widely trusted and recommended choice for password hashing. Some newer alternatives like Argon2 offer additional resistance to certain specialized attacks (like GPU-based cracking), but bcrypt with an appropriate cost factor is still considered secure and is extensively battle-tested.

Should I hash passwords in the browser before sending them to my server?

No — hash passwords server-side, not client-side. Client-side hashing doesn't add real security (the hash effectively becomes the password from the server's perspective) and can create its own problems. This tool is for testing and inspection, not a pattern to copy into a real login flow.