tools / jwt
jwt/
Decode a JWT's header and payload and show exp / iat / nbf in local time. Decode only, no signature check.
Token
Times
Header
Payload
Signature
What is a JWT
A JWT (JSON Web Token, RFC 7519) is a token of three base64url parts joined by dots: the first two are JSON and the third is the signature. This page only decodes the first two parts and shows exp, iat and nbf in local time; it does not verify the signature.
How it works: split at the dots into three parts, base64url-decode the first two
- After removing a leading Bearer and any whitespace inside, the token is split at the dots into Header, Payload and Signature.
- The first two parts are decoded from base64url (the URL-safe alphabet of RFC 4648, with the trailing = optional) into bytes, which are read as UTF-8 JSON.
- The signature is computed over the text "Header.Payload" with the algorithm named by alg in the Header; checking it needs the secret or public key, which this page does not do, so the Signature is shown as is.
- Under RFC 7519, exp, nbf and iat are Unix times in seconds; this page converts them to local time using your computer's time zone and clock, and shows from that whether the token has expired.
Example
The second part, the Payload, decodes to this JSON:
- Input
- eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
- Output
- {"sub":"1234567890","name":"John Doe","iat":1516239022}
Sources
FAQ
Can I trust the decoded content? Does this tool verify the signature?
No, it does not, so a successful decode does not mean the token is genuine or unmodified. Verifying a signature needs the secret or public key and belongs in your backend, using a JWT library. Also, the Payload is only base64url-encoded, not encrypted, so anyone holding the token can read it; do not put passwords or other sensitive data in it.
What does "wrong number of parts" or "this is a JWE" mean?
A JWT is three parts, header.payload.signature, joined by dots, and anything else triggers the wrong-number-of-parts message. The usual causes are an incomplete copy, extra text copied along with it, or something that is not a JWT at all, such as a session ID or an opaque random token. A token with exactly 5 parts is a JWE, whose content is encrypted, so it cannot be decoded here.
What should I do about "not valid base64url" or "invalid length"?
It means one of the parts contains a character that does not belong in a JWT, or was cut off. The message names the part, and for an illegal character it points out which one. JWT uses base64url, which has only letters, digits, - and _, and a trailing = is optional. The most common cause is a quotation mark at the start of the token; a + or / means ordinary Base64 was used and must be replaced with - and _. A truncated copy usually gives "invalid length" or "not valid JSON".
Can I paste a token with a Bearer prefix or line breaks?
Yes. A leading Bearer is removed automatically (case-insensitive), and spaces, line breaks and tabs inside the token are ignored, so a token copied from a request header or a log can be pasted as it is. Input over 1 MB is rejected outright; a real JWT is usually a few hundred bytes to a few KB.
What do the "Expired", "Not yet valid" and "In the future" labels mean?
They come from three time fields in the Payload. exp is the expiry time and "Expired" appears once it has passed; nbf is the start time and "Not yet valid" appears before it; iat is the issue time, and "In the future" means it is later than now, which may point to a clock mismatch between the issuer and your computer. The "Status" row at the top checks nbf first, then exp, and shows "Valid" only if both are fine; that refers to timing only and says nothing about the signature.
The times are off by a few hours, or the remaining time looks wrong. Why?
The page uses your computer's time zone and clock, and the zone is shown after each date, for example UTC+08:00. exp, iat and nbf are Unix timestamps in seconds and do not depend on a time zone; a different zone only changes how the same moment is displayed. The remaining time refreshes every second and is calculated from your computer's current time, so a wrong clock gives wrong results. A very large value, such as a 13-digit millisecond timestamp, gets a note that JWT uses seconds, and other time fields such as auth_time are not converted automatically.
Can it decode tokens signed with HS256, RS256, ES256 and other algorithms?
Yes, all of them. Decoding only turns the first two parts back into JSON and has nothing to do with the signing algorithm. The alg from the Header is shown next to the title, and when alg is none it is marked "unsigned". The Signature part is shown as the original base64url text and is not decoded.
Is the token I paste uploaded?
No. Decoding happens in your browser and the page makes no request that sends the token anywhere. Still, a token is often equivalent to a login credential, so do not casually share a live token that is still valid, and do not paste it into sites you do not know.