Bcrypt Generator

Generate and verify bcrypt password hashes — Laravel & PHP compatible.

Hash a password with bcrypt the same way Laravel's Hash::make() and PHP's password_hash() do, then paste the $2y$ result straight into your database. Pick a cost factor, or switch to Verify to check whether a plain password matches an existing hash. Everything runs locally in your browser — nothing is uploaded.

12

Higher is slower and stronger. Laravel’s default is 12.

PHP / Laravel — use $2y$for Laravel & PHP.

Using this in Laravel

A $2y$ hash is exactly what Hash::make() stores — paste it straight into your users.passwordcolumn. Log in with the plain password and Laravel’s Hash::check() (PHP’s password_verify()) will match it.

Everything runs in your browser — passwords and hashes are never uploaded. bcrypt only reads the first 72 bytes of a password.

Runs entirely in your browser — nothing is uploaded.

How to use the bcrypt generator

  1. 1Enter the password and choose a cost factor (12 matches Laravel's default).
  2. 2Keep the $2y$ prefix for Laravel/PHP, then click Generate.
  3. 3Copy the hash into your users.password column — or use Verify to test a password against a hash.

Frequently asked questions

Why didn't my hash work in Laravel?

A plain SHA-256 or MD5 digest won't authenticate — Laravel stores bcrypt hashes that start with $2y$. This tool produces exactly that format, so it drops straight into the password column and passes Hash::check().

What's the difference between $2y$, $2b$, and $2a$?

They're all the same bcrypt algorithm — only the version marker differs. PHP and Laravel write $2y$, Node libraries use $2b$, and $2a$ is legacy. A $2y$ hash verifies everywhere, which is why it's the default here.

Why does the hash change every time?

bcrypt mixes in a random salt on each run, so the same password produces a different hash each time. That's by design — the salt and cost are stored inside the hash string, so verification still works.

Which cost factor should I use?

12 is Laravel's current default and a good balance. Higher values are more resistant to brute force but slower to compute and verify.

Related tools