How to use the Argon2 Hash Generator
- 1
Type a password
It is hashed locally in WebAssembly.
- 2
Pick a preset or custom settings
Memory in KiB, iterations, parallelism, hash length and optional hex salt.
- 3
Generate
You get the PHC string, the raw hash in hex and the time it took on this device.
- 4
Verify
Paste any $argon2…$ string and a password to test a match.
Features
Memory-hard
From 8 KiB × parallelism up to 1,048,576 KiB (1 GiB).
Timing shown
See how long each setting takes on real hardware.
Random or fixed salt
Leave blank for 16 random bytes, or enter at least 8 bytes in hex to reproduce a hash.
Hash length 4–128 bytes
32 bytes is the usual choice.
PHC string output
Parameters, salt and hash in one storable value.
Verifier
Reads the parameters from the string itself.
Who uses it — and for what
Back-end developers
Pick parameters before configuring a framework.
Testers
Create known hashes for test fixtures.
Security reviewers
Check stored hashes use sensible settings.
Learners
Watch how memory and iterations change the time.
Why Argon2?
Argon2 won the Password Hashing Competition in 2015 and is standardised in RFC 9106. Unlike older hashes, it is memory-hard: every guess needs a large block of RAM, which makes cracking with GPUs and custom chips far more expensive. Argon2id combines resistance to GPU cracking and side-channel attacks and is the variant recommended by OWASP for storing passwords.
The encoded output ($argon2id$v=19$m=19456,t=2,p=1$salt$hash) contains every parameter plus the salt, so it can be stored in one database column and verified by libraries such as argon2 for Node.js, PHP’s password_verify(), Python’s argon2-cffi and Spring Security.
Choosing parameters
- Memory — the main defence. OWASP’s minimum is 19 MiB with 2 iterations; use more if your servers can spare it.
- Iterations — passes over memory; raise it when memory is limited.
- Parallelism — threads; keep 1 unless your server library uses more.
Aim for 200–500 ms per hash on your login server. Hashing runs here in WebAssembly, single-threaded, so timings are a rough guide.
Everything is computed by your browser’s built-in Web Crypto API — keys, passwords and secrets are never sent to a server, logged or stored. You can even disconnect from the internet after the page has loaded.
Where the presets come from
The OWASP minimum preset (19 MiB, 2 iterations, 1 lane) is the baseline in OWASP’s Password Storage Cheat Sheet at the time of writing. That guidance also lists equivalent trade-offs that use less memory and more passes — for example 12 MiB with t=3, 9 MiB with t=4 or 7 MiB with t=5 — handy when RAM is tight. The RFC 9106 low-memory preset (64 MiB, t=3, p=4) is the second recommended option in the Argon2 RFC; its first recommendation, 2 GiB with a single pass, is larger than this page’s 1 GiB limit and is meant for dedicated servers. Strong (256 MiB, t=4) suits low-traffic admin logins or key derivation where a slow hash is acceptable.
Reading and upgrading stored hashes
A PHC string is self-describing: $argon2id names the variant, v=19 is version 1.3 of the algorithm, m is memory in KiB, t the number of passes and p the lanes, followed by the Base64 salt and hash without padding. That makes upgrades painless: when you raise your parameters, keep verifying old hashes with the parameters stored in them, and after a successful login re-hash the password with the new settings and save the new string. Users never notice. Prefer Argon2id unless you have a specific reason: Argon2d is fastest against GPU attacks but leaks timing information, and Argon2i resists side channels but needs more passes. For older systems, the Bcrypt Generator covers bcrypt.
Worked examples
Same input, same output
Password correct horse battery staple, salt 000102030405060708090a0b0c0d0e0f and the OWASP preset (m=19456, t=2, p=1, 32 bytes) give $argon2id$v=19$m=19456,t=2,p=1$AAECAwQFBgcICQoLDA0ODw$gYJZtjEAJqjg26xdLmknq8/bB7MiWPrE9hsYuA+SkIU. The salt appears as 22 Base64 characters and the 32-byte hash as 43. Repeating it with a fixed salt gives the identical string — useful for tests, and exactly why real systems must use a new random salt per password.
Change one parameter
The same password and salt with the RFC 9106 preset (m=65536, t=3, p=4) produce a completely different hash ending …hTsnKkTbFCHAKWJmmlXrCZTzyrOF7RxMeSU+7hm6tJ4. Verification still works because the string records m, t and p — no separate configuration is needed.
Capacity planning
Each login holds its memory until the hash finishes. If a server can spare 2 GiB for hashing, the OWASP preset (19 MiB) allows about 107 simultaneous logins, the RFC preset (64 MiB) 32, and the strong preset (256 MiB) only 8. Choose memory with peak login traffic in mind.
Pro tips
- Browser WebAssembly runs one thread, so p=4 here takes roughly four times as long as on a server that runs the lanes in parallel.
- Never reuse a fixed salt outside testing — the salt must be random and unique for every stored password.
Glossary
- PHC string
- The $argon2id$v=19$m=…,t=…,p=…$salt$hash format from the Password Hashing Competition.
- KiB / MiB
- Kibibyte (1,024 bytes) and mebibyte (1,024 KiB); 19,456 KiB is exactly 19 MiB.
- Lanes (parallelism)
- Independent memory segments that can be processed by separate threads.
Frequently asked questions
Argon2id or bcrypt?
Argon2id for new projects; bcrypt is still acceptable and widely supported.
Can I verify hashes from my app?
Yes — paste the full $argon2id$… string and the password.
Why does a large memory setting take long?
That is the point — it makes attackers pay the same cost for every guess.
Why does the tool refuse a short salt?
Salts under 8 bytes are below the minimum the algorithm allows; 16 random bytes is the usual choice.
Does the hash length affect security?
32 bytes is plenty for password storage. Longer outputs mainly matter when Argon2 is used to derive encryption keys.
Can I verify an Argon2d or Argon2i hash?
Yes. The verifier accepts any string starting with $argon2id$, $argon2i$ or $argon2d$ and reads the parameters from it.
Last updated 2026-11-28 · Built by Vinayak Agarwal · Part of Security & Privacy (20 tools)