Development tools

Bcrypt Generator

Hash passwords with bcrypt or verify a password against an existing hash — choose your cost factor and see the hash time on your server.

Hash password Verify hash Cost factor 4–31 Salt included Hash time display $2b$ format
Get started free Sign in

Free · No credit card · 50 credits/day

Bcrypt cost factor guide

Cost factor Rounds (2^cost) Approx. time (modern CPU) Use case
8 256 ~1 ms Testing/development only
10 1,024 ~65 ms Minimum for production (legacy)
12 4,096 ~250 ms Recommended for most apps
14 16,384 ~1 s High-security apps, admin accounts

Times vary by hardware. Choose the highest cost where login time stays under 100–300ms on your server.

Frequently asked questions

Why use bcrypt instead of MD5 or SHA-256?

MD5 and SHA-256 are fast — billions of hashes per second on a GPU. That makes them terrible for passwords: an attacker with your hash database can brute-force millions of passwords quickly. Bcrypt is deliberately slow with a configurable cost factor. As hardware gets faster, you increase the cost factor.

What is the bcrypt cost factor?

The cost factor is an exponent: hashing rounds = 2^cost. Cost 10 = 1024 rounds; cost 12 = 4096 rounds. Higher cost = slower hashing = better security, but more CPU per login. The standard recommendation is cost 10–12. Choose the highest cost where login time stays under 100–300ms on your server.

Is the salt stored inside the bcrypt hash?

Yes. A bcrypt hash ($2b$12$...) contains the algorithm version, cost factor, 22-character Base64 salt, and 31-character hash — all concatenated. You never store the salt separately. When verifying, the library extracts the salt from the stored hash and rehashes the candidate password to compare.

What is the difference between bcrypt, Argon2 and scrypt?

All three are designed to be slow. Bcrypt is the oldest (1999) and most widely supported. Argon2 won the Password Hashing Competition in 2015 and is the modern recommendation — it also has a memory-hardness parameter that makes GPU attacks more expensive. For new applications, Argon2id is preferred; bcrypt is fine for existing systems.

Related security tools

More tools for hashing and authentication.

.htpasswd Generator

Generate bcrypt Apache password entries for protecting directories with HTTP auth.

Hash Generator

Generate MD5, SHA-1, SHA-256 and SHA-512 hashes for data integrity checks.

JWT Debugger

Decode and verify JWT tokens — often used alongside bcrypt-hashed passwords.

Hash passwords the right way

Free account. 50 credits per day. Access to 75+ tools instantly.

Create free account →