JWT Security Audit
Audit a JWT in your browser: eight checks, plain findings and a local weak-key scan.
Data is processed only in your browserHow to use
JWT Security Audit runs eight checks over a token and gives each one a level (pass, warning, action needed, not applicable), a sentence about what was found and a sentence about what to change. It covers the gap between "it decodes" and "it can be trusted": the JWT Decoder on this site shows you the header and payload, this page judges whether they deserve to be accepted.
How to use: paste a token and press Run audit — all eight rows answer immediately. To check a signature, also enter the HMAC secret you believe signed it, and the report tells you whether that secret reproduces the token. Export the whole report as JSON or Markdown to drop into a ticket or a review.
1. Unsigned algorithm (alg=none)
A header that says alg=none — or carries no alg at all — is a token asserting that no signature is needed. Any verifier that reads the algorithm from the header and obeys it will accept whatever follows. This is the oldest JWT bug and still the most exploited one, and it is a configuration problem rather than a library defect: list the accepted algorithms explicitly and reject the rest.
2. Algorithm confusion
An RS256 verifier that chooses the algorithm from the header can be handed an HS256 token with the public key used as the HMAC secret. Public keys are public, so anyone can compute that signature. Paste your PEM public key into the secret field and the tool tries it: if an HS* token really verifies against it, the confusion is no longer theoretical — it works against this token today.
3. Validity window (exp / nbf / iat)
The three time claims are compared against your clock, and the report says which side of the window the token sits on: expired, not valid yet, or issued in the future. The leeway box (30 seconds by default) is how much host clock skew you are willing to absorb — set to 0, a slightly fast issuing clock produces tokens you reject. nbf is not a substitute for exp; it only delays the start.
4. Claims that scope the token
exp, iss, aud and sub. aud is what stops a token minted for service A being replayed against service B; iss lets one verifier reject tokens from another issuer signed with the same key; sub is the subject the token speaks for. A token can pass signature verification and still be the wrong credential for the endpoint because four of these were never scoped.
5. Key locators in the header (kid / jku / x5u / x5c)
jku and x5u tell the verifier where to fetch a key: whoever controls that URL mints valid tokens, and the fetch itself is an SSRF entry point. kid is a lookup key, so when it reaches a file path, a shell command or a template, ../../etc/passwd or a template expression becomes arbitrary file read or code execution. The tool flags the presence of these fields — whether it matters depends on whether your verifier consumes them.
6. How long the token stays usable
Lifetime is exp minus iat. Over 30 days gets a warning and a year-long window fails. Base64url is encoding, not encryption, so a token that lives for a year carries a year of exposure per leak and outlives the password rotation you thought closed the account. Long-lived access is a refresh token's job, not an access token's.
7. Sensitive data in the payload
Names, emails, phone numbers, card numbers and any second credential — a refresh_token or password sitting inside the payload. Matching looks at claim names and the shape of values and walks five levels into nested objects. A finding names the claim and never prints its value, because the report itself usually ends up pasted somewhere visible, and the token was already going to be logged, stored and forwarded.
8. HMAC secret strength
For HS256, HS384 and HS512 the tool runs a dictionary attack inside the tab. First the 146 hand-checked common defaults, which finish in a blink; if you want the whole picture, the deep scan tests all 102,856 candidates built from the Wallarm jwt-secrets list (MIT) in tens of seconds. When it recovers the secret, it prints it. RSA and EC tokens show not applicable — their verification key is public, so there is nothing to guess.
Three broken tokens to try
The Load a sample menu holds three sanitized tokens, signed at the moment you click, so the time-based findings stay true tomorrow as well as today.
- Weak signing secret — HS256 signed with the secret "secret". The payload carries email and a refresh_token, so the privacy check fails outright, and the key scan recovers the secret on the 4th candidate. The other six pass.
- alg=none forgery — no signature segment. Only the alg=none row turns red, the key scan says not applicable and everything else passes: a token that looks structurally fine and only a misconfigured verifier would accept.
- Expired, over-long, jku header — expired an hour ago, signed three years ago (so the lifetime is about three years), a jku pointing at attacker.example, a card_number claim and no aud. Four checks need action and three deserve a decision; only alg=none passes. The secret falls out on the 19th candidate.
What this tool will not do
It never sends your token anywhere and does not brute-force over the network: the built-in scan is a local loop, and the deep scan only fetches one static list from this site, a request containing neither token nor key. It cannot verify RS*/ES* signatures in a browser. A clean report is a clean report, not proof that your verifier is configured correctly. Use it on tokens you issued yourself or are explicitly authorised to test.
Frequently asked questions
Is it safe to paste a real JWT here?
Yes. Parsing, the eight checks and the built-in key scan all run in this browser tab and the token is never sent anywhere. The one exception is the optional deep scan, which downloads a static word list from this site — that request carries neither your token nor your key. Audit only tokens you issued yourself or are explicitly authorised to test.
Everything passed. Is the token safe?
It means these eight checks found nothing to flag. It does not prove the signature is valid, that the key is strong, or that your verifier is configured correctly — a token can pass every row here and still be accepted for the wrong reasons.
Can it verify an RS256 signature?
No. In a browser, WebCrypto can only verify the HMAC family (HS256, HS384, HS512), so signature checking and the key scan cover those. For RS*/ES* the report still reads the header and tells you which algorithms a public-key verifier has to pin.
What does the privacy check look at?
Claim names and the shape of values (emails, card numbers, second credentials), walking five levels into nested objects. A finding names the claim and never prints its value — the weak-key row is the one exception, because the recovered secret is the finding.