Skip to content
TypeParser
All tools

Bcrypt Verifier

Verify bcrypt hashes locally.

beats bcrypt.online edge: Cost-factor decode + local verify
hash
password
analysis
note: full bcrypt KDF in JS would block UI for cost ≥10. This tool decodes structure and lets you copy a server-side test snippet.
Guide

About Bcrypt Verifier

Verify bcrypt hashes locally. Paste a bcrypt hash (the <code>$2a$10$...</code> kind) and a candidate password — get a match / mismatch verdict in milliseconds. The tool also decodes the cost factor (rounds) and salt structure for inspection.

What this tool does

Verifies a candidate password against a bcrypt hash. Useful when:

  • Debugging an auth issue — does the user’s password actually match the stored hash?
  • Auditing a database export — confirming you have the right hash format.
  • Testing a migration — verifying the hash survives a re-encoding.

How bcrypt verification works

Bcrypt encodes the salt and cost factor into the hash itself: $2b$12$saltsaltsalt22charsHashHashHashHashHashHas. Verification:

  1. Parse algorithm version, cost factor, salt from the stored hash.
  2. Compute bcrypt(password, salt, cost).
  3. Compare the resulting hash bytes to the stored hash.
  4. Constant-time comparison to prevent timing attacks.

Same password + same salt + same cost → same hash. The check takes ~100ms at cost 10, ~400ms at cost 12, ~1.6s at cost 14.

Bcrypt password hashing in Python and FastAPI

The common FastAPI pattern uses passlib (or bcrypt directly) to hash on signup and verify on login:

from passlib.context import CryptContext
pwd = CryptContext(schemes=["bcrypt"], deprecated="auto")

hashed = pwd.hash(plain_password)              # store this
ok = pwd.verify(plain_password, hashed)        # at login

Or with the bcrypt package directly:

import bcrypt
hashed = bcrypt.hashpw(pw.encode(), bcrypt.gensalt(rounds=12))
ok = bcrypt.checkpw(pw.encode(), hashed)

Wire pwd.verify into your /login route and pwd.hash into /register. When debugging why a login fails, copy the stored hash and the password into this verifier — if it matches here but fails in the app, the bug is in how you load or encode the value (a common one: passing a str where bytes is expected, or the 72-byte truncation below).

How bcrypt works and whether it is secure

Bcrypt is a deliberately slow, salted, adaptive hash built on the Blowfish cipher. “Adaptive” means the cost factor lets you make it slower as hardware speeds up. It is still considered secure for password storage in 2026 — the OWASP Password Storage Cheat Sheet lists both bcrypt and Argon2id as acceptable, recommending Argon2id for new systems and bcrypt (cost ≥ 10, ideally 12) where Argon2 is unavailable. Its main limitation is the 72-byte input cap; pre-hash longer inputs with SHA-256.

Common workflows

Debug a login failure. Copy the stored hash from your DB, paste the user’s password, see if they match. If yes, the bug is elsewhere; if no, the password is wrong.

Verify a hash generator. Generate a hash in your application code, paste it here with the original password. Mismatch means your generator is broken.

Inspect cost factors across a system. Old hashes may use cost 8 or 10; new hashes should use 12+. Decoding makes the distribution visible.

Why bcrypt vs Argon2 vs scrypt

AlgorithmYearUse case
MD5 / SHA-11990sNever for passwords
PBKDF22000Fine; predates GPU attacks
bcrypt1999Workhorse; still acceptable
scrypt2009Memory-hard; newer apps
Argon2id2015Current best; new systems

If you are choosing today: Argon2id. If you have bcrypt: keep it, raise the cost periodically.

Frequently asked questions

What is the cost factor?
The exponent in bcrypt's work-factor: 2^cost iterations. $10$ means 1024 rounds — about 100ms on a 2024 CPU. Higher cost is slower to verify, slower to brute-force. 12 is a sane modern target.
Why is bcrypt still recommended?
Tunable cost, well-studied, supported in every web framework. It pre-dates Argon2 (the modern winner) but remains acceptable for password storage. New systems should use Argon2id; existing bcrypt is fine to keep.
What do <code>$2a</code>, <code>$2b</code>, <code>$2y</code> mean?
Algorithm versions. 2a was the original; 2b fixed a sign-extension bug in 2014; 2y is a PHP-specific variant of 2b. All three verify similarly in modern libraries.
Can I generate a bcrypt hash here?
Verification only. For generation, use your application framework or a CLI like htpasswd -B. Generation should happen close to where you store the hash.
Is the password sent anywhere?
No. Verification runs in your browser using a JavaScript bcrypt implementation. Open DevTools → Network → confirm: zero requests when you click verify.
How long can the password be?
Bcrypt truncates input at 72 bytes — characters past that are ignored. If your application allows longer passwords, it should pre-hash with SHA-256 (then Base64) before bcrypt to avoid the truncation, then bcrypt the digest.
Why do bcrypt hashes differ every time for the same password?
Because bcrypt generates a new random salt on each hash and embeds it in the output. Same password → different hash each time, which is the point: it defeats rainbow tables and hides the fact that two users share a password. Verification still works because the salt is stored inside the hash and reused during the check — which is exactly what this tool does.
Can you decrypt or reverse a bcrypt hash?
No. Bcrypt is a one-way hash, not encryption — there is no key that turns the hash back into the password. The only way to "recover" a password is to guess candidates and hash each one to compare, which is deliberately slow. This tool verifies a password you already have against a hash; it cannot reveal an unknown password.

Related tools

Last updated: 2026-07-04