What is an Argon2 hash generator?
An Argon2 hash generator turns a password or text value into a slow, memory-hard password hash. Unlike a fast checksum such as SHA-256, Argon2 is designed to make repeated password guesses expensive. The generated result uses the standard PHC string format, which stores the Argon2 variant, version, cost parameters, salt, and digest together.
This tool supports Argon2id, Argon2i, and Argon2d. Argon2id is the default because it balances resistance to side-channel and GPU attacks and is the variant recommended for new password-storage systems.
How to generate an Argon2 hash
- Enter the password or text to hash.
- Keep the responsive browser defaults or adjust the parameters in Options.
- Review the visible salt in Options. Select Random for a fresh 16-byte value, or enter a UTF-8, Hex, or Base64 salt when reproducing a test case.
- Select Generate and copy the PHC result.
The salt stays unchanged until you edit it or select Random, which makes deterministic test cases easy to repeat. Use a new random salt for every password hash you intend to store. The password can still be verified because the salt and parameters are stored in the PHC string.
Argon2 PHC hash format
An encoded Argon2id result has this structure:
$argon2id$v=19$m=19456,t=2,p=1$<salt>$<digest>| Part | Meaning |
|---|---|
argon2id | Argon2 variant |
v=19 | Argon2 version 1.3 |
m=19456 | Memory cost in KiB |
t=2 | Iteration count |
p=1 | Degree of parallelism |
<salt> | Base64-encoded salt bytes |
<digest> | Base64-encoded hash bytes |
Store the complete PHC string. A separate salt column is unnecessary when your password library stores and verifies this format directly.
Argon2id vs Argon2i vs Argon2d
| Variant | Addressing | Typical role |
|---|---|---|
| Argon2id | Hybrid data-independent and data-dependent | Recommended default for password hashing |
| Argon2i | Data-independent | Compatibility with systems specifically configured for Argon2i |
| Argon2d | Data-dependent | Compatibility and specialized environments where side-channel attacks are not a concern |
Choose the variant required by the system you are testing. Use Argon2id when creating a new password-storage configuration unless your platform has a different documented requirement.
Argon2 parameters explained
| Parameter | What it controls | Tool limit |
|---|---|---|
| Memory cost | Memory used by each operation, stored as m in KiB | 8–262,144 KiB and at least 8 × p |
| Iterations | Number of passes over the memory, stored as t | 1–10 |
| Parallelism | Number of lanes, stored as p | 1–16 |
| Hash length | Size of the output digest | 4–64 bytes |
| Salt | Unique input that prevents identical passwords from sharing a hash | Editable 8–64 bytes; Random creates 16 bytes in Hex |
The 256 MiB memory limit protects browser stability; it is not a production security recommendation. The initial browser options use Argon2id, m=4096, t=2, p=1 for responsive interactive use. OWASP documents Argon2id, m=19456, t=2, p=1 as a minimum starting point for password storage in the OWASP Password Storage Cheat Sheet. Benchmark memory and latency on the server that will perform authentication.
RFC 9106 also describes 2 GiB and 64 MiB Argon2id profiles. Those profiles are useful reference points, but the 2 GiB option is intentionally unavailable in this browser tool. See the Argon2 recommendations in RFC 9106.
How Argon2 password verification works
Switch to Verify, enter a password and a complete Argon2 PHC string, then select Verify. The verifier reads the variant, salt, and cost parameters from the encoded hash, calculates a candidate digest, and checks whether it matches.
Verification accepts Argon2id, Argon2i, and Argon2d version 19 hashes. Hashes that request more than the browser parameter limits are rejected before calculation.
Argon2 compared with other password hashes
| Algorithm | Memory hard | Common reason to use it |
|---|---|---|
| Argon2id | Yes | Preferred modern password hashing when supported |
| scrypt | Yes | Alternative when Argon2 is unavailable |
| bcrypt | Limited | Compatibility with established or legacy systems |
| PBKDF2 | No | Platform or compliance requirements |
These algorithms use different encoded formats and parameters. An Argon2 hash cannot be converted into a bcrypt, scrypt, or PBKDF2 hash without the original password.
Argon2 hash generator FAQ
Can you decrypt an Argon2 hash?
No. Argon2 is a one-way password hashing function, not encryption. Test a candidate password with the verifier instead of trying to decode the hash.
Why can the same password produce a different hash?
Different salts produce different hashes. Select Random before generating another independently stored password hash; keep the existing salt when you need repeatable output for a test case.
Are the browser defaults right for production?
They prioritize responsive interactive use and are not a production recommendation. OWASP’s documented minimum starting point for Argon2id password storage uses 19 MiB memory, 2 iterations, and 1 lane. Benchmark memory and latency on your production hardware before choosing final parameters.
When should I use a custom salt?
Use a custom salt to reproduce a test vector, compare library output, or debug an existing integration. For ordinary password storage, select Random so every independently stored hash receives a fresh value.
Does the PHC string include the salt?
Yes. The complete encoded string contains the variant, version, cost parameters, salt, and digest needed for later password verification.