Bcrypt generator
Generate a bcrypt password hash for any string input, or check one.
About this tool
The bcrypt generator hashes a password with bcrypt, the slow, salted password hash that Laravel, Ruby on Rails, WordPress and many other systems use to store passwords. It can also check a password against a bcrypt hash you already have.
How to use the bcrypt generator
- Enter the password or text to hash.
- Choose the cost, from 4 to 12. 10 is PHP’s default and Laravel uses 12; each step up is twice as slow, and twice as hard to crack.
- To check a password, paste an existing hash into Hash to check against.
- Press Generate and copy the hash, or read whether the password matches.
Reading a bcrypt hash
A hash like $2y$10$N9qo8uLOickgx2ZMRZoMye… has three parts: $2y$ is the bcrypt version, 10 is the cost, and the rest is the random salt (22 characters) followed by the hash itself (31 characters). Because every hash has its own salt, hashing the same password twice gives two different results, and both are correct.
Why bcrypt for passwords
Fast hashes like MD5 and SHA-256 can be guessed billions of times a second. Bcrypt is slow on purpose, and each step up in cost doubles the time a guess takes, so you can make it harder to crack as computers get faster.
Bcrypt only uses the first 72 bytes of a password, so very long passphrases are cut off. The text is sent to this site to be hashed and isn’t stored, but don’t paste passwords for real accounts into any website.