JWT Decoder with Readable exp and iat Claims
Decode and inspect JWT tokens without verification
What does a JWT decoder do?
A JSON Web Token is three base64url-encoded segments joined by dots: a header describing the algorithm, a payload carrying the claims, and a signature. Despite appearances, the first two parts are not encrypted — base64url is an encoding, not a cipher — so anyone holding a token can read them. This tool does exactly that: it splits the token, decodes the header and payload into formatted JSON, shows the signature segment as-is, and renders the iat, exp and nbf claims as human-readable dates, flagging an expired exp in red.
Decoding runs entirely in your browser. The token is never transmitted, logged, or stored — which is the only acceptable behavior for a tool that handles credentials.
When to use it
Typical moments: an API suddenly returns 401 and you want to check whether the token simply expired; you're wiring up an OAuth or OIDC flow and need to confirm the identity provider actually put the audience, scopes, or roles you expect into the payload; or you're debugging clock-skew issues around nbf. Decoding answers all of these in seconds.
Treat the token itself with care: a live JWT is a credential — whoever holds it can act as its subject until it expires. That's why this tool deliberately has no share-link feature: a token must never end up encoded into a URL that lands in chat logs and browser histories. And as a rule, never paste production tokens into online tools that upload input to a server; this one doesn't, but many do. For routine debugging, prefer tokens from a development or staging environment.
Example
Paste a token like eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.<signature> and hit Decode. The header pane shows {"alg": "HS256", "typ": "JWT"}, the payload pane shows the sub, name and iat claims with Issued At rendered as a local date underneath, and the signature segment is displayed untouched with a warning that it has not been checked. If the payload carried an exp in the past, the expiry line would show in red — the fastest possible answer to "is this 401 just an expired token?"
Decoding vs verifying a JWT, in Node.js and Python
Decoding and verifying are different operations, and confusing them is behind most JWT security bugs. Decoding — what this page does — reverses the base64url encoding of the header and payload so you can read the claims. It needs no key and proves nothing. Verifying recomputes the signature over header.payload with the issuer's secret (HS256) or public key (RS256, ES256, usually fetched from the provider's JWKS endpoint), compares it with the third segment, then checks exp, nbf, iss and aud.
In Node.js, the jwt-decode package is decode-only: jwtDecode(token) returns the payload, which is fine in a browser for showing a user's name or scheduling a refresh before exp. jsonwebtoken keeps the two apart: jwt.decode(token) reads without checking, while jwt.verify(token, key, { algorithms: ["RS256"] }) validates and throws on a bad signature or an expired token. In Python, PyJWT's jwt.decode(token, key, algorithms=["RS256"], audience="my-api") verifies by default; jwt.decode(token, options={"verify_signature": False}) is the decode-only form.
The rule: decode anywhere for debugging and display, but make every authorisation decision on a verified token, on the server, with the accepted algorithms pinned so a token can't switch its alg to none.
Bearer tokens, access tokens, and JWE vs JWS
An Authorization: Bearer header carries whatever token the server issued; "Bearer" is the scheme, not part of the token. Paste only what follows "Bearer " — with the prefix included, the first segment isn't valid base64url and decoding fails.
Many OAuth providers, including Okta, Keycloak, AWS Cognito, Microsoft Entra ID and Auth0 (when an API audience is requested), issue access tokens as JWTs, so they decode here. Others issue opaque strings that mean something only to the server that created them and won't decode anywhere — that's by design, not a broken token. OpenID Connect ID tokens are always JWTs.
What people call a JWT is almost always a JWS: a signed token in three parts, header.payload.signature, whose payload anyone can read. A JWE is an encrypted token in five parts — header, encrypted key, initialisation vector, ciphertext and authentication tag. Its header is readable, but the claims are ciphertext that only the holder of the recipient's key can open. This decoder handles the three-part JWS form and reports an error on a five-part JWE. If a decoded header shows an enc field next to alg, you're holding a JWE, not a signed JWT.
How to use the JWT Decoder with Readable exp and iat Claims tool
- 1
Paste the JWT
Drop the full three-part token (header.payload.signature) into the input field.
- 2
Hit Decode
Header and payload appear as formatted JSON; iat, exp and nbf are also shown as readable dates.
- 3
Check the claims
An expired exp is highlighted in red. Copy the header or payload JSON if you need it elsewhere.
Frequently asked questions
Does decoding verify that the token is valid?
No — and this is the most important thing to understand about JWTs. This tool does not check the signature; it only base64url-decodes the header and payload, which anyone can do. A token that decodes cleanly can still be forged, tampered with, or signed by the wrong key. Verification requires checking the signature against the issuer's secret or public key, which must happen server-side in your application.
Is my token sent to a server?
No. Decoding runs entirely in your browser with atob and JSON.parse — the token never leaves your machine. Even so, prefer development or staging tokens for debugging; a production JWT is a live credential.
Why is there no "copy link" button like other tools on this site?
Deliberately. A permalink would encode the token into a URL, and URLs leak — into chat logs, browser history, and clipboard managers. Since a JWT grants access to whoever holds it, this tool omits the share feature that other tools here offer.
Why won't my token decode?
The most common causes: it isn't three dot-separated parts (an opaque session ID or an encrypted JWE token won't decode this way), stray whitespace or line breaks got copied along with it, or the token was truncated — many UIs cut long strings off with an ellipsis.
What do the iat, exp and nbf claims mean?
All three are Unix timestamps in seconds. iat (issued at) is when the token was created, exp (expiration) is the moment after which it must be rejected, and nbf (not before) is the moment before which it must be rejected. This page renders each as a local date and highlights an exp that is already in the past.
How do I decode a JWT on the command line?
Take the middle segment and base64-decode it after converting from base64url: echo "$TOKEN" | cut -d. -f2 | tr '_-' '/+' | base64 -d. Some base64 implementations complain about missing = padding; the JSON is usually printed anyway, or append = until the length is a multiple of four.
Why do accented characters in my payload look wrong?
The decoder converts base64url to text with the browser's atob, which treats each byte as one character, so UTF-8 names like José appear as José. The token itself is fine — only the display is off. Decode with Buffer.from(segment, "base64url").toString("utf8") in Node if you need the exact text.
Can I edit a decoded payload and reuse the token?
You can change and re-encode the payload, but the signature was computed over the original header and payload, so it no longer matches. Any server that verifies tokens properly rejects the edited one. If a server accepts it, that server isn't verifying signatures — a serious bug worth reporting.
Related on TechLogHub
Related Encoding Tools
Base64 Encoder and Decoder with UTF-8 Support
Encode plain text to Base64 or decode Base64 back to text
URL Encoder and Decoder for Query String Values
Encode or decode URLs and URI components instantly
HTML Entity Encoder and Decoder with Numeric Entities
Encode or decode HTML entities in text
Binary Translator for UTF-8 Text and Emoji
Translate text to binary and binary to text with UTF-8, plus hex, decimal and octal byte views
Get the next tool before you need it
One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.