About this tool
Argon2 won the Password Hashing Competition in 2015 and is the first choice for storing passwords today. Unlike a fast hash such as SHA-256, it’s deliberately slow and needs a configurable amount of memory, which makes large-scale guessing with GPUs and custom hardware expensive. This generator creates Argon2 hashes in the standard encoded format and can check a password against an existing hash.
Everything is computed in your browser with WebAssembly or the Web Crypto API. Your passwords and files are never uploaded.
How to use it
- Type a password. A random salt is filled in; click New salt for another.
- Choose the variant and parameters. The defaults are the OWASP minimum for Argon2id.
- Copy the encoded hash: it contains the variant, parameters, salt and hash, which is everything needed to verify later.
- To check a password, paste it and an encoded hash into Verify a password.
Reading an encoded hash
$argon2id$v=19$m=19456,t=2,p=1$c2FsdHNhbHQ$Zmx1ZmZ5aGFzaA
variant version memory (KiB), iterations, parallelism salt hash (both Base64)
Choosing parameters
- Use Argon2id. It combines Argon2i’s resistance to side-channel attacks with Argon2d’s resistance to GPU cracking, and RFC 9106 recommends it.
- OWASP’s minimum is 19 MiB of memory, 2 iterations and parallelism 1. RFC 9106 also suggests 64 MiB with 3 iterations, or 2 GiB with 1 iteration if your servers can afford it.
- Aim for 0.2–0.5 seconds per hash on your login servers, and raise memory first, then iterations. The timing shown here is for your device and browser; measure on your server.
- Plan for upgrades: because parameters are stored in the hash, you can raise them later and rehash each password at the user’s next login.
Argon2 in code
// npm install argon2
import argon2 from 'argon2';
const hash = await argon2.hash(password, { type: argon2.argon2id, memoryCost: 19456, timeCost: 2, parallelism: 1 });
await argon2.verify(hash, password); // true or false# pip install argon2-cffi
from argon2 import PasswordHasher
ph = PasswordHasher(memory_cost=19456, time_cost=2, parallelism=1)
hash = ph.hash(password)
ph.verify(hash, password) # raises VerifyMismatchError if wrong
ph.check_needs_rehash(hash) # True after you raise the parameters$hash = password_hash($password, PASSWORD_ARGON2ID, [
'memory_cost' => 19456, 'time_cost' => 2, 'threads' => 1,
]);
password_verify($password, $hash);FAQ
What is Argon2id?
The recommended variant of Argon2, a memory-hard password hashing function. It resists both GPU cracking and side-channel attacks, and is the first choice in the OWASP password storage guidelines.
Argon2 vs bcrypt: which is better?
Argon2id is the modern recommendation because its memory requirement makes GPU attacks expensive. bcrypt is still acceptable, but it limits passwords to 72 bytes and uses only 4 KB of memory.
What parameters should I use?
At least 19 MiB of memory, 2 iterations and parallelism 1 (the OWASP minimum). Use more memory if your servers can keep each hash under about half a second.
Why is the hash different every time?
Each hash uses a new random salt, so the same password produces a different hash. Verification reads the salt from the encoded hash.
Is it safe to hash passwords on this page?
Hashing runs entirely in your browser and nothing is sent anywhere. Still, avoid entering passwords you use for real accounts on any website.