Bcrypt Generator & Checker: Hash and Verify Passwords

Bcrypt Generator & Checker: Hash and Verify Passwords

Generate a bcrypt hash with cost 4 to 18 or check whether a password matches a $2a$, $2b$ or $2y$ hash. Runs in your browser; nothing is uploaded.

Updated November 2026

Reviewed by Rafael Duarte

Zero Network Activity — 100% Browser-side
CLIENT-SIDE SECURE
12
4 — testing Default is 12 (OWASP minimum: 10). Higher = more secure but slower. 18 — very slow

Local Benchmark

Processing time on your current hardware

Cost 8
—
Cost 10
—
Cost 12
—
Cost 14
—

Implementation Snippets

const bcrypt = require('bcryptjs');
const SALT_ROUNDS = 12; // OWASP minimum is 10; 12 is a common default

async function hashPassword(plaintext) {
  return await bcrypt.hash(plaintext, SALT_ROUNDS);
}

async function verifyPassword(plaintext, hash) {
  return await bcrypt.compare(plaintext, hash);
}

const hash = await hashPassword('user_password');
// '$2b$12$...' (60 chars, always different due to random salt)

const isValid = await verifyPassword('user_password', hash);
// true

How this bcrypt hash generator works

At the default cost of 12, a hash takes well under a second

1. Paste your password

Type it into Input Password. Hashing runs in your browser; open the DevTools Network tab if you want to see for yourself that nothing is sent.

2. Adjust the cost factor

Slider from 4 to 18 — defaults to 12; OWASP asks for a minimum of 10.

3. Generate and copy

The hash appears with the exact time it took on your hardware; copy it with one click.

What this bcrypt tool does

Beyond just generating the hash

Verifies an existing hash

The Verify Hash tab checks a password against a $2a$, $2b$ or $2y$ hash and shows Match or No Match. At cost 12 that takes a fraction of a second.

Benchmarks the cost factor

The Local Benchmark measures the real hashing time at cost 8, 10, 12 and 14 on your own hardware, not a generic estimate.

Breaks down the generated hash

The generated hash is broken apart into labeled version, cost, salt, and checksum pieces, each with an explanation.

Ready-made code snippets

Generates equivalent hashing and verification code for Node.js, Python, PHP, Go, Java, Ruby, C#, and Rust.

100% client-side with bcryptjs

No password ever leaves your browser — confirm it yourself in the DevTools Network tab.

Examples

The same password never produces the same hash twice

Input
Bcrypt hash (cost 12)
mysecretpassword
$2b$12$Pr1Ng.drr50qbgs7oyPgZ.ECiieBebUkdJiCbBEgUr5uLL9kRyhs2
mysecretpassword (generated again)
a different string with a new salt; both verify against the same password
72 'a' characters, then 100 'a' characters
the two hashes differ, but the 100-character password also verifies against the 72-character hash, because bytes past 72 are ignored

When you'll reach for a bcrypt generator

The most common scenarios among people who use this tool

Authentication

Hash passwords before storing them; bcrypt.compare() confirms the match in constant time at login.

Migrating off a weak algorithm

Progressively re-hash MD5 or SHA-1 passwords to bcrypt the next time each user logs in successfully.

Calibrating the cost factor

Run the benchmark on production-equivalent hardware to find the highest cost that stays under your UX threshold.

Security audits

Use the Verify tab to check whether a stored hash matches the expected password — its prefix already shows version and cost.

Check this before shipping to production

Cost 4–8 in production

These finish in a few milliseconds up to the low tens of milliseconds, which gives little resistance to brute force. Use cost 10 as an absolute minimum and 12 as the default.

Hashing an already-hashed hash

Produces a string that can never be verified again. Always hash the original plaintext password, never a previous hash.

The 72-byte limit

Bcrypt silently truncates anything past 72 bytes — cap the length in bytes or switch to Argon2id (SHA-256 pre-hashing has known pitfalls).

Storing the salt separately

Unnecessary — bcrypt already embeds the salt inside the hash's 60 characters, so a separate salt column just adds complexity.

Why generate bcrypt hashes here

All hashing runs in your browser with bcryptjs, a pure JavaScript implementation — open DevTools and confirm the Network tab stays empty while you type.

The benchmark measures real time on your own hardware instead of a generic estimate, and ready-made snippets for eight languages skip the step of writing the library call by hand.

Bcrypt vs. Argon2id

Both solve password hashing; pick based on your project

Bcrypt
Argon2id
Current OWASP recommendation
solid alternative
first choice
Resistant to GPU/ASIC cracking (memory-hard)
no
yes
Password length limit
72 bytes
none
Broad language support
yes
growing
Adjustable cost factor
yes
yes (memory + time)

Frequently asked questions

No. Bcrypt is a one-way hash, not encryption, so there is nothing to decrypt. What you can do is check a guess: open the Verify Hash tab, paste the password and the hash, and click Verify Match. For a deeper look at why, see how to actually protect passwords.

References

Related article

Password hashing: bcrypt, scrypt, and Argon2

Related Tools