The three parts of a JWT
A JSON Web Token is three base64url strings joined by dots: header.payload.signature. The header says which algorithm signed the token, the payload holds the claims, and the signature lets the server check that nobody changed the first two parts. The decoder splits the token and shows the header and payload as formatted JSON.
Registered claims you'll see most
exp: expiry time. The token must be rejected after it.iat: when the token was issued.nbf: not before. The token isn't valid until this time.iss: who issued the token,aud: who it's intended for,sub: who it's about (usually a user id).jti: a unique id, used to detect a token being replayed.
exp, iat and nbf are Unix timestamps in seconds, not milliseconds. Paste one into the Unix Timestamp Converter to read it as a date.
Example
Payload: {"sub": "1234", "role": "admin", "exp": 1767225600}
exp 1767225600 = 2026-01-01 00:00:00 UTCDecoding is not verifying
Anyone can decode a JWT; the payload is encoded, not encrypted. What makes a token trustworthy is the signature, checked with the right secret or public key. This decoder doesn't check signatures. To check one, use the JWT Validator. Never put secrets like passwords in a JWT payload.
When checking tokens in your own code, fix the algorithm you expect (for example RS256) instead of trusting the header's alg value, and reject alg: none.
Debugging common auth errors
- 401 straight after login: compare
expwith the current time, and check the server's clock. - Token rejected by one service only: check
audandissmatch what that service expects. - Invalid signature: the token was signed with a different key, or was edited after signing.