GUIDE · Updated 2026-10-24

JWT Security Checklist: Decoding, Verification and the 7 Most Common Mistakes

JSON Web Tokens (JWTs) are everywhere in API authentication and single sign-on, and their security depends entirely on how the server verifies the signature and claims. This checklist covers the issues that come up most in practice and in penetration tests, with checks you can run in your browser.

Understand the structure first

A JWT is three Base64URL strings joined by dots: the header (algorithm and type), the payload (user data and expiry) and the signature. The first two are only encoded, so anyone can read them — never put passwords or personal data in the payload.

The 7 most common mistakes

Check whether your system has any of these problems:

  • Accepting alg: none: the server doesn't enforce an algorithm, so unsigned tokens pass
  • Weak HMAC secrets: HS256 keyed with short strings like secret or password is open to dictionary attacks
  • Algorithm confusion: a server supporting both RS256 and HS256 accepts tokens signed with the public key as an HMAC secret
  • No exp or nbf checks: expired tokens keep working
  • No iss or aud checks: tokens issued for other services are accepted
  • Sensitive data in the payload: emails, ID numbers or permission details readable by anyone
  • No revocation: a leaked token stays valid until it expires

How to check

Use the JWT decoder to check the header's alg and the payload's exp, iss and aud, and the signature verifier to confirm the signature is actually valid. In an authorized test environment, the JWT forger can produce alg=none or modified tokens so you can confirm the server rejects them.

How to fix them

  • Specify the allowed algorithms on the server; never trust the alg in the token header
  • Use at least 32 random bytes for HS256 secrets — the password generator can make one
  • Always validate exp, iss and aud, and keep lifetimes short
  • For revocation, pair short-lived access tokens with revocable refresh tokens
FAQ

FAQ

Are JWTs encrypted?

A regular JWT (JWS) is signed, not encrypted, so anyone can decode the payload. Use JWE when you need encryption.

Is it safe to decode JWTs online?

It depends on whether the tool uploads the token. The JWT tools on this site run entirely in your browser and never send it anywhere — but avoid pasting live production tokens on a shared computer anyway.

Should I use HS256 or RS256?

HS256 is simple and effective inside a single service. When several services must verify tokens that only one party issues, a public-key scheme like RS256 or ES256 fits better.