🔐 Argon2 Generator
Hash a password with Argon2id, Argon2i or Argon2d — set memory, iterations and parallelism, or verify a password against an existing Argon2 hash.
About this tool
Argon2 is the winner of the 2015 Password Hashing Competition and the modern recommended choice for storing user passwords. Unlike bcrypt, it is memory-hard: it deliberately allocates a large block of RAM (the memory cost) so that an attacker trying to crack stolen hashes on GPUs or ASICs is limited by memory bandwidth, not just raw compute. This makes offline brute-force dramatically more expensive.
The three variants trade off different resistances: Argon2id (recommended default) combines side-channel resistance from Argon2i with tradeoff resistance from Argon2d. Argon2i is optimized against timing side-channel attacks. Argon2d is maximally resistant to time-memory tradeoff attacks but vulnerable to side channels.
Example: hashing correct horse battery staple with Argon2id, 64 MiB memory, 3 iterations, 4 lanes, 32-byte hash produces an encoded string like $argon2id$v=19$m=65536,t=3,p=4$c2FsdHlzdWx0a2V5$Zm9vYmFy…. The format embeds the version, memory cost (m), time cost (t), parallelism (p), base64 salt, and base64 hash — so you store the whole string in one database column and need no separate salt field.
Use the Verify tab to check whether a plaintext password matches an existing Argon2 hash, exactly as a login flow would: re-run the algorithm with the salt and parameters embedded in the stored hash, then compare.
FAQ
What memory and iteration values should I use? ›
OWASP recommends Argon2id with a minimum of 19 MiB memory, 2 iterations, and parallelism 1 as the baseline. For interactive logins on a modern server, aim for roughly 250–500 ms per hash: a common starting point is 64 MiB memory, 3 iterations, 4 lanes. Measure on your own hardware and tune so a single hash takes 250 ms or more.
What is the difference between Argon2id, Argon2i, and Argon2d? ›
Argon2id is the hybrid default and the recommended choice for password storage — it is resistant to both side-channel and time-memory tradeoff attacks. Argon2i is side-channel resistant but more vulnerable to tradeoff attacks. Argon2d maximizes tradeoff resistance but is vulnerable to side-channel attacks, so it is not recommended for password hashing where an attacker could observe timing.
Argon2 vs bcrypt — which should I use? ›
Both are suitable for password storage. Argon2 is the newer standard (PHC winner, RFC 9106) and is memory-hard, which raises the cost of GPU/ASIC cracking. Bcrypt is battle-tested and simpler. If you are starting fresh, prefer Argon2id; if you have an existing bcrypt store, there is no urgent need to migrate unless you want to raise the memory-cost barrier.
Do I need to store the salt separately? ›
No. The encoded hash string (the PHC format) contains the salt, memory cost, time cost, parallelism, and version embedded inside it. To verify a password you pass the plaintext and the full encoded string — the library extracts everything it needs. Store the whole string in a single VARCHAR column.
Why does hashing feel slow? ›
That is intentional. The memory cost and iteration count are tunable knobs that make each hash expensive to compute, which is what slows down attackers. If hashing is too slow for your use case, lower the memory or iterations; if logins feel too fast, raise them. Always measure on production hardware.