JWT Decoder: Inspect Token Headers, Payloads, and Expiration
Client-side JWT inspectionJSON Web Tokens look unreadable, but the header and payload of a typical signed JWT are only Base64URL-encoded JSON. The JWT Decoder reads a pasted token as you type, splits it on the dot separators, decodes the first two sections, and displays them as formatted Header (JSON) and Payload (JSON). If the payload contains a numeric exp claim, it interprets that value as an expiration time. It performs this inspection in the browser with no remote library. It does not validate the signature or prove that any claim is authentic.
Quick answer. Paste a JWT into the decoder. It separates the dot-delimited sections, Base64URL-decodes the first section as the header and the second as the payload, parses both as JSON, and presents them in readable panels. If the payload contains an exp value, it compares that Unix timestamp with the current time on your device. Decoding reveals what a token says; verification determines whether a trusted issuer actually signed it.
What is a JSON Web Token?
A JWT is a compact representation of claims. A commonly encountered signed JWT has three dot-separated parts:
header.payload.signature
| Segment | Typical contents | Displayed here? |
|---|---|---|
| Header | Token type, signing algorithm, key identifier | Yes, as formatted JSON |
| Payload | Subject, issuer, audience, timestamps, application claims | Yes, as formatted JSON |
| Signature | Cryptographic integrity proof | No verification is performed |
The first two segments are encoded with Base64URL, which uses URL-safe characters. Encoding is not encryption. Anyone who receives an ordinary signed JWT can usually decode its header and payload without knowing a secret or private key.
How to use the JWT Decoder
- 1. Copy the token you need to inspect.
- 2. Remove an accidental
Bearerprefix if your source included one. The decoder does not strip it for you, and it splits on dots — so a leadingBearerwould break decoding. - 3. Paste the compact token into the Paste JWT Token field.
- 4. Review the Header (JSON) panel.
- 5. Review the Payload (JSON) panel.
- 6. Check the expiration message shown below the panels when an
expclaim is present. - 7. Verify the token separately with a trusted JWT library before relying on it.
The output updates live from the text input as you type. There is no file upload and nothing is sent to a server. The decoder needs at least a header and payload separated by a dot; if fewer are present it reports Invalid Token format. Must be divided by dots.
Understanding the JWT header
A header often resembles this:
{
"alg": "RS256",
"typ": "JWT",
"kid": "key-2026-08"
}
Common header parameters include alg (the algorithm the token claims was used, such as RS256, ES256, or HS256), typ (an optional type indicator, commonly JWT), and kid (a key identifier that may help the verifier choose a public key).
The header is untrusted until signature verification succeeds. An attacker can construct a token that claims any algorithm or key ID. A secure verifier must enforce an allowlist of expected algorithms and select trusted keys according to policy — it must not blindly trust the header. If the decoder shows "alg": "none", that does not make the token legitimate; it indicates an unsecured token that most authentication systems should reject.
Understanding the JWT payload
The payload contains claims, which are name-value pairs about the token or subject:
{
"iss": "https://identity.example.com",
"sub": "user_4821",
"aud": "inventory-api",
"iat": 1787068800,
"nbf": 1787068800,
"exp": 1787072400,
"scope": "inventory:read"
}
Registered claims have standardized names such as iss, sub, aud, exp, nbf, iat, and jti. Public claims use collision-resistant names, and private claims are agreed upon by the systems that issue and consume the token. JWT does not dictate a universal authorization model — one provider might use a space-separated scope string, another an array named roles. Read claims according to the issuer's documented contract.
Common JWT claims
- •
iss— issuer: the authority that created the token. Verification should compare it with an exact preconfigured value. - •
sub— subject: the principal the token describes. Do not assume it is an email or globally unique unless the issuer documents that. - •
aud— audience: the intended recipient. It may be a string or an array. An API should reject a token created for a different audience. - •
exp— expiration time: normally seconds since the Unix epoch. This tool evaluates it (see below). - •
nbf— not before: the token should not be accepted earlier than this time. The decoder displays it but does not evaluate it. - •
iat— issued at: when the token was created. Useful for age limits and diagnostics. - •
jti— JWT ID: a token identifier that can support replay detection or revocation records.
How expiration checking works
If a decoded payload contains a numeric exp value, the tool multiplies it by 1,000 to convert epoch seconds to milliseconds, builds a date, and compares that instant with Date.now() in the browser. It then shows whether the token is active or has already expired, rendering the date in your device's local time. When no usable exp value is present, it reports Token parsed successfully (No exp claim found).
This is useful for a quick diagnosis, but it is not complete validation: the device clock may be wrong; production validators may permit a small clock-skew tolerance; exp may have an invalid type; a token can be unexpired but forged; and nbf, iat, iss, and aud are not checked. A missing exp does not mean the token is permanent — the issuer may enforce expiry elsewhere.
Decoding vs. verifying a JWT
| Decoding | Verification |
|---|---|
| Converts Base64URL sections into readable data | Cryptographically checks the signature or MAC |
| Can be done without a key | Requires a trusted secret or public key |
| Shows claimed algorithm, issuer, audience, subject | Enforces allowed algorithm, issuer, audience, time rules |
| Does not establish trust | Can establish authenticity when implemented correctly |
A malicious user can edit the payload, encode it again, and produce a token that looks convincing in a decoder. The signature will no longer be valid, but decoding alone cannot expose that fact. Never grant access based only on decoded output.
Signed, encrypted, and opaque tokens
Not every token is a three-part readable JWT. A signed token commonly uses JWS compact serialization with three sections. An encrypted JWE compact token commonly has five sections, and its protected content cannot be read without decryption material. An opaque access token may be a random-looking reference with no locally decodable JSON.
This decoder attempts to parse the first two dot-separated sections as JSON. It is intended for readable JWT headers and payloads, not JWE decryption or opaque-token introspection. A five-part encrypted token will not yield a normal payload here — its second section is not JSON, so decoding reports a failure.
Base64URL is not ordinary Base64
Base64URL replaces characters that are awkward in URLs: - is used instead of +, _ is used instead of /, and trailing = padding is often omitted. The decoder converts the URL-safe alphabet back, restores the required padding, decodes the text with Unicode handling, and parses JSON. A generic Base64 decoder may fail if it does not account for these differences.
The decoded bytes must represent valid text that parses as JSON. Corrupted segments, invalid character encoding, or non-JSON data cause the tool to show a decoding error.
Common decoding errors
Invalid Token format. Must be divided by dots.
The pasted value does not contain at least a header and payload separated by a dot. Check for a truncated copy, whitespace in the middle, or an unrelated opaque token.
Failed to decode header.
The header or payload could not be Base64URL-decoded and parsed as JSON. Verify that the token was copied intact and does not include quotation marks or an HTTP header label.
The token begins with Bearer
Authorization headers are often written as Authorization: Bearer eyJ.... Paste only the portion after Bearer .
The token appears expired at the wrong time
Check whether the exp value uses seconds rather than milliseconds and whether the device clock and time zone are correct. JWT NumericDate values use epoch seconds; the UI renders the resulting instant in local time.
The payload is readable but login still fails
The token may have an invalid signature, wrong audience, wrong issuer, premature nbf, insufficient scope, or a revoked session. Use server logs and the identity provider's verification guidance.
JWT security mistakes to avoid
- • Accepting a decoded token without verification. Always verify cryptographic integrity before trusting claims. Decoding is an inspection step only.
- • Allowing any algorithm. Configure the verifier with a narrow allowlist. Do not accept an algorithm solely because the untrusted header names it.
- • Confusing an ID token with an access token. ID tokens describe an authentication event; access tokens authorize API calls. Enforce the expected token type, audience, and issuer.
- • Logging complete bearer tokens. A bearer token grants its holder the owner's access until it expires or is revoked. Redact tokens in logs, screenshots, and tickets.
- • Storing secrets in the payload. A signed JWT is readable. Do not place passwords, private keys, or confidential data in it.
- • Ignoring key rotation. Production verification should handle trusted key rotation and
kidselection safely.
Privacy: should I paste a real token?
The decoder processes the pasted string in the browser and does not need a JWT parsing library from a remote service. Even so, bearer tokens are credentials. Prefer expired, revoked, redacted, or locally generated sample tokens for troubleshooting.
Avoid placing a live production token in screenshots, shared documents, chat messages, bug reports, or clipboard managers. If a live credential may have been exposed, revoke it or terminate the associated session according to your identity provider's procedure. Clearing a text box does not undo disclosure elsewhere.
A secure verification checklist
- 1. Parse only the token format you expect.
- 2. Restrict permitted signing algorithms.
- 3. Obtain verification keys from a trusted configuration or issuer.
- 4. Verify the signature before using claims.
- 5. Require and validate the exact issuer and intended audience.
- 6. Enforce
expandnbfwith a deliberate clock-skew policy. - 7. Validate token type and application-specific claims.
- 8. Apply authorization independently of authentication, and handle key rotation and revocation.
Do not write custom cryptography when a well-maintained JWT implementation is available. Follow the documentation for your framework and identity provider.
Frequently asked questions
Does decoding a JWT verify its signature?
No. It only reveals the encoded header and payload. Signature verification requires a trusted key and validation policy.
Can I decode a JWT without the secret key?
Yes. A normal signed JWT's header and payload are encoded, not encrypted. The key is needed for signature verification, not basic decoding.
Does the decoder check whether a token is expired?
It compares a numeric exp claim with the browser's current time and displays the result. It does not verify the signature or other acceptance rules.
Does the tool validate iss, aud, or nbf?
No. Those values are displayed in the payload but are not validated by this decoder.
Why does my token have five parts?
It may use JWE compact serialization, which represents encrypted content. This tool does not decrypt JWE tokens.
Is Base64URL encryption?
No. It is a reversible text encoding. Anyone with the token can generally decode readable sections.
Can I edit a JWT payload and use the token?
You can alter and re-encode text, but the original signature will no longer match. A correctly configured server should reject the modified token.
What does alg: none mean?
It denotes an unsecured token without a cryptographic signature. Most authentication systems should reject it unless explicitly designed to accept it in a controlled context.
Why does an unexpired token still fail?
Expiry is only one rule. The signature, issuer, audience, not-before time, token type, permissions, revocation state, or application policy may fail.
Is it safe to share a decoded payload?
Not automatically. Payloads can contain personal data and internal identifiers. Redact sensitive values before sharing.
Related tools
JSON Formatter
Inspect copied claim objects or API responses.
Unix Time Converter
Examine exp, iat, and nbf values separately.
Base64 Converter
Learn how ordinary encoding differs from Base64URL.
Related guides
QR Code Generator Guide
Generate high-quality custom QR Codes for any URL, text, or phone number instantly.
Word & Character Counter Guide
Live-updates word, character, and paragraph counts plus a reading-time estimate.
JSON Formatter / Validator Guide
Format, validate, beautify, and minify raw JSON string data dynamically.
Inspect a JSON Web Token
Paste a token to read its header and payload as formatted JSON and check the exp claim — then verify it properly before trusting it.