Guide

THE TOOLBOX / SECURITY & AUTHENTICATION

Hash & verify
Bcrypt passwords locally.

Run the complete OpenBSD EksBlowfish cipher in your browser to generate $2b$/$2a$/$2y$ password hashes, verify candidate matches, and export SQL database seed rows.

BCRYPT HASH & VERIFIEREksBlowfish · 100% Local
18 / 72 UTF-8 bytes
CSPRNG salt · Zero uploads
MODULAR CRYPT ANATOMY & OUTPUTComputed in 43 ms
$2b$08$oQjcaqId3ycOKW8nvywnf.8zRb5wIdQn7SB2BsHXwdy5223v.LeBa
Prefix$2b$
Cost8
Rounds256
Length60 chars

THE DETAILS

OpenBSD EksBlowfish key schedule, Modular Crypt Format anatomy, and the 72-byte UTF-8 boundary.

1. Adaptive EksBlowfish Key Setup

Designed by Niels Provos and David Mazières at USENIX 1999, Bcrypt initializes a 4 KB Blowfish P-array and S-box state using hexadecimal digits of π, then repeatedly re-encrypts the state 2cost times using your password and a 128-bit random salt before encrypting the 24-byte magic string OrpheanBeholderScryDoubt 64 times.

2. Modular Crypt Format Deconstruction

Every 60-character Bcrypt string embeds its own verification parameters: $2b$ (version), $10$ (logarithmic work factor), 22 characters of custom Radix-64 salt (./A-Za-z0-9), and 31 characters of ciphertext checksum. You never store the salt in a separate database column.

3. Real-Time 72-Byte UTF-8 Guard

Because Blowfish uses an 18-word (72-byte) subkey array, passwords exceeding 72 UTF-8 bytes are silently truncated. Multi-byte characters (such as emojis at 4 bytes each) reach the 72-byte ceiling in just 18 characters. Our live byte meter warns you before truncation occurs.

4. Zero-Network Database Seeding

Copy a ready-to-run INSERT INTO users (email, password_hash) statement for Prisma, Drizzle, Rails, Laravel, or Django migrations without exposing test or staging credentials. Need a high-entropy password first, or SHA-256 / HMAC digests? Use the CSPRNG Password Generator, UUID & SHA-256 Generator, or Web Crypto Playground.

Bcrypt Cost Factors & Password Hashing Comparison Matrix

Algorithm / CostKey Derivation Rounds / MemoryOutput LengthRecommended Target
Bcrypt $2b$06$$2^6 = 64$ EksBlowfish rounds (4 KB S-box)60 charsFast CI/CD unit tests & local database seed fixtures
Bcrypt $2b$10$$2^10 = 1,024$ rounds (4 KB S-box)60 charsOWASP baseline minimum for web authentication
Bcrypt $2b$12$$2^12 = 4,096$ rounds (4 KB S-box)60 charsHigh-security production user authentication (~250ms)
PBKDF2-HMAC-SHA256600,000 iterations (FIPS 140-3 compliant)VariableFIPS-regulated enterprise & WebCrypto key derivation

Common Bcrypt Integration Pitfalls & Troubleshooting

Bcrypt Radix-64 vs. Standard Base64

Bcrypt does not use RFC 4648 Base64. It uses its own custom alphabet starting with ./ABCDEFGHIJKLMNOPQRSTUVWXYZ... without = padding. Decoding a Bcrypt salt with standard atob() will corrupt the bytes.

VARCHAR(50) Database Column Truncation

A Bcrypt hash is always 60 ASCII characters long. Storing it in a VARCHAR(50) column silently truncates the last 10 checksum characters, causing every login verification to fail permanently. Use CHAR(60) or TEXT.

PHP $2y$ vs. Node/Go $2a$/$2b$ Mismatches

Some older libraries reject $2y$ prefixes generated by PHP’s password_hash(). Replacing the leading $2y$ prefix with $2b$ allows verification to succeed because the underlying cipher output is identical.

Event-Loop Blocking at High Cost Factors

Every increment of the cost factor doubles CPU time ($2^12$ takes $4\times$ longer than $2^10$). In Node.js backends, always use asynchronous worker-pooled Bcrypt methods rather than synchronous calls on the main request thread.

Frequently Asked Questions

Is it safe to generate or verify production Bcrypt hashes in this tool?

Yes. Unlike legacy online Bcrypt tools that transmit your plaintext password to a PHP or Node.js backend, our EksBlowfish cipher runs 100% client-side inside your browser tab using Web Crypto CSPRNG salts. Zero passwords or hashes ever leave your device.

What is the anatomy of a 60-character Bcrypt modular crypt string?

A standard 60-character Bcrypt string ($2b$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy) consists of: (1) the algorithm identifier ($2a$, $2b$, or $2y$), (2) the 2-digit logarithmic cost factor (e.g. 10 means 2^10 = 1,024 EksBlowfish rounds), (3) a 22-character Radix-64 encoded 128-bit salt, and (4) a 31-character Radix-64 encoded 184-bit ciphertext checksum of the magic string "OrpheanBeholderScryDoubt".

What is the difference between $2a$, $2b$, and $2y$ Bcrypt prefixes?

$2a$ was the original OpenBSD specification. After a sign-extension bug with non-ASCII UTF-8 characters was fixed in crypt_blowfish in 2011, PHP adopted $2y$ to distinguish fixed hashes, and OpenBSD standardized $2b$ in 2014. For all 7-bit ASCII and properly handled UTF-8 strings under 72 bytes, $2a$, $2b$, and $2y$ produce identical checksums.

Why does Bcrypt have a 72-byte password length limit?

The Blowfish P-array consists of eighteen 32-bit subkeys (18 × 4 bytes = 72 bytes), and EksBlowfish appends a null terminator byte (0x00). Any UTF-8 bytes beyond byte 72 are silently ignored by standard Bcrypt implementations.

What Bcrypt cost factor (work factor) should I choose for production?

OWASP recommends a minimum cost factor of 10 (1,024 rounds) and ideally 11 or 12 (2,048–4,096 rounds), tuned so a single password verification takes roughly 150–350 milliseconds on your production CPU.