Cryptography & Security ToolsUpdated: September 2026

Bcrypt Hash Generator & Password Verifier | Client-Side Security Tool

Generate salted bcrypt hashes with custom cost factors (rounds 4-14) and verify plaintext passwords against $2a$, $2b$, and $2y$ hashes 100% in your browser.

Research: LocalTooldeck Financial & Engineering Team
Audit: Verified for Mathematical Accuracy
Advertisement
Reserved 728×90 Top Responsive LeaderboardCLS Guard: Strict Layout Reservation (min-height: 250px)

100% In-Browser Cryptographic Execution

Bcrypt computations (salt generation, key schedule, and password comparisons) execute entirely inside your local browser memory via compiled JavaScript. Zero network requests are initiated, guaranteeing total operational privacy for confidential credentials and audit hashes.

Advertisement
Reserved 728×90 Top Responsive LeaderboardCLS Guard: Strict Layout Reservation (min-height: 250px)
Prefix Revision$2a$
Cost Rounds10 (1,024 iterations)
128-bit Base64 Salt (22 chars)N9qo8uLOickgx2ZMRZoMye
Advertisement
Reserved 336×280 In-Content RectangleCLS Guard: Strict Layout Reservation (min-height: 280px)

Architecture and Security Foundations of the Bcrypt KDF

The bcrypt password hashing function was developed in 1999 by Niels Provos and David Mazières for the OpenBSD operating system as a direct response to vulnerabilities in traditional UNIX crypt() and unsalted single-iteration digest algorithms. While general-purpose cryptographic hash functions (such as MD5, SHA-1, and SHA-256) were optimized for maximum packet-throughput in digital signature verification and checksum integrity, bcrypt was specifically engineered to be computationally expensive and memory-bound.

At the core of bcrypt lies the Eksblowfish (Expensive Key Schedule Blowfish) cipher algorithm. Standard Blowfish utilizes a key expansion phase that computes thirty-two 32-bit subkeys and four 256-entry S-boxes ($4 \times 256 = 1,024$ 32-bit words). Eksblowfish modifies this setup by introducing an exponential cost parameter 2cost that repeatedly re-keys the state with both the password and a 128-bit cryptographically random salt. This creates a stateful internal memory requirement that severely limits the effectiveness of custom Application-Specific Integrated Circuits (ASICs) and graphics processing units (GPUs).

Anatomy of the Modular Crypt Bcrypt String

Every standard bcrypt hash consists of a string exactly 60 ASCII characters long formatted in four distinct sections separated by dollar signs ($):

$2b$12$D3vSeCURiTY123456789012abcdefghijklmnopqrstuvwxyz12345
  • Prefix Identifier ($2a$, $2b$, or $2y$): Specifies the algorithm specification revision. Revision $2a$ is standard; $2y$ is a PHP compatibility alias; $2b$ is the modern standard addressing edge-case byte wraparounds.
  • Work Factor / Cost (2 digits): The base-2 logarithm of the iteration count. A value of 10 represents $2^10 = 1,024$ rounds. A value of 12 represents $2^12 = 4,096$ rounds.
  • Salt (22 characters): A 128-bit (16-byte) random initialization vector encoded into a modified 64-character base64 alphabet (using characters ./A-Za-z0-9).
  • Ciphertext Hash (31 characters): The resulting 184-bit output derived from encrypting the 24-character plaintext string "OrpheanBeholderScryDoubt" 64 times with the finalized Eksblowfish subkeys.

Comparative Evaluation: Password Hashing Algorithms

AlgorithmPrimary DefenseMemory HardnessMax Password LengthOWASP / NIST Status
BcryptEksblowfish Key Schedule (2cost)4 KB (moderate)72 Bytes (strict truncate)Recommended (Cost ≥ 10)
Argon2idMemory-Hard + Time-Hard MatrixConfigurable (16 MB - 64 MB)Unlimited (< 4 GB)Gold Standard (PHC Winner)
PBKDF2-HMACIterative Hash Cycles ($N \ge 600,000$)None (0 KB overhead)UnlimitedCompliant (FIPS 140-3)
SHA-256 / MD5None (Zero work factor scaling)NoneUnlimitedForbidden for Passwords

The 72-Byte Truncation Limit Caveat

Due to the internal Blowfish key schedule mechanics, bcrypt only reads up to the first 72 bytes of any input password. Any characters beyond byte 72 are silently discarded during the Eksblowfish setup. In modern high-security authentication systems requiring arbitrarily long passphrases, developers frequently apply a pre-hashing step: the user's password is first digested via SHA-256 or SHA-512 into a fixed 32-byte or 64-byte binary seed before being passed to bcrypt. This guarantees uniform key distribution without exceeding the 72-byte architectural threshold.

Advertisement
Reserved Responsive Bottom PlacementCLS Guard: Strict Layout Reservation (min-height: 250px)
Advertisement
Reserved 336×280 In-Content RectangleCLS Guard: Strict Layout Reservation (min-height: 280px)

Frequently Asked Questions (US Standards)

How does the bcrypt password hashing algorithm work?
Bcrypt is an adaptive cryptographic hash function designed by Niels Provos and David Mazières in 1999, based on the Blowfish cipher (specifically the Eksblowfish or "Expensive Key Schedule Blowfish" algorithm). Unlike general-purpose cryptographic hash functions like SHA-256 or MD5 which were designed for maximum processing throughput, bcrypt is deliberately computationally intensive. It combines a 16-byte random salt, an exponential work factor (cost rounds 2^cost), and a 192-bit state to defeat mass hardware parallelization via ASICs and GPUs.
What is the structure of a bcrypt hash string?
A standard modular crypt format bcrypt string is exactly 60 characters long and structured into four delimited segments: $[algorithm]$[cost]$[salt + hash]. For example, in "$2a$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy", "$2a$" identifies the bcrypt revision, "10" denotes the log2 cost factor (2^10 = 1,024 iterations), the next 22 characters represent the base64-encoded 128-bit salt, and the trailing 31 characters represent the 184-bit ciphertext hash.
What is the difference between $2a$, $2b$, and $2y$ bcrypt prefixes?
The revisions signify minor implementation bug fixes across historical software releases. Revision $2a$ resolved character set handling in early OpenBSD versions. Revision $2y$ was introduced in PHP's crypt() library to rectify an 8-bit sign extension vulnerability without invalidating existing hashes. Revision $2b$ was introduced in OpenBSD in 2014 to fix a length wrap-around bug when hashing strings longer than 255 bytes. All three revisions use the same underlying algorithm and are cross-compatible in modern libraries.
Why does increasing the cost factor by 1 double the hashing time?
The bcrypt cost factor represents the logarithm base 2 of the internal Eksblowfish key setup iterations (2^cost). When you increase the cost factor from 10 (1,024 rounds) to 11 (2,048 rounds), you exactly double the cryptographic work required to compute or verify the hash. OWASP recommends a cost factor of at least 10 (and ideally 12) for web application password authentication, targeting a calculation latency of 250 to 500 milliseconds per hash on server hardware.
Is my password safe when tested in this browser tool?
Yes. All hash generation and verification operations execute 100% within your client-side browser runtime using an isolated JavaScript WebAssembly/worker execution path. No passwords, salt values, or hashes are transmitted across the network, stored in cookies, or sent to backend servers.
Advertisement
Reserved Responsive Bottom PlacementCLS Guard: Strict Layout Reservation (min-height: 250px)
Advertisement
Reserved 320×100 Mobile Anchor