Bcrypt Hash & Verify

Generate bcrypt password hashes with an adjustable cost factor, or verify an existing hash against a plaintext password. Runs entirely in your browser using bcryptjs.

Hash a password


Verify a hash

About Bcrypt

Bcrypt is an adaptive password-hashing function based on the Blowfish cipher, published by Niels Provos and David Mazières in 1999. Its core feature is a tunable cost factor: as hardware gets faster, you raise the cost so each hash still takes a noticeable amount of CPU, making offline brute-force attacks expensive even if your password database leaks.

A bcrypt hash looks like: $2b$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy$2b$ is the variant, 10 is the cost (2^10 = 1024 iterations of the key schedule), then 22 base64 characters of salt, then 31 of hash.

Picking a Cost Factor

This page lets you crank the cost up to 14 to see how long it really takes on your own hardware before you ship a value to production.

When NOT to Use Bcrypt

Frequently Asked Questions

As of 2024, the OWASP recommendation is a cost factor of 10–12. A factor of 10 takes about 100 ms on a modern server CPU; each increment doubles the work. Pick the highest value your login flow can tolerate.
Yes for most use cases. Bcrypt has been deployed since 1999 and has no known practical breaks. Argon2id is the modern PHC-winner recommendation and is preferred for new systems, but bcrypt remains acceptable per OWASP and NIST.
The prefix identifies the bcrypt variant: $2a$ (original, has a known sign-extension bug in some implementations), $2b$ (current OpenBSD spec), $2y$ (PHP fix for the $2a$ bug). $2b$ is the modern default.
Yes. Bcrypt silently truncates passwords longer than 72 bytes. To support longer passphrases, pre-hash with SHA-256 first (then base64-encode the result before bcrypting) or use Argon2id instead.
No. The bcryptjs library runs entirely in your browser. Nothing is transmitted to any server.
Copied to clipboard!