Argon2 Hash Generator
Generate Argon2i, Argon2d, and Argon2id hashes online with configurable time cost, memory, parallelism, and salt. Free browser-based tool.
About
Argon2 is the winner of the 2015 Password Hashing Competition and is specified in RFC 9106. It is a memory-hard function designed to resist GPU and ASIC attacks by requiring a configurable amount of RAM per hash computation. Choosing weak parameters - low memory cost m or time cost t - directly reduces the cost an attacker pays to crack each password. This tool computes Argon2d, Argon2i, and Argon2id hashes entirely in your browser using a pure JavaScript implementation of the full algorithm including the Blake2b compression function. No data leaves your machine.
OWASP recommends Argon2id with a minimum memory cost of 19456 KiB (19 MiB) and time cost t ≥ 2. This tool defaults to those parameters. Note: computation time scales linearly with t and m. Very high memory values may cause the browser tab to run out of memory on devices with limited RAM. The parallelism parameter p defines logical lanes but does not multithread in this single-worker implementation; it still affects the output hash.
Formulas
Argon2 operates on a memory matrix B of q blocks, each 1024 bytes. The total block count is derived from the memory parameter:
The initial hash H0 is computed via Blake2b over all input parameters concatenated:
Each block is filled using the compression function G, which is derived from the Blake2b round function applied to two 1024-byte inputs:
After t passes, the final block is the XOR of the last block in each lane, then passed through variable-length Blake2b hash H′ to produce the τ-byte tag.
Where p = parallelism (number of lanes), t = time cost (iterations), m = memory cost in KiB, τ = desired output hash length in bytes, v = version (0x13), type = variant identifier (0, 1, or 2), and ⊕ denotes bitwise XOR.
Reference Data
| Parameter | Symbol | RFC 9106 Default | OWASP Minimum | High Security | Description |
|---|---|---|---|---|---|
| Variant | - | Argon2id | Argon2id | Argon2id | Hybrid of data-dependent and data-independent indexing |
| Time cost (iterations) | t | 1 | 2 | 4 | Number of passes over memory |
| Memory cost | m | 221 KiB | 19456 KiB | 65536 KiB | RAM in KiB allocated for the hash |
| Parallelism | p | 4 | 1 | 4 | Number of independent computational lanes |
| Hash length | τ | 32 bytes | 32 bytes | 64 bytes | Length of the output digest |
| Salt length | - | 16 bytes | 16 bytes | 32 bytes | Random nonce; must be unique per password |
| Block size | - | 1024 bytes | - | - | Fixed internal block size |
| Argon2d | - | Type 0 | Not recommended alone | - | Data-dependent indexing; vulnerable to side-channel attacks |
| Argon2i | - | Type 1 | Not recommended alone | - | Data-independent indexing; weaker tradeoff resistance |
| Argon2id | - | Type 2 | Recommended | Recommended | First pass half uses Argon2i, rest uses Argon2d |
| Max password length | - | 232 − 1 bytes | - | - | Practical limit; UTF-8 encoded |
| Encoded format | - | $argon2id$v=19$... | - | - | PHC string format for storage |
| Internal hash | - | Blake2b | - | - | Used for initial hashing and compression |
| Version | v | 0x13 (19) | 19 | 19 | Current version identifier |
Frequently Asked Questions
crypto.getRandomValues(), which is a CSPRNG.$argon2id$v=19$m=19456,t=2,p=1$BASE64_SALT$BASE64_HASH. It encodes all parameters needed to verify a password. Store this complete string in your database. To verify, parse the parameters and salt from the string, re-hash the candidate password with the same parameters, and compare the resulting hash. This tool outputs the encoded string for direct storage use.