Password hash verification, from generation to a full audit

Open Tool Password Hash Verifier

Password hash verification, from generation to a full audit

When to use it

Four concrete jobs: check whether a legacy password column is bcrypt or Argon2id before a framework migration, judge whether the current cost or memory setting still fits today's hardware, pick parameters for new sign-ups, and debug the classic "the password is right but login fails" compatibility problem.

Interface with the generate, verify and batch panels

It is meant for backend developers, ops and security reviewers. Everything runs in the browser, so you do not need passlib, node-bcrypt or PHP's password_hash, and you never have to upload production hashes to a third-party site.

Steps

  1. Open the page, keep bcrypt selected, type Correct-Horse-2026 and leave cost at 10, then press Generate. The result panel shows a string like $2b$10$... and the elapsed time appears in the header.
  2. Switch to Argon2id, set m to 19456, t to 2 and p to 1, then generate again. The output looks like $argon2id$v=19$m=19456,t=2,p=1$... and the audit panel rates it A with the measured time.
  3. Paste a stored hash into the Verify panel and type the password the user would submit. A green result confirms the match; a red one means the password and hash disagree, and the parse table still shows the algorithm and parameters.
  4. Read the parameter audit. bcrypt below cost 10 is graded D, 10 to 11 is B, 12 and above is A. Argon2id below m=19456 is D, and PBKDF2 below 600000 iterations is D. Every line explains why and suggests a value.
  5. For bulk work, paste one "hash + tab + password" pair per line in the batch panel, up to 200 rows, run the batch and export the CSV.

A generated bcrypt hash and its timing

Parameters

bcrypt's cost is a power-of-two round count: cost 10 means roughly 1024 rounds and every increment doubles the work. Its 16-byte salt is stored inside the hash string, so nothing else needs to be kept. bcrypt only consumes the first 72 bytes of a password and silently ignores the rest.

Parameter audit with the baseline table

Argon2id has three knobs: m is memory in KiB, t is the number of passes and p is parallelism. OWASP's floor is m=19456, t=2, p=1. Memory matters more than passes because memory is much harder to parallelise on a GPU.

scrypt's N must be a power of two and dominates both memory and time, r controls block size and p controls parallel lanes. Memory use is roughly 128 × r × N bytes, about 16 MB at N=16384 and r=8.

PBKDF2 exposes only an iteration count. OWASP suggests 600000 for SHA-256. It uses no memory, so it resists GPU cracking far less well than Argon2id.

Reading the output

The generated value is a PHC string split by $: algorithm identifier, version and parameters, Base64 salt, Base64 digest. Two runs of the same password differ because each run draws a fresh salt from crypto.getRandomValues. That is expected, not a bug.

Verification returns match or mismatch only, using a constant-time comparison so response timing cannot leak digest prefixes. Beyond "bad hash format" and "password does not match", no internal detail is disclosed.

The A/B/C/D grade compares your parameters with the current baseline: A meets the recommendation, B is usable but light, C carries two or more risks and D is below the floor. Timing is also considered: under 50 ms suggests the parameters are light, over 2 seconds suggests logins will feel slow.

Pure JavaScript is slower than a native library. On this machine Argon2id at m=19456 and t=2 takes about half a second, bcrypt at cost 10 about 80 ms, and PBKDF2 at 600000 iterations three to four seconds. Those numbers describe this device only, not a server.

FAQ

Two runs give different strings. Is the tool broken? No. The random salt guarantees different output for the same password; verification reads the salt back from the string and recomputes.

My database uses $2y$ but the tool generates $2b$. Can they mix? For ASCII passwords the results are identical and they verify each other. For non-ASCII input there is a historical difference, so migrate to $2b$ when you can.

Verification keeps failing. What now? Check that the hash was not truncated (bcrypt is 60 characters), escaped by the ORM or HTML-encoded, and that the password is not trimmed or case-folded in transit.

Can it verify Argon2i or Argon2d? No. Only Argon2id is implemented; other variants are reported as unsupported rather than guessed.

