A request fails with an authentication error, and the first suspect is the token's expiry. The problem is that the expiry inside a JSON Web Token is stored as a bare number of seconds, and nobody can look at a number like 1516239022 and know whether it means last Tuesday or the next century. Checking a JWT expiry means translating that number, and this guide shows how.

The tool for the job is the free JWT Decoder on Ovatly. Paste a token and it shows the payload claims in plain JSON, translates the expiry into a readable date, and gives a clear expired or not-expired verdict, all locally in your browser.

Contents

  • Quick answer
  • What the exp claim actually is
  • How to check a JWT expiry, step by step
  • Worked example: an expiry in the year 2096
  • When a token has no exp claim
  • Limitations: an exact claim, a policy decision
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

Open the JWT Decoder, paste the full token with all three dot-separated parts, and read the expiry panel. The panel takes the exp claim from the payload, which is expressed in seconds since the Unix epoch, and reports it as a readable date together with a verdict: expired or not expired. If the token has no exp claim, the tool reports that it has no expiry of its own instead of inventing a date. One caution: the verdict reports the claim exactly. Whether an expired token is actually rejected is your server's policy decision, and some systems allow a minute or two of leeway.

What the exp claim actually is

Every JWT payload is a set of claims, and exp is the claim that carries the expiry. Its value is a count of seconds since the Unix epoch, the same format used by its sibling claim iat, which records when the token was issued. Epoch seconds are a good format for machines: a single number, no time zones, no ambiguity. They are a poor format for people, because the number carries no visible relationship to a calendar date.

The decoder computes its time display from the exp and iat claims. That means the date it shows you is the claim itself, translated, not an estimate and not a value fetched from anywhere else. If the issuer put the wrong time in the token, the decoder will faithfully show you the wrong time in readable form. Checking an expiry therefore answers one precise question: what expiry does this token claim to have?

How to check a JWT expiry, step by step

  1. Open the JWT Decoder and paste the full token, all three dot-separated parts.
  2. Read the payload claims and find exp among them, alongside the subject, issuer and issued-at claims.
  3. Read the expiry panel, which translates exp into a readable date.
  4. Note the verdict, expired or not expired, and remember that the signature is present but not verified.

Worked example: an expiry in the year 2096

Take the classic demo token, whose header is {"alg":"HS256","typ":"JWT"} and whose payload contains sub "1234567890", name "John Doe" and iat 1516239022. As it stands in that example, the payload carries no exp claim at all, so the decoder reports a token with no expiry of its own.

Now add an exp claim of 4000000000 to the same payload. The expiry panel translates that number into a date: 2 October 2096. The verdict follows directly: the token is not expired, and will not be for a long time. That translation is the whole value of the panel. The claim 4000000000 tells you nothing at a glance; the date 2 October 2096 tells you everything.

The same reading works in the other direction. An exp value in the recent past produces a date you recognise and an expired verdict, which points you at the real cause of an authentication failure instead of leaving you to debug the wrong layer of the system.

When a token has no exp claim

Not every token expires. Tokens without an exp claim are reported as having no expiry of their own, which is common for some API tokens. The decoder shows the claims that are present and does not invent one, so a missing exp reads as exactly that: missing.

That distinction matters when you are debugging. A token rejected despite having no expiry is being rejected for another reason, and chasing the expiry will not find it. A token with an exp claim that has passed is a different case, and the panel's verdict separates the two situations at a glance.

Limitations: an exact claim, a policy decision

The exp claim is exact, and what happens about it is a policy decision. The tool reports the claim exactly; your server's policy decides what is enforced. Some systems allow clock skew leeway of a minute or two, because the clocks of the issuing and receiving machines are rarely in perfect agreement, and some ignore exp for specific flows. This is why a token can show as expired in the decoder while an application still accepts it, or why a just-expired token sometimes works for another minute.

The second limit is the standing one for all decoding. Checking the expiry is not verifying the token. The exp value is a claim in an encoded payload that anyone can read and anyone can fabricate. A forged token can carry an exp claim set decades in the future and the panel will report it faithfully. Only verification with the signing key or the issuer's public key confirms a token is genuine, and the decoder does not have that key and never claims to. Treat the expiry verdict as a debugging fact about the token in front of you, not as a judgement on its authenticity.

Finally, the practical safety point: everything happens locally, because tokens are credentials and the page never uploads the one you paste. Keep that habit everywhere, and do not paste production tokens into sites whose behaviour you cannot check.

Common mistakes

  • Converting epoch seconds by eye. exp is seconds since the Unix epoch. Guessing at the date wastes time; let the panel translate it.
  • Confusing exp with iat. iat is when the token was issued, exp is when it expires. Comparing the two tells you the token's intended lifetime; reading one as the other gives you a nonsense answer.
  • Assuming expired in the decoder means rejected everywhere. Some systems allow clock skew leeway of a minute or two, and some ignore exp for specific flows. The claim is exact; enforcement is policy.
  • Assuming no exp means the token is broken. Some tokens, including many API tokens, legitimately carry no expiry of their own.
  • Treating a far-future exp as proof of validity. The expiry is a claim, not a proof. Verification is a separate step that needs the signing key or the issuer's public key.

FAQs

Where is the expiry of a JWT stored? In the exp claim in the payload. It is a number of seconds since the Unix epoch, so it needs translating before a human can read it. The decoder does that translation and shows a readable date plus an expired or not-expired verdict.

What if my token has no expiry? Tokens without an exp claim are reported as having no expiry of their own, which is common for some API tokens. The decoder shows the claims that are present and does not invent one.

Why does my token say expired when the app still accepts it? Some systems allow clock skew leeway of a minute or two, and some ignore exp for specific flows. The tool reports the claim exactly; your server's policy decides what is enforced.

What is the difference between exp and iat? exp is the expiry time and iat is the issued-at time. Both are seconds since the Unix epoch, and the decoder computes its time display from these claims.

Does checking the expiry prove the token is valid? No. The expiry panel reports the exp claim; it does not verify the signature. A forged token can carry any exp value it likes, and only verification with the signing key or the issuer's public key confirms a token is genuine.

Conclusion

Checking a JWT expiry is a thirty-second job once you stop trying to read epoch seconds directly: paste the token into the JWT Decoder, read the translated date in the expiry panel, and take the verdict for what it is, an exact report of the exp claim. If you are still building your picture of the format itself, the companion guide covers the whole token from the header down.

Related guide: What Is a JWT and How Does JSON Web Token Authentication Work.

More tools for this kind of work live in the Developer Tools archive.