A JSON Web Token, or JWT, is the long string that starts with eyJ and travels in an Authorization: Bearer … header. It looks like gibberish, but it is just three pieces of Base64url text joined by dots. Our free JWT Decoder opens it for you: the header, the claims, the times in your own time zone, a clear expired or valid message, and an optional signature check. It is aimed at developers, testers and anyone debugging a login that suddenly stopped working.
This guide walks through every part of the page, explains what each claim and warning means, and shows how to verify a signature without leaving your browser. If your problem is specifically a "token expired" error, the follow-up article on reading exp, iat and nbf correctly goes deeper.
What JWT Decoder does
The tool splits the token at the dots and decodes each part. It shows:
- The header, a small JSON object that says how the token was signed (for example
"alg": "HS256"). - The payload, a JSON object of claims such as who the user is and when the token expires.
- A claims table that gives friendly names, and turns time claims into readable dates.
- A status line: expired, not yet valid, valid for how much longer, or no expiry at all.
- An optional signature check using a shared secret, a public key, a certificate or a JWK.
It does not create or sign tokens, and it cannot tell you whether your server accepts a token. Checking the issuer, the audience and whether a token has been revoked is the server's job, and the tool does none of those checks.
How to use JWT Decoder, step by step
- Open JWT Decoder.
- Paste your token into the box labelled "JWT (header.payload.signature)". A leading
Beareris removed for you, and so are surrounding quotes and any spaces or line breaks inside the text, so a token copied from a wrapped log line still works. - The token appears colour-coded under the box: header, payload and signature in three colours.
- Read the Header and Payload panels, then the Claims table below them.
- Look at the status line at the top of the Claims panel.
- If you want to check the signature, use the Signature panel at the bottom (details below).
Press Load sample to fill in a demo token and its secret, and Clear to remove everything.
What you see in each panel
Header
The raw header JSON, plus a short table: Algorithm (alg) with a plain-English description such as "HMAC with SHA-256", Type (typ) and Key ID (kid). If the header holds jku, x5u or jwk, they get a "don't trust blindly" label, because a token can point to a key location that an attacker chose.
Payload
The claims as formatted JSON. If the payload is not a JSON object, the page says so and shows it as plain text. If a number in the payload is too large for JavaScript to hold exactly, such as a 19-digit ID, a yellow note names it and warns that the display may be rounded.
Claims
Known claim names are translated: iss is Issuer, sub is Subject, aud is Audience, exp is Expires, nbf is Not before, iat is Issued at and jti is JWT ID. The tool also labels scope, roles, groups, email, name, client_id, tid and a few more. Unknown claims show under their own names.
Time claims (exp, nbf, iat, auth_time and updated_at) are shown three ways: a readable date and time in your own time zone, how long ago or from now it is, and the exact UTC time with the raw number of seconds. A reader in Dhaka sees something like "Fri, Nov 27, 2026, 4:00:00 PM GMT+6", with "2026-11-27T10:00:00.000Z · 1795773600" underneath.
The status line is computed from exp and nbf only. It reads:
- "Valid — expires in 50 minutes." when
expis in the future. - "Expired 10 minutes ago." when the time has passed.
- "Not valid yet — becomes valid in 2 minutes." when
nbfis in the future. - "No expiry (“exp”) — this token never expires unless the server checks something else." when there is no
exp. - A warning if
explooks like milliseconds instead of seconds, and an error ifexpornbfis not a number.
The page refreshes its idea of "now" every 15 seconds, so a token running out while you look at it will flip to Expired.
Every option explained
The Signature panel is the only place with settings. Its key box appears for ordinary signed tokens when the header names an algorithm the tool can check: HS256, HS384, HS512, RS256, RS384, RS512, PS256, PS384, PS512, ES256, ES384, ES512, EdDSA and Ed25519.
For HMAC tokens (HS256, HS384, HS512)
Enter the shared secret in the Secret box and choose a Secret format: "Plain text (UTF-8)" or "Base64 / base64url". Use the second one if your secret is stored as Base64, which is common in configuration files. Checking starts automatically about a quarter of a second after you stop typing.
You will see either "Signature verified ✓ — the token was signed with this key and hasn't been modified." or "Invalid signature ✗ — wrong key, or the token was changed after signing." If the secret is shorter than the algorithm calls for, an extra warning says how many bits it has, because short secrets are easy to guess.
Try it with the sample: Load sample fills in the token and a secret, and the signature verifies. Change one character of the secret and the result flips to invalid.
For public-key tokens (RS, PS, ES, EdDSA)
Paste the public key, not the private one. The tool accepts a PEM block labelled PUBLIC KEY, RSA PUBLIC KEY or CERTIFICATE, or a JWK or JWKS in JSON. If you paste a JWKS with several keys, the one whose kid matches the token is picked. If the token has no kid and there are several keys, you are asked to paste the single key to use.
If you paste a private key by mistake, the tool refuses with "That's a private key. Paste the public key instead — never paste private keys into websites."
What it accepts and its limits
- Three-part tokens (JWS) are fully decoded. This is what most APIs use.
- Five-part tokens (JWE) are encrypted. The page shows a warning, the header and the algorithm fields, and nothing else.
- Anything else gives "A JWT has 3 parts separated by dots (header.payload.signature) — this has N."
- Unsigned tokens (
alg"none") get a red warning that anyone can create or change such a token. - Size: there is no limit set by the page. The colour-coded preview cuts a very long part after 4,000 characters, but decoding uses the whole token.
- Signature checks need a secure (https) page, because they use the browser's WebCrypto feature.
Privacy
Decoding and verification happen inside your browser tab, and your token is not sent to our server. A decoded payload is not secret in any case, but a live token is still a credential. Until it expires, anyone who holds it can act as the user. Avoid pasting production tokens into sites that upload them, and prefer a test token when you can.
A worked example
Suppose a staging API gave you this token:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1XzEwNDIiLCJuYW1lIjoiTnVzcmF0IEphaGFuIiwicm9sZSI6ImVkaXRvciIsImlhdCI6MTc5NTc3MDAwMCwiZXhwIjoxNzk1NzczNjAwfQ.pznvt7qcye-RUe1U8wJacp-lWpvK6xC-pN8sK7haJUQ
Pasting it shows this header and payload:
{ "alg": "HS256", "typ": "JWT" }
{
"sub": "u_1042",
"name": "Nusrat Jahan",
"role": "editor",
"iat": 1795770000,
"exp": 1795773600
}
The Claims table lists Subject (sub), Name (name), role, Issued at (iat) and Expires (exp). The two times are exactly one hour apart (3,600 seconds), so this token lives for one hour. Enter the secret demo-secret-for-the-guide-at-least-32-chars with format Plain text and the signature verifies.
Tips to work faster
- Check the status line first. Most "401" problems are an expired token.
- Compare
expminusiat. That is the token's lifetime, and it tells you how often a client must refresh. - Use the Timestamp Converter when you need to turn another epoch value from a log into a date.
- A header or payload that fails to decode shows a specific message, such as "The payload decodes to text but isn't valid JSON." That usually means the token was cut off or altered when it was copied.
- To read a decoded payload in a bigger view or compare two of them, copy the JSON into the JSON Formatter, explained in its complete guide.
Common problems and how to fix them
"A JWT has 3 parts … this has 1"
You pasted something that is not a token, or only a fragment. Copy the whole string, from the first character after Bearer to the end.
"The header isn't valid UTF-8 text" or "contains characters that aren't valid base64url"
The text is not a JWT, or a character was lost or added in copying. Make sure it was copied as plain text, without extra symbols.
Invalid signature, but you are sure about the secret
Check the Secret format menu. A secret that your server stores as Base64 must be entered with "Base64 / base64url". Also check for a trailing space or line break in the secret you pasted.
"exp looks like milliseconds"
The issuing code wrote Date.now() instead of Date.now() / 1000. JWT times are in seconds, so the token would be valid for tens of thousands of years in most libraries. Fix it where the token is created.
An algorithm is "unknown"
Algorithms that the page cannot check show an "unknown" label, and the signature panel says verification for that algorithm is not supported. Decoding still works.
Related tools
- Timestamp Converter: turn any epoch seconds or milliseconds value into a date.
- Base64 Encoder / Decoder: decode a single part by hand.
- JSON Formatter: tidy a payload you have copied out.
- UUID Validator: check IDs that appear in claims such as
jti.
Quick checklist
- Paste the whole token; Bearer and quotes are handled.
- Read the status line, then the exact UTC times.
- Verify the signature with the right secret format or public key.
- Never trust a token because it decodes; the server must verify it.
- Keep live tokens private.



