Argon2 Hash Generator
Hash a password with Argon2id, Argon2i or Argon2d, or check one against a hash.
About Argon2 Hash Generator
An Argon2 hash generator that hashes a password with Argon2id, Argon2i or Argon2d, shows the PHC string and raw hash, and checks a password against a hash.
How to use
- In Hash mode, type a password. The hash appears shortly after you stop typing.
- Pick the variant and set memory (KiB), iterations, parallelism and hash length. Reset to OWASP defaults puts back the starting values.
- The salt is 16 random bytes by default; press New salt for another. To reproduce a hash, choose Text, Hex or Base64 and enter the salt.
- Copy the PHC string, which is what you store, or the raw hash in hex.
- To check a password, switch to Verify, paste a PHC string and type the password. The parameters read from the string are listed under the result.
What it does
- Hashing uses the hash-wasm library, compiled to WebAssembly, in a background worker, so the page stays responsive while a large memory setting takes seconds.
- The defaults are the first Argon2id setting in the OWASP Password Storage Cheat Sheet: 19 MiB of memory (19,456 KiB), 2 iterations and a parallelism of 1. RFC 9106 recommends 2 GiB, 1 iteration and 4 lanes, or 64 MiB, 3 iterations and 4 lanes where memory is short.
- Memory is capped at 1 GiB (1,048,576 KiB) so the tab does not run out of memory, which rules out the RFC's 2 GiB option here. Lanes are computed one after another, not in parallel.
- The salt must be at least 8 bytes. The output is a PHC string,
$argon2id$v=19$m=…,t=…,p=…$salt$hash, with the salt and hash in Base64 without padding;v=19is Argon2 version 1.3. - Results are checked against the test vectors of the Argon2 reference implementation.
- Verify recomputes the hash with the parameters and salt from the string and compares the result. It does not read the older version 16 strings or memory settings above the cap, and it does not support a secret key (pepper) or associated data.
Example
password password
salt (text) somesalt
Argon2id, m=65536, t=2, p=1, 32 bytes
→ $argon2id$v=19$m=65536,t=2,p=1$c29tZXNhbHQ$CTFhFdXPJO1aFaMaO6Mm5c8y7cJHAph8ArZWb2GRPPc
hex 09316115d5cf24ed5a15a31a3ba326e5cf32edc24702987c02b6566f61913cf7
Privacy
The password is hashed in a worker on this page. Nothing is uploaded and nothing is stored.
Frequently asked questions
- What are the recommended Argon2id parameters?
- OWASP suggests at least 19 MiB of memory, 2 iterations and a parallelism of 1, or more memory with fewer iterations. RFC 9106 recommends 2 GiB, 1 iteration and 4 lanes, or 64 MiB, 3 iterations and 4 lanes when memory is limited. Use a 16-byte random salt and a 32-byte hash.
- What is the difference between Argon2id, Argon2i and Argon2d?
- Argon2d reads memory in an order that depends on the password, which resists GPU cracking but can leak through side channels. Argon2i uses a fixed order. Argon2id starts like Argon2i and continues like Argon2d, and it is the variant recommended for passwords.
- What does an Argon2 hash string like $argon2id$v=19$m=65536,t=2,p=1 mean?
- It is a PHC string: the variant, the version (19 is Argon2 1.3), the memory in KiB, the number of iterations and the parallelism, followed by the salt and the hash in Base64. Everything needed to verify a password is in the string.
- Is Argon2 better than bcrypt?
- For new systems, yes. Argon2id needs a configurable amount of memory, which makes GPU and ASIC attacks expensive, while bcrypt uses a fixed 4 KiB. OWASP lists Argon2id first and keeps bcrypt for legacy systems.