Skip to content
BetterPass logo

Argon2 Password Hash — Modern Memory-Hard Hashing

A testing workspace for Argon2: parse PHC hashes, apply OWASP presets, export params as JSON, or tune m/t/p manually — all locally in your browser.

Result will appear here

What is Argon2?

The gold standard for securing passwords. Argon2 is designed to resist GPU and ASIC brute-force by requiring lots of memory — making it expensive for attackers to crack.

Argon2 is a modern password-hashing function that won the Password Hashing Competition (PHC) in 2015 and is now the strongest recommended password hash. It was designed to provide both maximum security and high performance, specifically resisting brute-force attacks from GPUs and ASICs. Its memory-hard design — configurable memory, time, and parallelism — makes it resistant to GPU and ASIC cracking and deliberately expensive to brute-force. Use this tool to hash passwords with Argon2id (recommended), Argon2i, or Argon2d and tune the parameters, or to verify an existing Argon2 hash. Everything runs locally in your browser with no server uploads.

Memory-hard design — requires a large amount of RAM during hashing, making it extremely expensive for attackers to parallelize using specialized hardware.
Side-channel resistance — provides protection against side-channel attacks through its different variants (Argon2i).
Tunable parameters — iterations (time), memory size, and parallelism (threads) allow fine-grained control over security levels.
Three variants — Argon2id (hybrid), Argon2i (side-channel resistant), and Argon2d (data-dependent).

Zero-Server Tool Data Guarantee

All hashing, parsing, and param tuning happens locally in your browser. Your password, salt, and parameters never leave your device.

How to Use

01

Hash or Verify

Use Hash to generate an Argon2 hash, or Verify to inspect and test an existing PHC-format hash.

02

Apply a Preset

Pick a cost preset (Low-resource 16MB, Light 32MB, OWASP 64MB, High-memory 128MB, or Maximum 256MB) to set memory, iterations, and parallelism in one click, or choose Custom to enter m/t/p manually.

03

Export Params

Copy the current parameters as JSON to share settings across a team or into an IaC/secret config.

04

Inspect PHC Params

In Verify mode, paste a hash to see its parsed type, version, m/t/p, and salt before checking for a match.

Common Use Cases

User Password Storage

The industry-standard choice for securing user accounts in modern web applications.

Key Derivation

Securely derive encryption keys from a user's master passphrase for local data encryption.

Cryptocurrency Wallets

Several wallets and privacy-focused blockchains use Argon2 for key derivation and wallet encryption, where its memory-hardness resists GPU-based guessing.

Secure Communications

Derive shared secrets in protocols where resistance to hardware-accelerated cracking is required.

Implementation Examples

JavaScriptNode.js (argon2)
const argon2 = require('argon2');
// Hash a password
const hash = await argon2.hash('mySecurePassword');
// $argon2id$v=19$m=65536,t=3,p=4$somesalt...
// Verify a password
const isMatch = await argon2.verify(hash, 'mySecurePassword');
console.log(isMatch); // true

Argon2 vs Bcrypt vs Scrypt

FeatureArgon2idBcryptScrypt
Memory hardnessVery High (tunable)Low (4KB)High (tunable)
GPU/ASIC resistanceHighestModerateHigh
Tunable parametersMemory, Time, ParallelismCost factorN, r, p
PHC Winner?Yes (2015)NoNo
Recommended forModern projectsLegacy supportHigh memory systems

Production Best Practices & Security

Use Argon2id — it is the recommended default, combining side-channel resistance (Argon2i) and GPU resistance (Argon2d). Why:One algorithm that defends against both attack classes.
Prefer the OWASP preset — m=65536 (64 MiB), t=3, p=4 is the OWASP-recommended baseline. Why:It provides strong GPU/ASIC resistance while keeping verification near ~100ms on modern hardware.
Raise memory before time — if you need more resistance, increase m (e.g., 128 MiB) rather than t. Why:Memory-hardness is Argon2's primary advantage, and it resists specialized hardware far better than raw iteration count.
Tune for your weakest device — pick a preset, or use the Custom option to set m/t/p and test on the slowest device your users run. Why:A setting that is instant on a workstation may take seconds on an old phone, hurting login UX.
Always use a unique random salt — at least 16 bytes per password. Why:Unique salts defeat rainbow tables and ensure identical passwords produce different hashes.
Parallelism ≠ security — set p to match your CPU cores (usually 4 or 8). Why:It speeds up legitimate hashing but does not meaningfully increase attack cost.

Frequently Asked Questions

Argon2 hashes use the PHC (Password Hashing Competition) string format, which packs every parameter into the hash itself so you never need to store them separately. It looks like this:

$argon2id$v=19$m=65536,t=3,p=4$c29tZXNhbHQ$uTQpw...

Reading it left to right:

  • $argon2id — the algorithm variant (id, i, or d).
  • $v=19 — the version (19 = the standard Argon2 version).
  • $m=65536,t=3,p=4 — the parameters: memory in KiB, iterations, and parallelism.
  • $c29tZXNhbHQ — the salt, base64-encoded.
  • $uTQpw... — the 32-byte hash, base64-encoded.

Because the parameters are embedded, verifying a hash only requires the password and the string itself — this tool parses and displays these for you in Verify mode.