Argon2 hash generator and checker

Runs in your browser

Create Argon2id, Argon2i or Argon2d password hashes with memory, iterations and parallelism you choose, and check a password against a hash.

Argon2 hash
Time on this device
Which settings

Recommended parameters

SourceMemoryPassesParallelism
OWASP Password Storage Cheat Sheet (minimum)19 MiB (19456 KiB)21
RFC 9106, first recommendation2 GiB14
RFC 9106, second recommendation64 MiB34
PHP password_hash(PASSWORD_ARGON2ID)64 MiB41

More memory makes attacks with graphics cards and ASICs expensive. Pick the highest memory your servers can spare per login, then raise the passes until a check takes about half a second at most. Argon2id is the variant to use for passwords; Argon2i and Argon2d exist for special cases.

In your code

Argon2id in common languages

PHP
$hash = password_hash($password, PASSWORD_ARGON2ID, ['memory_cost' => 19456, 'time_cost' => 2, 'threads' => 1]);
password_verify($password, $hash);
Python
from argon2 import PasswordHasher      # pip install argon2-cffi
ph = PasswordHasher(time_cost=2, memory_cost=19456, parallelism=1)
h = ph.hash(password)
ph.verify(h, password)
Node.js
import argon2 from "argon2";
const hash = await argon2.hash(password, { type: argon2.argon2id, memoryCost: 19456, timeCost: 2, parallelism: 1 });
await argon2.verify(hash, password);
Command line
# argon2 package; salt must be at least 8 bytes
echo -n 'password' | argon2 "$(openssl rand -hex 8)" -id -t 2 -k 19456 -p 1 -e
FAQ

Questions about the argon2 generator

Argon2id or bcrypt?

For new systems Argon2id: it is memory-hard, which makes cracking on graphics cards much more expensive. bcrypt is still acceptable and better supported in old stacks.

Why is the 2 GiB setting so slow here?

Your browser has to allocate and fill 2 GiB of memory. On a phone that can fail. It shows why the setting is meant for servers with plenty of memory.

Can an Argon2 hash be decrypted?

No. It is a one-way function. You can only check a guessed password against it.

Searches the list of pages on this site. What you type stays in your browser.