AnalyzersRuns in your browser

JWT Decoder & Analyzer

Free JWT decoder that runs in your browser. Decode header and payload, check expiry, flag alg none and weak HMAC secrets, and verify signatures locally.

The token stays in your browser. Nothing is sent to a server.

What the analyzer checks

  • Algorithm. Flags alg none, missing alg, and explains the algorithm confusion risk for RS256 and HS256 verifiers.
  • Weak secrets. Tests HMAC tokens against a small wordlist of default and tutorial secrets in your browser.
  • Lifetime. Reports missing exp, expired tokens, and lifetimes longer than one day or 30 days.
  • Header injection. Flags jku, x5u, and jwk headers and suspicious kid values that lead to key injection, path traversal, or SQL injection.
  • Claims hygiene. Flags missing iss, aud, sub, and jti, and highlights sensitive data or authorization claims stored in the payload.

JWT security checklist for developers

  1. Pin one algorithm in the verifier. Never read alg from the token to choose the verification method.
  2. Use a random secret of at least 256 bits for HS256. Use RS256 or ES256 when more than one service verifies tokens.
  3. Set exp on every token. Keep access tokens under one hour and use refresh tokens that the server can revoke.
  4. Validate iss and aud on every request.
  5. Treat kid as an opaque lookup key. Never build a file path or a query from it.
  6. Keep secrets and personal data out of the payload. The payload is readable by anyone who holds the token.
  7. Store tokens in HttpOnly, Secure, SameSite cookies when the client is a browser.

Common JWT attacks

alg none
The attacker sets alg to none, removes the signature, and edits the payload. Vulnerable libraries accept the token as valid.
Algorithm confusion
The server expects RS256 but accepts HS256. The attacker signs a forged token with the public key as the HMAC secret and the server verifies it with the same key.
Weak HMAC secret
Offline cracking tools test billions of candidate secrets per second against a captured token. Short or dictionary secrets fall in minutes.
Key injection through jku, jwk, or kid
The attacker points the verifier at a key that the attacker controls, or abuses kid to read an arbitrary file or run SQL.

Frequently asked questions

Start testing in minutes

Connect your GitHub repos and domains, and get fully set up in a few clicks.