' + '

JWT Decoder

Decode and inspect JSON Web Tokens

JWT Structure

A JSON Web Token is three base64url-encoded segments separated by dots: header.payload.signature. The header names the algorithm (alg) and token type (typ). The payload carries claims — standardized ones like sub (subject), iss (issuer), exp (expiry seconds since Unix epoch), and iat (issued-at) — plus any custom fields your application needs.

Decoding vs. Verifying

Decoding reads the payload without checking the signature. Anyone can decode a JWT without the secret key — the data is encoded, not encrypted. Verification confirms the signature using the server's secret (HMAC) or public key (RSA/ECDSA). Always verify on the server; never trust a client-decoded JWT claim.

Common Security Mistakes

When to Use JWTs

JWTs work well for stateless API authentication, short-lived access tokens, and passing verified claims between services. They work poorly as session tokens for long-lived web sessions — you cannot invalidate individual tokens without a server-side blocklist, which eliminates the stateless benefit.