Is the grade an acceptance criterion? No. Baselines move with hardware. Measure the round trip on the target server before shipping and aim for 50 to 500 ms, and keep rate limiting and lockout on the login endpoint.

One more habit worth adopting: keep the algorithm and cost in the user table next to the hash, or at least keep the PHC string intact, because a hash with its parameters stripped can no longer be verified. When a migration rewrites rows, verify a sample of ten old hashes against known passwords before and after, and remember that a successful verification in this page only proves the stored string is internally consistent with the password. It does not prove the surrounding login flow is correct, that the password policy is enforced, or that the user table is not exposed through another endpoint. Treat it as one check in a longer review, and write down the parameters you chose so the next person knows why cost 12 was picked instead of 10.

Record the exact library and version that produced the hash as well, since a reimplementation may differ on edge cases such as embedded null bytes.

New in 1.1.0: hash inventory, Argon2i and Argon2d

Argon2i and Argon2d used to be recognised but not computed. This release implements both for real: i uses data-independent addressing, d uses data-dependent addressing, and both share the same compression function with Argon2id, differing only in how the reference block is chosen. Acceptance uses published vectors from the reference implementation, and both $argon2i$v=19$m=256,t=2,p=1 and $argon2d$v=19$m=1024,t=2,p=2 match byte for byte.

The more useful addition for migration work is the hash inventory. Paste a whole exported column of hashes into the third card and press scan: the page groups them by algorithm and parameters, reports how many bcrypt cost 10 rows exist, how many Argon2id rows use m=65536, and how many PBKDF2 rows sit below 600000 iterations, then assigns each row a disposition (keep, rehash on next password change, or transparent upgrade at login). The result exports as CSV with a fixed five-column layout and RFC 4180 quoting, so spreadsheet software reads it without shifting columns.

1.2.0: one password against many hashes, calibration and migration snippets

After a credential leak the practical question is which other accounts still share the same password. The new card takes a column of hashes plus one password, verifies each line and reports the line number and algorithm; a hit is labelled as the same password being reused. The cap is fifty lines because a pure JavaScript Argon2 run is close to a second, so split large exports into batches. Results export to CSV.

Calibration removes the guesswork from parameter choice. Pick bcrypt or Argon2id, enter the candidate parameters and measure: the tool runs one real hash on this machine, then extrapolates using the doubling cost of each bcrypt step and the near-linear memory scaling of Argon2, producing suggested parameters and predicted timings for a 250 ms and a 500 ms target. Machines differ by two to five times, so this step is not optional.

The migration card writes code for the hash you are holding. The PHP variant is a transparent upgrade inside a successful login using password_needs_rehash, rehashing only when needed and updating one row. The SQL variant gives a template for widening the column, adding an algorithm column and backfilling with an optimistic lock, and explicitly forbids a single UPDATE over the whole table.

1.3.0: compliance mapping, audit summary and sliced batches

The compliance view puts the same parameters through five frameworks. NIST SP 800-63B accepts a salted one-way KDF, with bcrypt cost of at least ten or Argon2id memory of at least 19456 treated as sufficient. OWASP maps directly onto the A to D parameter grade. FIPS 140-3 only lists PBKDF2-HMAC-SHA256, so bcrypt and Argon2 need an exception or a switch to PBKDF2. PCI DSS 4.0 accepts bcrypt cost of ten or more and Argon2id memory of 19456 or more. China MLPS level 3 looks for irreversible salted storage, which all four supported algorithms satisfy. The verdicts are technical judgements, not a substitute for a formal assessment.

The audit summary JSON exports only the algorithm, parameters, grade, findings and compliance verdicts. It contains no password, hash or salt, so it can be filed with audit material without creating a second leak. The inventory JSON follows the same rule and keeps only line numbers, algorithms, key parameters and advice.

Batch verification used to be a synchronous loop, and two hundred Argon2 rows froze the page for tens of seconds. It now runs in slices that yield every forty milliseconds, appending results and updating progress as it goes. A stop button halts the run and keeps the rows already finished.

⏫︎