How to Decode a JWT Token Safely
Understand JWT headers, payloads, signatures, and the difference between decoding and verification.
What is a JWT?
A JSON Web Token (JWT) is a compact token format commonly used to carry claims between systems. A signed JWT commonly has three dot-separated parts: header, payload, and signature.
What is inside a JWT?
The header identifies metadata such as the signing algorithm and token type. The payload contains claims such as issuer, subject, audience, and expiration. The signature is used by a verifier to detect tampering and establish authenticity under the configured trust model.
Decoding is not verification
The header and payload of a typical signed JWT are Base64URL-encoded, not encrypted. Anyone who has the token can usually read these sections. Decoding does not prove that the token is genuine or unchanged.
How verification works
A server must validate the signature using the correct trusted key and an explicitly allowed algorithm. It should also validate claims such as issuer, audience, expiration, and not-before time where applicable. Never choose a verification algorithm solely because an untrusted token requests it.
Keep tokens private
Access tokens and refresh tokens are credentials. Do not paste real production tokens into public websites, screenshots, issue trackers, or chat rooms. If a token is exposed, revoke or rotate it according to the issuing system's procedures.
Try the Sudarvix JWT decoder
The Sudarvix JWT Decoder is for inspecting token structure and readable claims. It does not verify signatures, validate claims, or establish that a token is safe to trust.
Explore related tools
Put the concepts into practice with Sudarvix utilities.