Home โบ JWT Decoder
JWT Decoder
โ ๏ธ This tool decodes the token but does not verify the signature. A decoded token is not proof that it is genuine.
Anatomy of a JSON Web Token
A JWT (RFC 7519) is three base64url-encoded parts joined by dots: header.payload.signature.
- Header โ JSON describing the token, typically
{"alg":"HS256","typ":"JWT"}. Akid(key ID) tells the verifier which key to use. - Payload โ JSON "claims" about the subject: who it is (
sub), who issued it (iss), who it is for (aud), and when it is valid. - Signature โ computed over
header.payloadwith a secret or private key. Change one character of the payload and the signature no longer matches.
Registered claims you will see most
| Claim | Meaning |
|---|---|
exp | Expiration time (Unix seconds). Reject the token at or after this time. |
iat | Issued at (Unix seconds). |
nbf | Not before โ the token is not valid until this time. |
iss / aud | Issuer and intended audience. Verifiers must check both. |
sub | Subject, usually a user ID. |
jti | Unique token ID, useful for revocation lists. |
Security gotchas
alg: nonemeans the token is unsigned. Libraries must never accept it for authenticated requests; this decoder flags it.- Algorithm confusion: a server that accepts both RS256 and HS256 can be tricked into verifying an HS256 token with its public RSA key as the HMAC secret. Pin the expected algorithm.
- Clock skew: servers usually allow 30โ60 seconds of leeway when checking
expandnbf. - Milliseconds by mistake:
expmust be in seconds. A 13-digitexpis a bug that makes the token effectively never expire; the decoder warns about it.
Frequently asked questions
Is it safe to paste a production JWT into an online decoder?
Only if the decoder runs locally. This page decodes the token with JavaScript in your browser and never transmits it. Still, treat live tokens like passwords: a valid JWT usually grants access until it expires, so prefer expired or test tokens when sharing screenshots.
Does decoding a JWT verify it?
No. Decoding only Base64url-decodes the header and payload, which anyone can do. Verification means checking the signature with the secret (HS256) or public key (RS256/ES256) and validating exp, nbf, iss and aud. Always verify on the server with a maintained library before trusting any claim.
How do I check if a JWT is expired?
Read the exp claim. It is a Unix timestamp in seconds. If exp is less than the current Unix time, the token is expired. This tool shows exp as a date and tells you whether it is in the past.
Why can I read the payload of a JWT? Isn't it encrypted?
Standard signed JWTs (JWS) are not encrypted, only signed. The signature prevents tampering, not reading. Do not put secrets or personal data in a JWT payload unless you use encrypted JWTs (JWE).