AioGalaxy WebTools
Password Hashing

Free Online Bcrypt Hash Generator & Verifier

Create a salted bcrypt password hash with a cost from 4 to 14, or check a password against an existing bcrypt hash.

Makes $2y$ hashes Cost 4 to 14 Verify mode Hashed on our server over HTTPS

This tool works on our server, not in your browser. Your text is sent over HTTPS, hashed, and sent back, and this tool does not store it. Do not enter a password you use for a real account. For those, create the hash on your own system.

(2^10 = 1,024 rounds)
Short Guide

What is bcrypt?

Bcrypt is a password hashing method. A website should never store a plain password. It stores a hash, which is a scrambled version that cannot be turned back. Bcrypt is slow on purpose, so it is hard for an attacker to test millions of guesses in a short time.

What a bcrypt hash looks like

A bcrypt hash is 60 characters long and has four parts. Here is an example: $2y$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy

$2y$
Version label
($2a$, $2b$ or $2y$)
10$
Cost
210 = 1,024 rounds
22 characters
The random salt
31 characters
The hash itself

The salt is stored inside the hash. That is why the same password gives a different hash each time, and why checking a password still works.

Which cost should I use?

Each +1 on the cost doubles the work. A higher cost is harder to attack, but it also makes every login slower. Test a few values on your own server and pick the highest cost that still feels fast.

Cost Rounds Speed Often used for
10 1,024 Fast A common starting point.
12 4,096 Slower Website logins on a strong server.
14 16,384 Slow Very sensitive accounts. Check the delay first.

The 72-byte limit

  • Bcrypt only uses the first 72 bytes of a password. Anything after that is ignored.
  • So two very long passwords that start the same way can give the same hash.
  • If your site allows very long passwords, check what your library recommends.

What do $2a$, $2b$ and $2y$ mean?

They are version labels. This tool makes $2y$ hashes, which is what PHP makes. In modern software, $2y$ and $2b$ work the same way.

Code examples

PHP

// Make a hash with cost 12 $hash = password_hash($userPassword, PASSWORD_BCRYPT, ['cost' => 12]); // Check a password against the saved hash if (password_verify($candidatePassword, $hash)) { // Password is correct }

Node.js (bcrypt package)

const bcrypt = require('bcrypt'); const hash = await bcrypt.hash(plainPassword, 12); const isMatch = await bcrypt.compare(candidatePassword, hash);

Python (bcrypt package)

import bcrypt hashed = bcrypt.hashpw(plain_password.encode('utf-8'), bcrypt.gensalt(rounds=12)) if bcrypt.checkpw(candidate_password.encode('utf-8'), hashed): print("Password is correct")

Frequently Asked Questions

What is bcrypt?

Bcrypt is a way to turn a password into a hash that is safe to store. It is slow on purpose, so an attacker cannot try millions of guesses every second.

Is it safe to type my password into this tool?

This tool works on our server. Your text is sent over HTTPS, hashed, and sent back, and the tool does not store it. Even so, do not enter a password you use for a real account. For those, create the hash on your own system.

What is the cost factor?

The cost sets how much work each hash takes. Every +1 doubles the time. Cost 10 or 12 is common for websites. Choose the highest cost that still keeps logins fast on your own server.

Why is the hash different each time for the same password?

Bcrypt adds a random salt every time. The salt is kept inside the hash, so checking a password still works.

Is there a password length limit?

Yes. Bcrypt only uses the first 72 bytes of a password and ignores the rest. If your site allows very long passwords, read your library's advice for this limit.

Can a bcrypt hash be turned back into the password?

No. A hash cannot be reversed. To check a password, bcrypt hashes the new try with the same salt and compares the two results.

Explore Related Security & Developer Tools

Popular