Argon2 hash generator and verifier
This Argon2 hash generator produces password hashes in the standard $argon2id$… string format and verifies passwords against existing hashes. You control every cost parameter, so you can test the exact settings your application uses, reproduce a hash from a test vector, or check that a stored hash still matches a password.
What is Argon2?
Argon2 won the Password Hashing Competition in 2015 and is specified in RFC 9106. It is a memory-hard function: each hash fills a configurable block of RAM and reads it back in a pattern that is expensive to shortcut. That makes large-scale guessing on GPUs and custom hardware far more costly than with fast digests such as SHA-256, which were designed to be quick.
There are three variants:
- Argon2id – a hybrid of the two below and the variant RFC 9106 and OWASP recommend for password storage.
- Argon2i – uses data-independent memory access, which resists side-channel attacks but is weaker against some trade-off attacks.
- Argon2d – data-dependent access, strongest against GPU cracking but can leak timing information. Rarely the right choice for passwords.
Example output
Hashing correct horse battery staple with the defaults (Argon2id, 19456 KiB, t=2, p=1, 32-byte output) and the fixed salt examplesalt12345 gives:
$argon2id$v=19$m=19456,t=2,p=1$ZXhhbXBsZXNhbHQxMjM0NQ$28IdljkIUO5ULliXQ4F53vIBk+Jzbs82ppnGNfykamY
Raw hash (hex): dbc21d96390850ee542e5897438179def20193e2736ecf36a699c635fca46a66
Salt (hex): 6578616d706c6573616c743132333435
Parameters: argon2id, m=19456 KiB, t=2, p=1, 32-byte output
The encoded string is self-describing. After the variant comes the version (v=19 is Argon2 1.3), then memory, iterations and parallelism, then the salt and the hash in unpadded Base64. Because everything needed to verify is inside the string, you store just this one value in your database. That same hash is prefilled in the Hash to verify field, so clicking Verify against hash with the sample password returns a match.
Parameters explained
| Setting | Default | What it does |
|---|---|---|
| Memory (KiB) | 19456 | RAM used per hash (19 MiB here). The main defense against GPU attacks. |
| Iterations (t) | 2 | Passes over memory. Raises CPU time linearly. |
| Parallelism (p) | 1 | Number of independent lanes. Changes the result, so it must match on verify. |
| Hash length | 32 bytes | Length of the output tag. 16 or 32 bytes is typical. |
| Salt | random 16 bytes | Unique per password. Custom salts are read as UTF-8 text and must be at least 8 bytes. |
The defaults match the minimum Argon2id configuration in the OWASP Password Storage Cheat Sheet (m=19 MiB, t=2, p=1). If your server can afford more, increase memory first, then iterations. The status line shows roughly how long one hash took, which helps you tune toward a target such as a few hundred milliseconds on your production hardware, keeping in mind that browser WebAssembly is usually slower than a native library.
Argon2 vs bcrypt, scrypt and PBKDF2
bcrypt uses a fixed 4 KiB of memory and truncates passwords at 72 bytes, so it is still acceptable but offers less GPU resistance; try it with the bcrypt generator. scrypt is also memory-hard but has fewer, more tangled knobs; compare with the scrypt hash generator. PBKDF2 is only CPU-hard and is mainly chosen for FIPS compliance. For new systems, Argon2id is the usual first choice.
Common errors
- "Argon2 requires a salt of at least 8 bytes" – the spec's minimum. Use a longer salt or leave the field blank.
- Verify says no match – check for trailing spaces in the password and make sure the hash was copied completely, including the
$argon2id$prefix. Verification reads the parameters from the hash, so the memory and iteration fields do not need to match. - Page freezes with large memory – values near 1 GiB may exceed what a browser tab can allocate. Test big settings in your server language instead.
Privacy
Hashing runs in your browser through the hash-wasm WebAssembly library, and random salts come from crypto.getRandomValues. Passwords and hashes are never sent to our server. Before hashing a real password, you can gauge its quality with the password strength checker.