DevKits

Bcrypt Generator & Verifier — Password Hash Online

Generate and verify bcrypt password hashes online. Configurable cost factor (4–15), shows computation time so you can pick a cost matching your server hardware. Parses and displays hash version and cost from any pasted hash. 100% local — passwords never leave your browser.

Last updated:

Generate hash

Cost 10 is a modern minimum; cost 12 is common for high-security services. Target 250–500 ms per hash on your production hardware.

Verify against an existing hash

Type a password to generate a bcrypt hash — 60 characters starting with $2b$COST$. Adjust the cost (4–15) to trade off security vs speed. Paste an existing hash into the Verify field to check whether a candidate password matches. 100% local via bcryptjs; nothing is uploaded.

What is Bcrypt Generator?

Bcrypt is the workhorse password-hashing function of the last two decades. Designed by Provos and Mazières in 1999, it's built on the Blowfish cipher's key schedule and has an adjustable cost parameter that lets it scale with Moore's law: each +1 in cost doubles the computation time, so you can push cost up as hardware gets faster. That property is what keeps bcrypt relevant even in 2026: even with GPUs and ASICs, an attacker who steals your database faces years of compute per password at cost 12. Modern alternatives — scrypt, Argon2 — are memory-hard and arguably better against ASIC attackers, but bcrypt remains widely deployed (Rails devise, Django, Node's most popular auth libraries, PHP's password_hash default) and is still considered secure when configured correctly. This tool computes and verifies bcrypt hashes entirely in your browser using bcryptjs — a pure-JS bcrypt implementation.

How to generate a bcrypt hash online

  1. 1Enter the password in the input.
  2. 2Pick a cost factor (10 is the modern minimum, 12 is common for high-security services). Higher = more secure but slower.
  3. 3Click Generate — the hash appears with the actual computation time so you can dial in the right cost for your server hardware.
  4. 4To verify: paste an existing bcrypt hash into the Verify field along with a candidate password, and the tool reports whether they match.

Use Cases

Seed dev / staging databases

Generate a bcrypt hash for a fixed test password (like 'test1234') and paste it directly into a seed script — no need to boot the app to call User.create.

Verify a user forgot-password flow

When a user reports 'I entered the right password', paste their bcrypt hash from the DB and the password they claim to have typed. Instant answer.

Tune cost for your production hardware

The tool reports actual compute time. Bump cost until it takes 250–500ms — the sweet spot for login latency vs attacker cost.

Debug a login integration

When bcrypt-compare returns false in your code, verify here to isolate whether it's the algorithm, the input encoding, or something else.

Code Examples

bcrypt in Node.js (bcrypt package)

import bcrypt from "bcrypt";
const hash = await bcrypt.hash(password, 10);
const match = await bcrypt.compare(password, hash);

bcrypt in Python

import bcrypt
hash = bcrypt.hashpw(password.encode(), bcrypt.gensalt(10))
match = bcrypt.checkpw(password.encode(), hash)

bcrypt in Go

import "golang.org/x/crypto/bcrypt"
hash, _ := bcrypt.GenerateFromPassword([]byte(password), 10)
err := bcrypt.CompareHashAndPassword(hash, []byte(password))

Key Concepts

Cost factor
The number of iterations, expressed as a power of 2. Cost 10 = 2^10 = 1024 iterations of the key schedule; cost 12 = 4× slower; cost 14 = 16× slower.
Salt
A random 128-bit value unique per hash, mixed with the password before hashing. Prevents rainbow tables and makes identical passwords produce different hashes. Bcrypt embeds the salt into the output.
Hash format
$VERSION$COST$SALT+HASH. Version is 2a / 2b / 2y (all bcrypt), COST is 2 digits, then 22 salt chars + 31 hash chars = 53 chars.

Tips & Best Practices

  • Never generate the salt yourself — bcrypt.hash generates a random one internally. Manually-set salts are almost always a mistake.
  • Bcrypt has a hard 72-byte input limit. For long passphrases or when combining with a pepper, pre-hash with SHA-256 or SHA-512 first (common enterprise pattern).
  • Cost is stored inside the hash itself. When you increase cost site-wide, existing users need to re-hash on next login (or you can trigger a rehash if bcrypt.needsRehash returns true).
  • Storage: bcrypt hashes are always 60 chars — a VARCHAR(60) or CHAR(60) column is exactly right. Some libraries emit $2y$ instead of $2b$ — they're interoperable.
  • For new systems in 2026, Argon2id is the modern recommendation. Bcrypt is fine — but if you're greenfield and your framework supports Argon2, consider it.

Frequently Asked Questions

What is bcrypt and why is it slow?

Bcrypt is a password hashing function designed to be deliberately slow. It uses the Blowfish key schedule with an adjustable cost parameter — each +1 in cost doubles the work. This slowness is a feature: it makes brute-force cracking of leaked hashes economically infeasible even on GPUs.

What cost should I use?

Pick the highest cost your login-request budget can afford. A common target is 250–500ms per hash on your production hardware — cost 10–12 on modern servers. This tool shows the actual time it took to compute, so you can dial in the right value for your CPU.

Are bcrypt hashes always 60 characters?

Yes. The format is $VERSION$COST$SALT+HASH — for example, $2b$10$8f4wJ7Wq5R... — always 60 characters. Versions $2a, $2b, $2y are all bcrypt; the differences are historical bug-fix rollups.

Does bcrypt truncate long passwords?

Yes. Bcrypt has a 72-byte input limit; anything beyond that is silently ignored. If your password policy allows longer passwords, pre-hash with SHA-256 or SHA-512 before passing to bcrypt (a common pattern in enterprise auth).

Is my password uploaded anywhere?

No. The bcrypt library runs entirely in your browser. Passwords, generated hashes, and verification checks never leave your device.

Related Tools