JWT Decoder
Header
—
Payload
—
Decode ≠ verify
Decoding shows the CLAIMS — but proves nothing. An attacker can decode, change \"role\" to \"admin\", and re-encode in 30 seconds. Always verify the signature on the server with the secret/key. Never trust decoded claims client-side for authorization decisions.
Related tools
JWT anatomy
HEADER.PAYLOAD.SIGNATURE
│ │ │
│ │ └─ HMAC(RSA/ECDSA) of (header.payload, secret)
│ └─ Claims: {sub, iat, exp, aud, iss, jti, custom...}
└─ {alg: HS256 | RS256 | ES256..., typ: JWT}
- HS256: symmetric HMAC + SHA-256 — same secret signs & verifies (microservices)
- RS256: asymmetric RSA — private key signs, public key verifies (OAuth providers)
- ES256: ECDSA using P-256 — smaller signatures, newer standard
- none: alg:none tokens are unsigned — REJECT THESE on every server
sub subject / iss issuer / aud audience / exp expiration / iat issued-at / nbf not-before / jti unique ID (for revocation).Frequently asked questions
Is my JWT safe to paste here?
From a technical-privacy view: yes — everything runs in JS on your device, no network call is made. But from a security-hygiene view: no — never paste live production tokens into any website. Use only test tokens, or redacted versions.
The decoder says my token is valid but the server returns 401.
Decode tells you the FORMAT is valid. The server checks the SIGNATURE — which you cannot do attacker-side without the private key. Common reasons: wrong RS256 public key on server, expired exp claim, revoked jti, or aud/iss mismatch.
How long should JWTs live?
Access tokens: short (5-15 min), refreshed silently. Refresh tokens: longer (days, weeks), revocable server-side. Never make access tokens live hours or days — the whole point of JWT is statelessness, which conflicts with revocation.