DevTools Hub

Search tools

Search for a developer tool

Hashing

Hash Comparison

Compare bcrypt, Argon2, scrypt, PBKDF2, and SHA-256 on speed, security, and memory hardness.

Part of the Hashing Toolkit
AlgorithmSpeedSecurityMemory hardness
Argon2idDeliberately slow, tunable via memory × iterations — roughly 50–60ms at OWASP's minimum profile (19,456 KiB, 2 iterations, 1 lane).Strongest of the five — winner of the 2013–2015 Password Hashing Competition. The "id" hybrid variant resists both GPU/ASIC parallel cracking and side-channel attacks.Configurable

Recommended use

Default choice for new systems — OWASP's current top recommendation.

Year introduced

2015

OWASP status

Recommended default

Tunable parameters

Three — memory, iterations, parallelism

Purpose-built from scratch for password hashing rather than adapted from an existing cipher, Argon2id fills a large, configurable block of memory during hashing — expensive for an attacker to parallelize across many GPU cores, each of which would need its own large fast-memory allocation. See Argon2 Explained and Bcrypt vs Argon2 for the full mechanics.

Read more →

bcryptDeliberately slow, tunable via a single cost factor (2^cost rounds) — roughly 60–85ms at OWASP's minimum cost factor of 10.Strong — no known practical break after 25+ years of scrutiny, though its memory footprint is fixed and tiny by modern standards.Fixed
scryptDeliberately slow, tunable via CPU/memory cost (N), block size (r), and parallelism (p) — OWASP's minimum is N=131,072 (2¹⁷), r=8, p=1.Strong — the first mainstream memory-hard KDF, predating Argon2 by six years. Well-studied and widely deployed, including in several cryptocurrency protocols.Configurable
PBKDF2Deliberately slow via iteration count alone — OWASP's current minimums are 600,000 iterations for HMAC-SHA256 (1,400,000 for SHA-1, 220,000 for SHA-512), revised upward over time as hardware gets faster.Acceptable, but the weakest of the four real KDFs here — not memory-hard, so GPU/ASIC parallelism erodes its slowness advantage more effectively than it does bcrypt, scrypt, or Argon2id.None
SHA-256 (general-purpose hash)Extremely fast by design — a single modern GPU computes on the order of billions of SHA-256 hashes per second. This speed is precisely why it's unsuitable for password storage.Not acceptable for password storage. SHA-256 itself isn't broken as a hash function, but it has no built-in salt and no cost factor — brute-forcing it at scale is trivial regardless of salting.None

Click a row for its full detail, year introduced, OWASP status, and tunable parameters.

What this compares

Four of these — Argon2id, bcrypt, scrypt, and PBKDF2 — are real password-hashing algorithms: deliberately slow, built to resist offline cracking. The fifth, SHA-256, is a general-purpose fast hash included on purpose, as the cautionary counter-example: it's exactly what a password hash should not be. Click any row for its year introduced, OWASP status, tunable parameters, and a link to a full write-up.

Why memory hardness is the column that matters most

Speed alone is a weak signal — all four real KDFs can be tuned to roughly the same millisecond range for a single hash. What actually differs, and what determines how expensive an attacker's cracking hardware gets, is memory hardness. GPUs and custom ASICs are extremely good at running billions of parallel guesses; what they're not good at is giving every one of those parallel cores its own large chunk of fast memory. PBKDF2 has none of this — the same slowness runs on cheap, massively parallel hardware. bcrypt has a fixed, tiny (~4 KB) footprint that predates the concept of memory hardness entirely. Argon2id and scrypt make memory usage an actual tunable parameter, typically tens of megabytes per hash — expensive to provision at cracking scale in a way 4 KB or 0 KB never is.

Why SHA-256 is on this list at all

Because "just hash it with SHA-256" is one of the most common real mistakes in password storage, and comparing it directly against the four algorithms built for this job makes the gap concrete rather than abstract. SHA-256 itself isn't broken — it's doing exactly what it was designed to do, which is being fast. That speed is precisely what makes it wrong here: a single modern GPU computes on the order of billions of SHA-256 hashes per second, salted or not. See Why SHA-256 Should Not Be Used for Passwords for the full case.

FAQ

Which one should I actually use?

Argon2id for a new system with no special constraints — it's OWASP's current default recommendation. PBKDF2 specifically when FIPS-140 compliance is a hard requirement. bcrypt or scrypt are both still solid choices, particularly if you're already running one of them in production or working in an ecosystem where it's the established standard — see Bcrypt vs Argon2 for a deeper head-to-head between those two specifically.

Where do the numbers in this table come from?

The OWASP status and minimum parameters match OWASP's Password Storage Cheat Sheet, the same reference this site's Password Hash Generator, Password Hash Inspector, and Bcrypt Cost Calculator use for their own defaults and warnings, so a given number reads the same way across every tool here.

Can I generate or verify one of these hashes directly?

Password Hash Generator computes bcrypt, Argon2id/i/d, scrypt, and PBKDF2 hashes with configurable parameters, and Password Hash Inspector decodes an existing hash you already have back into its cost factor or memory/iteration settings. Both run entirely in your browser.

Related tools