- Bcrypt hashes always start with
$2a$,$2b$, or$2y$ - A valid bcrypt hash is exactly 60 characters
- Cost factor (e.g.
$12$) affects verification speed
Ready to verify
Enter a password and bcrypt hash, then click Verify// check if a password matches its bcrypt hash
Verify if a plaintext password matches a bcrypt hash instantly. Free browser-based bcrypt verifier — no server upload, no data stored.
$2a$, $2b$, or $2y$$12$) affects verification speedReady to verify
Enter a password and bcrypt hash, then click VerifyType or paste the plaintext password you want to check against the stored hash.
Paste the bcrypt hash from your database (starts with $2a$, $2b$, or $2y$).
The tool runs PHP's password_verify() server-side and returns a match or mismatch result instantly.
This tool uses PHP's built-in password_verify() function to securely compare a plaintext password against a bcrypt hash. It supports all bcrypt variants ($2a$, $2b$, $2y$) and shows the cost factor and algorithm details.
Your passwords are processed server-side and are never logged or stored.
Yes. The verification is done server-side using PHP's native password_verify() function. We do not log, store, or transmit your password or hash to any third-party service. The request is handled entirely within our server and discarded immediately after the response.
This tool supports all common bcrypt variants: $2a$ (original), $2b$ (corrected, most common today), and $2y$ (PHP-specific alias for $2b$). All three are functionally equivalent for password verification purposes.
Check for extra whitespace — hashes and passwords must be exact. Also confirm the hash starts with a valid bcrypt prefix ($2a$, $2b$, $2y$) and is exactly 60 characters. If you're copying from a database, ensure no encoding conversion has occurred (e.g., escaping of $ characters).
The cost factor (e.g. $12$) controls how many iterations bcrypt runs. Higher cost = slower hashing = harder to brute force. Common values range from 10 to 14. PHP's default is 10. OWASP recommends at least 10, with 12+ for new applications. Verification time doubles with each increment.
No. Bcrypt is a one-way hashing algorithm — it is computationally infeasible to reverse. This tool only checks if a known plaintext password matches a known hash. It does not perform brute force, rainbow table lookups, or any hash-cracking techniques.
$2a$ is the original bcrypt prefix but had a bug with non-ASCII passwords in some implementations. $2b$ was introduced in OpenBSD to fix this. PHP uses $2y$ as an alias for $2b$. For modern PHP applications, password_hash() generates $2y$ hashes, and password_verify() accepts all variants seamlessly.
A bcrypt hash verifier is a tool that checks whether a given plaintext password, when processed through the bcrypt algorithm, produces a hash that matches a stored hash value. It is the same operation your application performs during user login: the user enters a password, and the system calls password_verify($input, $storedHash) to confirm correctness without ever storing or comparing raw passwords.
This tool exposes that operation in a browser-based UI, making it invaluable for developers who need to debug authentication issues, validate hash storage, or verify output from bcrypt generators during development and testing.
💡 Looking for web development assets? MonsterONE offers unlimited downloads of templates, UI kits, and assets — worth checking out.
Bcrypt is a password hashing function designed by Niels Provos and David Mazières, first presented at USENIX in 1999. Unlike MD5 or SHA-1, bcrypt is intentionally slow — it uses a cost factor (also called work factor or rounds) that determines how computationally expensive hashing is. This makes brute-force attacks significantly harder as hardware improves.
When a password is hashed with bcrypt, the resulting hash encodes three pieces of information: the algorithm version, the cost factor, and a 128-bit salt concatenated with the 184-bit hash output. A typical bcrypt hash looks like this:
$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewdBP5M1FpvHJZde
Breaking this down: $2b$ is the algorithm version, 12 is the cost factor (2^12 = 4,096 iterations), followed by the 22-character salt and the 31-character hash. The salt is automatically embedded in the hash string, which is why password_verify() only needs the hash — it extracts the salt internally.
The cost factor is the most important tuning parameter in bcrypt. It is an exponent: a cost of 12 means 2^12 = 4,096 iterations of the key setup algorithm. Each increment doubles the computation time. At cost 10 (PHP default), a modern server might hash a password in ~100ms. At cost 14, that becomes ~1.6 seconds. At cost 16, ~6.4 seconds.
OWASP recommends a minimum cost factor of 10 for bcrypt, and suggests increasing it periodically as hardware improves. The current recommendation for new applications is 12. Higher cost makes each verification slower for attackers attempting brute force, while remaining barely perceptible to legitimate users on a login screen.
Use this verifier to inspect the cost factor of hashes from your database — if you see $2b$10$, consider migrating to $2b$12$ or higher the next time users authenticate (re-hash on successful login).
If this tool reports a mismatch and you expected a match, here are the most common causes:
trim() user input before hashing or verifying.$ characters. Ensure your hash is read as a raw string without any escaping.VARCHAR(255) CHARACTER SET utf8mb4 or similar.VARCHAR(45)), the hash may be silently truncated on insert.password_verify(). Confirm your stored value starts with $2a$, $2b$, or $2y$.Bcrypt remains a solid choice for password storage, but it is worth understanding how it compares to alternatives:
PASSWORD_ARGON2ID (recommended for new applications on PHP 7.3+).For PHP applications started before PHP 7.3 or legacy codebases, bcrypt is the appropriate choice. For greenfield projects, consider PASSWORD_ARGON2ID.
In PHP, verifying a bcrypt hash is a one-liner:
if (password_verify($userInputPassword, $storedHash)) {
// Login success
// Optionally re-hash if cost factor is outdated:
if (password_needs_rehash($storedHash, PASSWORD_BCRYPT, ['cost' => 12])) {
$newHash = password_hash($userInputPassword, PASSWORD_BCRYPT, ['cost' => 12]);
// Update stored hash in database
}
} else {
// Login failure
}
The password_needs_rehash() function is particularly useful for transparently upgrading the cost factor of existing user hashes over time — each time a user logs in successfully, you check if their hash needs an upgrade and silently re-hash it before continuing.
When implementing bcrypt in your application, follow these guidelines to ensure robust password security:
password_hash() — never implement bcrypt manually.VARCHAR(255) column to future-proof against longer hashes.password_verify() handles this internally.