Skip to content

Menu

Bcrypt Generator

Generate and verify bcrypt ($2b$) password hashes with a configurable cost factor

Runs entirely in your browserCrypto & HashingFree, no sign-up
Loading tool

01What is Bcrypt Generator?

Storing passwords means storing something an attacker can't easily reverse, and bcrypt has been the standard answer for that since Niels Provos and David Mazières described it in 1999. This tool makes and checks real bcrypt hashes in the page, so you can produce a seed-data hash or test a login bug without writing a throwaway script. The Hash Password tab draws a 16-byte salt from the Web Crypto API, runs the expensive Blowfish key setup, and prints the result in the modular crypt format. A hash looks like $2b$10$ followed by 22 characters of salt and 31 characters of digest, written in bcrypt's own base64 alphabet. That is the layout bcryptjs, Python's bcrypt package and PHP's password_verify expect. The Cost Rounds slider runs from 4 to 16, and the label under it shows the real number of rounds. Cost 10 means 2^10 = 1,024 passes of the key expansion, and every extra step doubles the time. The Verify Password tab takes a password and an existing $2a$, $2b$ or $2y$ hash. It reads the cost and salt back out of the hash, recomputes, and compares every character before saying "Password matches!" or "Password does not match". Verification stops at cost 20 on purpose, because higher costs would keep a browser tab busy for minutes. Here is a quick sanity check we ran against the code. The OpenBSD test vector for the password U*U with cost 5 is $2a$05$CCCCCCCCCCCCCCCCCCCCC.E5YPO9kmyuRGyh0XouQYb4YMJKvyOeW, and the tool reproduces it byte for byte. Typing U*V against the same hash returns no match. The same check passes when the prefix is changed to $2y$, which is the spelling PHP uses. A few limits matter in practice. Bcrypt only reads the first 72 bytes of the UTF-8 password, so the tool shows a warning once your input passes that size. Non-Latin text hits the cap sooner, since a Cyrillic letter takes two bytes. The engine is a TypeScript port written for this site rather than an audited library, so production code should still hash with your platform's maintained bcrypt package. Your password and the hash are processed by JavaScript in this tab, and the page makes no network request with them. For a new system, OWASP's Password Storage Cheat Sheet now prefers Argon2id and lists bcrypt as the choice for older stacks.

Backend developers who need a real bcrypt hash for seed data or want to check a stored hash while debugging a login. The tool runs entirely in your browser, so your data never leaves your device.

02How to use Bcrypt Generator

  1. Stay on the Hash Password tab and type into the Password field.
  2. Drag the Cost Rounds slider between 4 (fast) and 16 (slow); 10 is the default.
  3. Click Generate Hash, then use Copy to grab the $2b$ string and the time it took.
  4. To check a hash, open the Verify Password tab, enter the password and paste the hash.
  5. Click Verify and read the green match or red no-match result.

03Worked examples

Input: Verify: password U*U against $2a$05$CCCCCCCCCCCCCCCCCCCCC.E5YPO9kmyuRGyh0XouQYb4YMJKvyOeW
Result: Password matches!
This is a published OpenBSD bcrypt test vector, so a match shows the implementation agrees with the reference.
Input: Verify: password U*V against the same hash
Result: Password does not match
One changed character gives a completely different digest.
Input: Hash: hunter2, cost 10
Result: $2b$10$fuu5170AWY0gxTy26AtwfOXyj7HQLZQegtSXpPxB4urPdAVN1/fbO
One sample run. The salt is random, so your output will differ, and it still verifies against hunter2.
Input: Verify: U*U against $2y$05$CCCCCCCCCCCCCCCCCCCCC.E5YPO9kmyuRGyh0XouQYb4YMJKvyOeW
Result: Password matches!
The PHP-style $2y$ prefix is accepted and checked the same way.
Input: Hash 72 letter a's at cost 4, then verify 72 a's followed by XYZ
Result: Password matches!
Bytes past 72 are ignored, which is why long passphrases need care.

04Common use cases

  • Creating a hashed admin password for a seed script or SQL fixture in a dev or staging database
  • Checking whether a user's reported password really matches the $2y$ hash stored by a Laravel or other PHP app
  • Timing cost 10 against cost 12 to see how much delay each adds to a login request
  • Confirming that a hash exported from one system is valid bcrypt before migrating it to a Node or Python service
  • Showing a junior developer why hashing the same password twice gives two different strings
  • Reproducing an OpenBSD test vector while debugging your own bcrypt binding

05Tips

  • If generating a hash at your chosen cost takes well under 100 ms on your login server, try one step higher. Each step doubles both your cost and an attacker's.
  • $2a$, $2b$ and $2y$ hashes made from the same password and salt share the same digest for ordinary passwords, so changing only the prefix usually verifies the same way.
  • Passwords longer than 72 bytes are silently cut. A 72-character string and the same string plus extra text verify against the same hash.
  • The salt lives inside the hash, so you never store it in a separate column.
  • Want Argon2id for a new project? OWASP ranks it above bcrypt, and most current frameworks ship it.

06Related concepts

bcrypt, Blowfish, Argon2, Salt, Key stretching.

Frequently Asked Questions

What is Bcrypt Generator?

Bcrypt Generator is a free, browser-based developer tool on AIDToolStack. Generate and verify bcrypt ($2b$) password hashes with a configurable cost factor It requires no installation or sign-up and works entirely in your browser.

Is Bcrypt Generator free to use?

Yes. No sign-up, no fees and no usage cap.

Does Bcrypt Generator store my data?

No. It runs in your browser; nothing is uploaded.

Cheat sheet

Related Tools

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe