Argon2 Hash Calculator | Argon2id, Argon2i & Argon2d
Calculate an Argon2 hash from a password or any string. Supports all three variants — Argon2id, Argon2i, and Argon2d — with OWASP-recommended memory cost and iteration presets. Everything runs in your browser, and nothing you enter is sent to a server.
What this Argon2 hash calculator does
Type a password or any other string and this tool produces its hash using one of the three Argon2 variants: Argon2id, Argon2i or Argon2d. Argon2 won the Password Hashing Competition and resists not only plain brute force but also the fast attacks mounted with dedicated hardware such as GPUs and ASICs, which is why it is widely treated as the first choice for storing passwords in newly built systems.
The strength of the hash rests on three parameters — memory cost, iterations and parallelism. Raising them increases the attacker’s cost, but it equally increases the time and memory a legitimate login consumes. This tool offers the five combinations recommended in the OWASP Password Storage Cheat Sheet as presets; try one of them first, then adjust to the capacity of the server you will actually run on.
How to compute a hash
- Enter the password or string Type the text you want to hash into the password field. What you enter is not transmitted anywhere.
- Choose the variant Unless you have a particular reason otherwise, pick Argon2id, which combines resistance to GPU attacks with resistance to side-channel attacks.
- Apply an OWASP preset Pressing a preset button sets memory cost, iterations and parallelism to one of the combinations OWASP recommends.
- Adjust the parameters if you need to Memory cost in KiB, iterations and parallelism can each be edited directly. The larger the values, the longer the computation takes.
- Press compute and read the result The encoded hash in PHC format is shown along with how long the computation actually took. The copy button saves the result.
Tips for getting more out of it
- Argon2 won the 2015 Password Hashing Competition, and Argon2id is OWASP's current recommended variant. Unless you have a specific reason not to, choose Argon2id.
- The preset buttons offer the five memory-cost and iteration combinations recommended by the OWASP Password Storage Cheat Sheet. The more memory you allocate, the stronger the resistance to parallel GPU attacks.
- Raising the "parallelism (p)" value does not actually run the WebAssembly implementation in parallel in your browser, so the calculation time barely changes. Speedups from parallelism only apply on multi-core server environments.
- A new salt is generated automatically for every calculation, so the same text and parameters will still produce a different encoded hash each time.
- Setting the memory cost extremely high can make your browser tab temporarily unresponsive. We recommend starting with a value in the tens of megabytes.
When this calculator is useful
Deciding how to store passwords in a new service
While designing password storage for a new system, you can see the actual hash length and the computation time for each set of parameters on the spot.
Storing API keys and tokens safely
Beyond login passwords, it also serves when you want to keep confidential strings such as API keys or shared secrets out of the database in plain text.
Preparing dummy hashes for development and testing
Generate hashes here for test accounts you will insert straight into a database, without starting the application.
Getting a feel for how the parameters affect timing
Compute a few times with different values and compare the reported timings; that comparison is what tells you which settings suit your production server.
Considering a migration from bcrypt
Hashing the same string with the bcrypt hash calculator and comparing the output format and the time taken gives you a basis for the migration decision.
Terms used with Argon2
- Argon2id
- A hybrid combining the properties of Argon2d and Argon2i. It delivers resistance to GPU attacks and to side-channel attacks at once, and OWASP names it as the first recommendation.
- Argon2i
- A variant whose memory access order does not depend on the input, which makes it strong against side-channel attacks — those that read information from execution time or power consumption — though slightly weaker than Argon2d against GPUs.
- Argon2d
- A variant whose memory access order does depend on the input. It offers the strongest resistance to parallel attacks with GPUs or ASICs, but is weak against side-channel attacks.
- Memory cost
- The parameter setting how much memory the hash computation uses, given in KiB. Larger values raise the cost of parallel attacks with dedicated hardware.
- Iterations
- Also called the time cost, this parameter sets how many times the internal processing repeats. Larger values lengthen the computation and strengthen resistance to brute force.
- Parallelism
- The parameter setting how many lanes run in parallel. It helps on a multi-core server, but has no effect in the WebAssembly implementation running in a browser.
- Salt
- A random value added before hashing. This tool generates one for every computation, so the same string with the same parameters yields a different hash each time.
- PHC format
- The encoding laid down by the Password Hashing Competition, which packs the algorithm name, version, parameters, salt and the hash itself into a single string, written like $argon2id$v=19$m=...
Frequently Asked Questions
password_verify() or Argon2 verification libraries in other languages. Just be mindful of how you handle any sensitive input.
Side Note — The Password Hashing Competition and the Origins of Argon2
Argon2 was chosen as the winning algorithm from 24 submissions to the Password Hashing Competition (PHC), held between 2013 and 2015. It was designed to overcome a weakness shared by earlier schemes such as BCrypt (1999) and PBKDF2 (2000) — vulnerability to fast brute-force attacks using specialized hardware like GPUs and ASICs — by requiring a large amount of memory to compute.
Argon2 comes in three variants. Argon2d maximizes resistance to GPU-based attacks but is more exposed to side-channel attacks, while Argon2i is hardened against side-channel attacks at the cost of somewhat weaker GPU resistance. Argon2id is a hybrid that combines both properties, and it is now the first choice recommended for password storage by OWASP and many other security organizations.
Since PHP 7.2, generating an Argon2id hash is as simple as passing the PASSWORD_ARGON2ID constant to password_hash(). Official or semi-official libraries are also available for Node.js, Python, Ruby, and other major languages, and Argon2id is increasingly the default choice over BCrypt for storing passwords in newly built systems.