Security Tools

Bcrypt Generator & Verifier

Generate secure bcrypt password hashes with configurable cost factors and verify hashes online privately in your browser.

100% Client-Side Cryptographic Security

Passwords and hashes are processed entirely inside your browser sandbox using compiled Web Crypto and trusted Blowfish key expansion. Zero passwords or hashes are transmitted across the network, stored in databases, logged, or cached in cookies.

Plain Text Password Length: 0 chars • 0 bytes
Cost Factor (Work Rounds: 2cost) 4,096 iterations
Modular Crypt Prefix Modern standard
Generated 60-Character Bcrypt Hash
--
Algorithm
bcrypt (Blowfish)
Cost Factor
12
Salt Length
22 chars (128-bit)
Digest Length
31 chars (184-bit)
Total Length
60 chars
Security Status
Cryptographically Secure

What is Bcrypt & How Does It Work?

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.

Anatomy of a 60-Character Bcrypt Hash

Bcrypt hashes use the standard modular crypt format divided into four distinct components:

$2b$ 1. Prefix (Identifier)
12$ 2. Cost (212 Rounds)
7uK9zQxP3yRtW8mNpL2vAe 3. 128-bit Salt (22 base64 chars)
qW3rT9yU2iO5pA8sD1fG4hJ7kL0zX3c 4. Digest Checksum (31 base64 chars)
1
Unique Random Salt

A 128-bit cryptographically secure pseudorandom salt is generated for every single password. This completely neutralizes precomputed rainbow table attacks.

2
Eksblowfish Setup

The key schedule expands using both the user password and salt through $2^{\text{cost}}$ iterations, consuming CPU cycles to thwart attackers.

3
64-Round Feistel

Blowfish encrypts the constant 192-bit string "OrpheanBeholderScryDoubt" 64 times, outputting the final 184-bit ciphertext digest.

4
Standard Radix-64

The salt and ciphertext are encoded into standard modular crypt Radix-64 characters (./A-Za-z0-9), resulting in a fixed 60-character string.

Understanding Cost Factors & The 72-Byte Limit

The Bcrypt 72-Byte Password Limit

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.

Production Best Practice: If your system allows arbitrary password lengths, pre-hash passwords using SHA-256 (which produces a fixed 32-byte binary digest) prior to passing them into bcrypt, or adopt Argon2id.

Why Do Cost Factors Scale Exponentially?

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.

Recommended Setting: Use Cost 10–12 for web applications. Cost 14+ is suitable for ultra-high security offline master keys.

Bcrypt vs. Other Cryptographic Hash Algorithms

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!

Frequently Asked Questions

Bcrypt is an adaptive cryptographic password-hashing function designed by Niels Provos and David Mazières in 1999. Based on the Blowfish cipher, it incorporates a random salt and a configurable work factor (cost) to protect stored passwords against brute-force, dictionary, and rainbow table attacks.
Yes. Bcrypt remains one of the most widely recommended and battle-tested password storage algorithms by security bodies, including OWASP. Because its computation cost can be adjusted over time as hardware becomes faster, it continues to provide strong defense against modern GPU-based cracking clusters.
To generate a bcrypt hash, simply enter your password into the input field above, choose your preferred cost factor (e.g., 10 or 12), and click "Generate Bcrypt Hash". The tool immediately computes a 60-character hash formatted with your chosen modular crypt prefix ($2a$, $2b$, or $2y$).
Yes. Switch to the "Verify Bcrypt Hash" tab, enter the candidate plain text password, and paste the existing 60-character bcrypt hash. The verification algorithm extracts the salt and cost factor embedded within the hash, re-computes the key schedule, and checks for an exact cryptographic match in constant time.
Every time a password is hashed with bcrypt, a new, unique 128-bit cryptographically secure pseudorandom salt is generated. Because the salt is unique for every operation, hashing "mypassword" 100 times will produce 100 entirely different 60-character hashes, even though all 100 will verify correctly against "mypassword".
The cost factor defines the number of key expansion rounds via the formula 2cost. For example, a cost factor of 10 results in 1,024 iterations, while a cost factor of 12 results in 4,096 iterations. Higher cost factors demand more CPU cycles, making unauthorized guessing significantly slower.
Most modern production frameworks (including Laravel, Spring Security, and Node.js bcrypt packages) default to a cost factor of 10 or 12. Cost 12 is generally recommended for current server hardware, as it requires approximately 250–350 milliseconds to calculate, creating an optimal barrier against brute-force attacks without impacting user login responsiveness.
No. Bcrypt is a strictly one-way cryptographic hash function, not reversible two-way encryption. There is no mathematical key or algorithm that can decrypt or reverse a bcrypt hash back into the original plain text password. The only method to check a password is by re-hashing the candidate string with the embedded salt and comparing the outputs.
Yes, dramatically better. Standard MD5, SHA-1, and SHA-256 functions were engineered for rapid file verification and data streaming. A single modern graphics card can compute over 10 billion SHA-256 hashes per second. Storing passwords in MD5 or SHA-256 leaves them vulnerable to instant cracking. In contrast, bcrypt's memory cost and configurable iterations limit crackers to only a few thousand attempts per second.
No. PaceTools enforces zero data retention. All hashing and verification procedures take place directly within your browser's local JavaScript execution context. No passwords, hashes, or logs are transmitted over the internet or saved to server storage, cookies, or localStorage.

Related Security & Cryptographic Tools