JWT Decoder – Read JSON Web Token Header and Payload
Paste a JSON Web Token to see its decoded header and payload as formatted JSON. The issued-at and expiry times are turned into readable dates, and you’ll see straight away if the token has expired. Decoding happens entirely in your browser, so tokens never leave your device.
How to use the JWT decoder
- Paste your token — three groups of characters separated by dots.
- Read the decoded header and payload in the output.
- Check the status line for when the token was issued and when it expires.
Press Try an example to see a sample token.
The three parts of a JWT
Header — the token type and signing algorithm, for example:
{"alg": "HS256", "typ": "JWT"}
Payload — the claims, for example:
{"sub": "1234567890", "name": "John Doe", "iat": 1516239022}
Signature — created from the header and payload with a secret (HMAC) or a private key (RSA or ECDSA). It proves the token wasn’t changed, but only a server holding the key can check it.
Each part is Base64URL-encoded and the parts are joined with dots:
Worked example
In the sample token, iat is 1516239022, which is 18 January 2018 at 01:30:22 UTC. There is no exp claim, so the token never expires on its own — something a real application should avoid.
Debugging authentication problems
- “Token expired” — compare
expwith the current time; remember it is in UTC seconds. - “Invalid audience” or “invalid issuer” — check
audandissagainst your server settings. - Clock skew — if
iatornbfis slightly in the future, the server’s clock may be out of sync. - Wrong algorithm — the header’s
algmust match what your server expects. Servers should rejectnone. - Missing claims — check the payload contains the roles or scopes your API needs.
Where JWTs are used
JWTs are common in single-page apps and mobile apps that talk to APIs, in single sign-on with OpenID Connect (where the ID token is a JWT), and in service-to-service authentication. A typical flow is: you log in, the server issues a short-lived access token and a refresh token, and the app sends the access token in the Authorization header with each request. When it expires, the app quietly uses the refresh token to get a new one. Decoding the token is often the fastest way to see why a request is being rejected.
Security tips
- Keep tokens short-lived and use refresh tokens for long sessions.
- Never put passwords or sensitive personal data in the payload.
- Always verify the signature on the server before trusting any claim.
- Store tokens carefully in the browser to reduce the risk of theft.
To decode other Base64 data, use the Base64 decoder; to convert timestamps, the Unix timestamp converter; and to tidy JSON, the JSON formatter.
Frequently asked questions
What is a JWT?
A JSON Web Token is a compact, URL-safe way to pass claims — such as a user ID and permissions — between systems. It has three Base64URL parts separated by dots: a header, a payload and a signature.
Does this tool verify the signature?
No. It decodes the header and payload so you can read them. Verifying the signature needs the secret or public key, which you shouldn’t paste into websites. Never trust a token’s contents without verifying it on your server.
Is it safe to paste my token here?
The token is decoded in your browser and never sent anywhere. Even so, treat live tokens like passwords: anyone who has one can use it until it expires.
What do exp, iat and nbf mean?
exp is the expiry time, iat the time the token was issued and nbf the time before which it must not be accepted. They are Unix timestamps in seconds, which the decoder shows as dates.
Are JWTs encrypted?
Usually not. Standard signed JWTs (JWS) are only encoded, so anyone can read the payload. Don’t put secrets in them. Encrypted tokens (JWE) exist but look different and can’t be read without the key.
What are common claims?
sub (subject, usually a user ID), iss (issuer), aud (audience), exp, iat and nbf, plus any custom claims an application adds, such as name, email or roles.
Related tools
Base64 Encoder / Decoder
Encode and decode Base64 and Base64URL with UTF-8 support.JSON Formatter
Pretty-print, validate and minify JSON with clear error positions.Unix Timestamp Converter
Epoch seconds or milliseconds to a date, and back.Hash Generator
MD5 and SHA hashes of any text, computed in your browser.URL Encoder / Decoder
Percent-encode or decode URLs, with a query-parameter table.
Last updated: