What is inside a JWT
A JSON Web Token is three Base64URL strings joined by dots: header.payload.signature. Paste the whole token into the decoder above and it splits them for you.
- Header says how the token was signed, for example
{"alg":"HS256","typ":"JWT"}. - Payload holds the claims: who the token is about, when it expires and anything else the issuer added.
- Signature is binary data the server uses to check that nobody changed the first two parts. It is not readable text, so this JWT decoder shows it as Base64URL.
Because the header and payload are JSON, both parts almost always begin with eyJ, which is how {" looks in Base64. If you see a long string that starts with eyJ and contains two dots, it is a JWT.
Common JWT payload claims
| Claim | Meaning | Example |
|---|---|---|
sub |
Subject: the user or service the token is about | "user_42" |
iss |
Issuer: who created the token | "https://auth.example.com" |
aud |
Audience: who the token is meant for | "api.example.com" |
exp |
Expires at, in seconds since 1970 (Unix time) | 1767225600 |
iat |
Issued at, also Unix time | 1767222000 |
nbf |
Not valid before this Unix time | 1767222000 |
The time claims are plain numbers of seconds, not dates. To read one, convert it from Unix time: 1767225600 is January 1, 2026, 00:00 UTC. A token whose exp is in the past has expired, and servers should reject it.
Decoding is not verifying
This JWT decoder only reads the token. It does not check the signature, because that needs the secret or public key held by the server that issued it. Anyone can change a payload, re-encode it and paste it here, and it will decode just as cleanly.
So decoding is the right tool for debugging: seeing which user a token belongs to, why a request is denied, or whether a token has expired. It is never proof that a token is genuine. Your server must verify the signature with a proper JWT library before trusting any claim.
Is it safe to paste a JWT here?
The decoding happens in your browser, and the token is not sent anywhere. Even so, treat a live token like a password: anyone who has it can use it until it expires. Prefer tokens from a test environment, and never post real tokens in tickets or chat.
Why a JWT fails to decode
Only part of the token was copied. A JWT needs exactly two dots. If the decoder treats your input as plain Base64 instead of a JWT, check that nothing was cut off at either end.
It includes the "Bearer " prefix. Authorization headers look like Bearer eyJ.... Remove the word Bearer and the space before decoding.
The payload is not JSON. Some systems put encrypted data (JWE) in a token. A JWE has five parts instead of three, and its payload cannot be read without the key.
Decode a JWT in code
Each part is Base64URL without padding. In the browser:
const [h, p] = token.split(".");
const read = s => JSON.parse(atob(s.replace(/-/g, "+").replace(/_/g, "/")));
console.log(read(h), read(p));
For more on Base64URL in code, see Base64 decode in JavaScript and Base64 decode in Python. To decode any other Base64 string, use the Base64 decoder.
Last updated: