Command Palette

Search for a command to run...

BC

Bcrypt Generator

Generate and verify bcrypt password hashes in the browser with an adjustable cost factor

Cost factor: 1010

Approx. 100 ms per hash. Higher cost is slower to crack, and slower on every login. Cost 10 to 12 is the common production range.

Hashing and verification run entirely in your browser. Nothing you type is sent to a server.

Category:security
Mode:Offline
Version:1.0.0
Access:Free

What is a Bcrypt Generator?

A bcrypt generator turns a plain password into a bcrypt hash: a 60-character string that safely stores the password without keeping the password itself. Bcrypt is a password-hashing function designed by Niels Provos and David Mazieres in 1999, built on the Blowfish cipher, and it is still the default choice in frameworks like Laravel, Spring Security, and Django (as one of several supported hashers). This tool generates a hash from any password and, in verify mode, checks whether a password matches a hash you already have.

Bcrypt does two things that a raw SHA-256 does not. It salts every hash with 16 random bytes baked into the output, so two users with the same password get different hashes and precomputed rainbow tables are useless. And it is deliberately slow: a cost factor from 4 to 31 controls how many key-expansion rounds run, doubling the work with every step. That slowness is the whole point. A fast hash lets an attacker with a leaked database try billions of guesses a second on a GPU; a cost-12 bcrypt hash takes a fifth of a second or so of CPU time, which caps an attacker at a handful of guesses a second per core, which is what keeps a stolen database from turning into a list of plaintext passwords overnight.

The output format is self-describing. A hash like $2b$12$R9h/cIPz0gi.URNNX3kh2OPST9/PgBkqquzi.Ss7KIUgO2t0jWMUW packs four fields separated by dollar signs: the version (2b), the cost (12), and then a 22-character Base64 salt followed by the 31-character digest. Because the salt and cost travel inside the hash, verification needs nothing but the password and the hash string, which is exactly what the verify mode here uses.

Everything runs client-side in your browser. The password you type, the hash you paste, and the salt that gets generated never leave the tab, hit no server, and land in no log. The Network panel of your developer tools shows the only requests are a usage check and a usage record, which carry the cost setting but never the password or hash. The bcrypt algorithm is implemented in pure TypeScript, so the tool also works offline once the page has loaded. The output is byte-for-byte compatible with OpenBSD, PHP password_hash(PASSWORD_BCRYPT), Node bcrypt libraries, and the bcrypt verifiers in every major framework, so a hash generated here validates in your application and vice versa.

A quick way to try the bcrypt hash generator is the sample. In Generate, press Load Sample to fill in correct horse battery staple, leave the cost factor at 10, and press Generate Hash. You get a 60-character string starting $2b$10$, and pressing Generate Hash again gives a different one, because the salt is new each time. In Verify, Load Sample fills a stored hash and the same password, and Verify reports Match (cost 10). Change the first letter to a capital C and it reports No match. That round trip is what a bcrypt password generator should prove.

How to use the Bcrypt Generator?

1

Enter a password

Type or paste the password you want to hash. Bcrypt uses the first 72 bytes of the UTF-8 encoded password, so anything longer is truncated; the tool warns you when that happens.

2

Choose a cost factor

Pick a cost from 4 to 31 with the slider. Each step doubles the hashing time. Cost 10 to 12 is the common range for production login systems in the 2020s; higher costs are more resistant to cracking but slower on every legitimate login too.

3

Generate the hash

Click Generate. A fresh random 16-byte salt is created and the bcrypt hash is computed in your browser. Because the salt is random, hashing the same password again produces a different hash, which is expected and correct.

4

Copy it, or switch to Verify

Copy the 60-character hash into your user table or config. To check a password against an existing hash, switch to Verify mode, paste the hash and the candidate password, and the tool reports match or no match using the cost and salt embedded in the hash.

Key Features

Generate and Verify

Hash a new password or check a password against an existing bcrypt hash, both in one tool

Adjustable Cost Factor

Slider from cost 4 to 31 with a live estimate of how the work grows as you raise it

Random Salt Every Time

A cryptographically strong 16-byte salt is generated per hash using the Web Crypto API

Standard-Compatible Output

Produces the $2b$ format that OpenBSD, PHP password_hash, Laravel, and Node bcrypt all accept

Frequently Asked Questions

Yes, because the hashing happens entirely in your browser and the password is never sent anywhere. You can verify this in the Network tab of your developer tools: generating a hash makes only a usage check and a usage record, and neither contains the password, the salt or the hash. That said, a browser tab is not a password manager, so avoid pasting the live credentials of a production account into any web page you did not build, and close the tab when you are done.

Comments

0 comments

0/2000 characters

No comments yet. Be the first to share your thoughts!

bcryptbcrypt generatorbcrypt hashpassword hashbcrypt verifyhash passwordbcrypt cost factorbcrypt onlinebcrypt hash generatorbcrypt password generatorpassword_hashsalt