Why bcrypt is different
Bcrypt is a salted, adaptive password hash. The cost factor controls an exponential amount of work, while a fresh 128-bit salt prevents precomputed tables and makes identical passwords produce different stored hashes.
Create production-compatible bcrypt password hashes with secure salts, understand the exact 72-byte boundary, inspect every hash component, benchmark cost on this device, and export test fixtures — all locally in your browser.
————| # | Hash | Salt | Time |
|---|---|---|---|
| Generate a batch to inspect independent salts. | |||
A good work factor is chosen from server measurements, not copied blindly. This browser benchmark shows relative cost and helps you understand doubling behavior; production authentication should be benchmarked on your actual backend.
| Cost | Rounds | Measured | Relative |
|---|---|---|---|
| Run the benchmark to measure this browser. | |||
Bcrypt is a salted, adaptive password hash. The cost factor controls an exponential amount of work, while a fresh 128-bit salt prevents precomputed tables and makes identical passwords produce different stored hashes.
Bcrypt considers at most 72 bytes of password input. UTF-8 characters can use multiple bytes, so 72 characters is not the same as 72 bytes. This tool blocks generation above the limit by default instead of silently discarding data.
For new applications, modern guidance favors memory-hard algorithms such as Argon2id. Bcrypt remains important for established stacks; when you use it, select a work factor your server can sustain and plan upgrades over time.
$2b$ is the modern interoperable default. $2y$ is commonly emitted by PHP and uses corrected bcrypt behavior. $2a$ exists for older ecosystems and should be used only when compatibility requires it.
Hashing happens in this browser with no network calls and no persistent password history. A browser utility is useful for development and interoperability testing, but your production application should hash passwords in its trusted backend runtime.
import bcrypt from 'bcrypt';\nconst hash = await bcrypt.hash(password, 12);\nconst ok = await bcrypt.compare(password, hash);
$hash = password_hash($password, PASSWORD_BCRYPT, ['cost' => 12]);\n$ok = password_verify($password, $hash);\nif (password_needs_rehash($hash, PASSWORD_BCRYPT, ['cost' => 12])) { /* upgrade */ }