You decode a token while debugging an API integration, read through the payload, and look for the expiry. There is no exp claim anywhere in it. The expiry panel does not show a date or an expired warning; it reports that the token has no expiry of its own. That result confuses people in both directions: some assume the token must be broken, others that it is safe forever. Neither is right.
This guide explains what a missing exp claim actually means, what the JWT Decoder on Ovatly reports in that case, and how a token with no expiry date inside it can still stop working.
Contents
- Quick answer
- What the exp claim does when it is present
- What no expiry means in practice
- How to check a token for an exp claim, step by step
- Worked example: one token, with and without exp
- Limitations: what the decoder cannot tell you
- Common mistakes
- FAQs
- Conclusion
Quick answer
A JWT does not have to carry an exp claim. When the claim is absent, the token has no built-in expiry: nothing inside the token itself says when it stops being valid. Paste such a token into the JWT Decoder and the expiry panel reports that the token has no expiry of its own, instead of showing a date or an expired or not-expired verdict. That is common for some API tokens, where a long-lived credential is the point. The token can still stop working, but any stop comes from the server side, through revocation, a signing key change or an account change, not from a date written into the token.
What the exp claim does when it is present
The payload of a JWT is a set of named claims. The registered names include sub, the subject, usually the user id; iss, the issuer; aud, the intended audience; iat, the issued-at time; and exp, the expiry. When exp is present, it holds a single number: seconds since the Unix epoch. No human reads that format at a glance, so the decoder translates it into a readable date and states plainly whether the token is expired or not expired.
That translation is the whole job of the expiry panel. It reads one claim, converts it, and gives a verdict. When the claim is not there, there is nothing to convert and no verdict to give. A well-behaved decoder says exactly that rather than guessing, and that is what this one does: tokens without an exp claim are reported as having no expiry of their own, and the claims that are present are shown as they are.
What no expiry means in practice
A token with no exp claim carries no countdown: as far as the token itself is concerned, it is as valid in a year as it is today. Whether it actually keeps working is decided entirely by the server that receives it, not by anything in the payload.
Issuers keep several ways to cut such a token off. They can revoke it, keeping a server-side record of tokens no longer accepted. They can rotate the signing key, after which the token's signature no longer verifies. They can disable the account the token belongs to. Any of these ends the token's useful life without the token changing by a single character.
This design is deliberate for API tokens. A script, a scheduled job or a partner integration may need to authenticate the same way for months, and an exp claim would force constant re-issuing. Leaving exp out and controlling the lifetime on the server side is simpler to operate. The trade-off is real, though: a stolen session token usually dies quickly on its own, while a stolen no-expiry token stays usable until someone notices and revokes it. That is why the standing advice applies with extra force here: treat tokens like passwords, and keep them out of public places and screenshots.
How to check a token for an exp claim, step by step
- Open the JWT Decoder and paste the full token, all three dot-separated parts.
- Read the decoded header, which names the algorithm and token type.
- Read the payload claims and look for exp among them, alongside subject, issuer and issued-at.
- Check the expiry panel. With an exp claim it shows a date and a verdict; without one it reports that the token has no expiry of its own.
- Remember the signature warning either way: the signature segment is present, but it is not verified.
Worked example: one token, with and without exp
Take the well-known demo token. Its header is {"alg":"HS256","typ":"JWT"} and its payload contains sub "1234567890", name "John Doe" and iat 1516239022. There is no exp claim in this token. Pasted into the decoder, the payload reads exactly as listed, and the expiry panel reports that the token has no expiry of its own. Nothing is wrong with the token; it simply carries no end date.
Now add an exp claim of 4000000000 to that same payload. The panel changes completely: the tool reports expiry on 2 October 2096, so the token is not expired. Same header, same subject, same signature situation; the only difference is one claim. That contrast shows what exp does: present, it gives the token a date the decoder can translate and judge; absent, the decoder honestly says there is none.
Limitations: what the decoder cannot tell you
Decoding shows you the claims a token carries, and nothing beyond them. The decoder cannot tell you whether the issuing server has revoked this particular token, whether the signing key has been rotated since it was issued, or whether the account behind the subject claim is still active. A no-expiry report means the token has no expiry of its own; it is not a promise that any server will accept it tomorrow.
The deeper boundary is the usual one. Decoding is not verification. Without the signing key or the issuer's public key, nobody can confirm a token is genuine, and this tool never claims to. Anyone can write a payload with no exp claim and sign it with a key they invented; it will decode just as neatly as a real API token. Only the issuer's verification step separates the two.
On safety, everything happens locally in your browser, because tokens are credentials and the page never uploads the one you paste. That matters most for exactly this kind of token: a long-lived credential with no expiry is the worst possible thing to paste into a site that quietly sends it somewhere.
Common mistakes
- Assuming no exp means the token is broken. The claim is optional. The decoder reporting no expiry of its own is a description, not an error.
- Assuming no exp means valid forever. The token has no internal end date, but revocation, key rotation and account changes can end it at any time.
- Treating a long-lived token casually. With no expiry to limit the damage, a leaked API token stays useful to whoever holds it until it is revoked. Store it like a password.
- Expecting the decoder to invent a verdict. With no exp claim there is no date to judge. A tool that shows an expiry anyway is making one up.
- Forgetting the signature is not verified. A neatly decoded payload, with or without exp, is still a claim, not a proof of genuineness.
FAQs
Is a token without an exp claim invalid? No. The exp claim is optional, and tokens without one are reported as having no expiry of their own. That is a normal, deliberate design for some API tokens, not a defect in the token.
Does a token with no expiry ever stop working? Yes, but the stop comes from outside the token. The issuer can revoke it, rotate the signing key so its signature no longer verifies, or disable the account it belongs to. Nothing inside the token itself counts down to an end date.
Why do API tokens often have no exp claim? Many API integrations are long-lived: a script or service authenticates the same way for months. An exp claim would force constant re-issuing, so issuers leave it out and control the token's lifetime on the server side instead.
How can I tell whether my token has an exp claim? Paste the full token into the JWT Decoder and read the payload. If exp is among the claims, the expiry panel shows the translated date and a verdict. If it is absent, the panel reports that the token has no expiry of its own.
Can the decoder add an expiry to a token or verify it? No. The decoder only reads tokens; it cannot change their claims or re-sign them. It also cannot verify a token: verification needs the signing key or the issuer's public key, and the signature is labelled not verified.
Conclusion
A JWT with no exp claim has no expiry of its own, and that single fact explains everything the decoder shows you: the claims that are present, and no date where you expected one. Such tokens are a normal design for API credentials, controlled from the server side rather than by a countdown inside the token. When a login flow fails around tokens like these, the causes are usually elsewhere, and the companion guide walks through them: Common JWT Mistakes That Break Login Flows. More decoding and debugging tools live in the Developer Tools archive.