Bcrypt Generator & Checker
Hash passwords with bcrypt and verify hashes — adjustable cost factor, all client-side.
Bcrypt Generator Tool
How to use the bcrypt generator
Hash mode
Enter a password and pick the cost factor (4–14). Higher cost = slower = harder to brute-force. Production password databases in 2026 typically use cost 10–12.
Read the hash
Output is the standard $2a$<cost>$<salt><hash> format that PHP's password_verify(), Node.js bcrypt libraries, and every other ecosystem speak natively.
Verify mode
Paste any bcrypt hash and a candidate password — the tool checks the salt and cost from the hash itself, recomputes, and tells you whether the password matches.
Note the same-password-different-hash rule
bcrypt includes a random 16-byte salt in every hash output. Hashing "hunter2" twice produces two different hashes — both verify back to the same password. This is by design.
bcrypt — the password-storage standard that has aged well
bcrypt was designed in 1999 by Niels Provos and David Mazières for OpenBSD, specifically to replace the then-common crypt(3) DES-based password hashing that had become broken by Moore's Law. Twenty-six years later it remains the most-deployed password hashing scheme on the web — used by Laravel, Django, Rails, Express, every WordPress install, every major SaaS authentication stack. Its central insight: make the hash function deliberately slow, then make the slowness tunable so it can scale with hardware improvements. Hash a million passwords at cost 4? Fast. Hash a million passwords at cost 14? You're paying a thousand seconds per hash. An attacker brute-forcing leaked hashes pays the same cost — but you only do it once per login, while the attacker does it billions of times.
How bcrypt actually works
The construction is based on a modified Blowfish cipher. The "EksBlowfish" key schedule is run 2^cost times with the password and a 16-byte salt as input, producing a stretched key. That key is then used to encrypt the literal string "OrpheanBeholderScryDoubt" 64 times, and the result is encoded in bcrypt's custom radix-64 alphabet alongside the cost and salt. The output is a single 60-character string starting with $2a$ or $2b$ (the variant identifier), followed by the cost, salt, and hash. Verifying a password is the same operation — extract cost and salt from the candidate hash, recompute, and compare. The cost factor is the binary log of the iteration count; cost 10 means 2^10 = 1,024 iterations, cost 12 means 4,096 iterations.
The 72-byte limit
bcrypt has a quirk that catches developers off guard: it silently truncates passwords longer than 72 bytes. A user setting an 80-character passphrase ends up with the first 72 bytes hashed — the last 8 don't affect the hash. Two passwords that share the first 72 bytes produce identical hashes. This is a property of the underlying Blowfish key schedule. The common workaround is to pre-hash long passwords with SHA-256 or SHA-512 before passing them to bcrypt, producing a fixed 32 or 64-byte input. Modern libraries like Argon2 do not have this limit.
MAS and BNM password-storage guidance
Singapore's MAS Technology Risk Management Guidelines and Malaysia's BNM RMiT guidelines both reference password storage requirements without prescribing a specific algorithm — they require "use of strong, salted, adaptive hashing." bcrypt at cost ≥10, Argon2id with reasonable parameters, and scrypt with appropriate memory factor all satisfy this. What does NOT satisfy: plain SHA-256, MD5, SHA-1, or any unsalted hash. Both regulators audit-flag any ASEAN-licensed fintech caught using MD5 or unsalted SHA-256 for password storage. bcrypt is the path-of-least-resistance compliant choice; Argon2id is the more-modern alternative recommended for new builds.
bcrypt vs Argon2 vs scrypt — picking in 2026
If you're building a new system today: Argon2id with 64MB memory cost and t=3 iterations is the Password Hashing Competition winner (2015) and the recommended modern default. scrypt (2009) was a step between bcrypt and Argon2 — better memory-hardness than bcrypt but harder to tune than Argon2. bcrypt remains the safest "boring" choice — it's been deployed for 26 years without a major break, every language has a mature implementation, and the cost-tuning model is well-understood. If your stack has Argon2 readily available (PHP 7.2+, .NET 5+, Node.js Argon2 package), use it. If not, bcrypt at cost 12 is still defensible for new code in 2026.
10 bcrypt and password-hashing facts
bcrypt was published in 1999 by Niels Provos and David Mazières at USENIX, specifically for the OpenBSD password file. 26 years later it remains uncracked at cost ≥10.
The cost factor is logarithmic — cost 12 takes 16x longer than cost 8, not 1.5x. Doubling cost roughly doubles hash time on the same hardware.
bcrypt silently truncates inputs longer than 72 bytes. Long passphrases get reduced to their first 72 bytes — most modern frameworks pre-SHA256 the input to avoid this.
The "$2a$" prefix dates to 1999. "$2b$" was added in 2014 to fix a bug in the OpenBSD implementation that affected very long passwords. Most libraries accept either prefix.
bcrypt's encoded radix-64 alphabet is NOT standard base64 — it uses ./ instead of +/ and different ordering. Passing a bcrypt hash through standard base64 decoders mangles it.
Argon2id won the Password Hashing Competition in 2015. It's faster than bcrypt at equivalent security and includes memory-hardness against GPU attacks. PHP 7.2+ and modern languages support it.
PHP's password_hash() and password_verify() default to bcrypt since PHP 5.5. From PHP 7.2 they can also use Argon2i and Argon2id by setting PASSWORD_ARGON2I or PASSWORD_ARGON2ID.
MAS Singapore and BNM Malaysia both require adaptive password hashing for licensed financial services. bcrypt at cost ≥10 satisfies both regulators; MD5 and plain SHA-256 trigger audit findings.
The 2012 LinkedIn breach exposed 6.5 million SHA-1 hashes (unsalted). 90% were cracked within a week. The breach drove industry-wide migration to bcrypt and similar adaptive schemes.
A modern GPU can compute about 100 million plain SHA-256 hashes per second. At bcrypt cost 10, the same GPU does about 5,000 hashes per second — a 20,000x slowdown.
Frequently asked questions
Related News
You may be interested in these recent stories from our newsroom.
-
Snowflake jumps 36 per cent in a day on an earnings beat and a US$6 billion AWS chip deal
Snowflake had its best day as a public company on 28 May, closing up 36 per cent after a clean first-quarter beat and a five-year, US$6 bill...
-
MAS Scraps Mandatory Financial Advice for Most Complex Product Buyers in Retail Shake-Up
Singapore retail investors buying structured notes, derivatives and investment-linked policies will no longer need mandatory financial advic...
-
SEC Rewrites Float Rules, PSE Moves to Implement Them — Clearing the Path for GCash's USD 1B Philippine IPO
The SEC lowered the public float floor for large Philippine issuers in February 2026. The PSE followed with a consultation paper in April. T...
75 more free tools
Calculators, converters, security tools — no signup.