Generate secure bcrypt password hashes with configurable cost factors and verify hashes online privately in your browser.
Bcrypt is a cryptographic password-hashing function designed by Niels Provos and David Mazières in 1999 for the OpenBSD operating system. It is based on the Bruce Schneier Blowfish block cipher and uses an adaptive key setup algorithm (Eksblowfish). Unlike fast non-salted or fast cryptographic hash functions like MD5 and SHA-256 (which compute billions of hashes per second and allow rapid brute-force attacks), bcrypt is intentionally computationally slow and resource-intensive, making offline dictionary attacks and GPU/ASIC cracking astronomically expensive.
Bcrypt hashes use the standard modular crypt format divided into four distinct components:
A 128-bit cryptographically secure pseudorandom salt is generated for every single password. This completely neutralizes precomputed rainbow table attacks.
The key schedule expands using both the user password and salt through $2^{\text{cost}}$ iterations, consuming CPU cycles to thwart attackers.
Blowfish encrypts the constant 192-bit string "OrpheanBeholderScryDoubt" 64 times, outputting the final 184-bit ciphertext digest.
The salt and ciphertext are encoded into standard modular crypt Radix-64 characters (./A-Za-z0-9), resulting in a fixed 60-character string.
Due to Blowfish's internal key schedule, bcrypt has a hard limit of 72 bytes. Any characters beyond 72 bytes are silently truncated by standard implementations. For instance, a 100-character password and an identical 72-character password would produce the exact same bcrypt hash.
The cost factor $C$ represents $2^C$ key expansion rounds. Incrementing the cost factor by 1 doubles the required execution time. Cost 12 requires $4,096$ rounds (approx. 250–350ms on modern hardware), which is the recommended balance for secure authentication without causing noticeable login latency.
Compare how Bcrypt measures against modern password derivation functions and general cryptographic digests:
| Algorithm | Primary Purpose | Salt Mechanism | Memory-Hardness | GPU Cracking Resistance | Recommended Production Use |
|---|---|---|---|---|---|
| Bcrypt | Password Storage | Automatic 128-bit random salt | Moderate (4 KB cache) | Very High | Default standard for web logins, APIs, and microservices |
| Argon2id | Password Storage | Configurable salt | High (Memory & Time hard) | Maximum | Password Hashing Competition (PHC) winner; modern cutting-edge apps |
| PBKDF2 | Key Derivation | Configurable salt | None (Pure CPU/Time) | Moderate | FIPS compliance & government regulations (e.g. NIST SP 800-132) |
| Scrypt | Password Storage | Configurable salt | High (Configurable RAM) | High | Cryptocurrency wallets, cold storage backup encryption |
| SHA-256 / SHA-512 | Data Integrity & Signatures | None (Requires manual HMAC) | None (Ultra fast) | Zero (Vulnerable) | File checksums, digital certificates. Never for raw passwords! |
Generate cryptographically random passwords with custom sets and symbols.
Analyze password entropy, dictionary patterns, and estimated crack time.
Compute secure 64-character SHA-256 cryptographic hashes for text and files.
Generate ultra-high collision resistant 128-character SHA-512 digests.