JWT Expiration Checker
See at a glance if the token is valid, expired or not yet valid, with the exact expiry date, the time left and a live countdown that updates every second.
Paste a JSON Web Token to see if it is expired, when it expires and how long it lives. Get a live countdown, exp, iat and nbf dates in your time zone, and security warnings. Fast, free and no signup.
Enter the secret for HS256, HS384 or HS512, or the public key (PEM or JWK) for RS, PS and ES algorithms. The key stays in your browser.
Paste a JWT from a header, cookie, log or API response.
See if it is valid, expired or not yet valid, with a live countdown.
Check the dates in your time zone and fix any security warnings.
This free JWT expiry inspector tells you in one click whether a JSON Web Token is expired, when it expires and how long it lives. Paste a token and the tool decodes the payload, reads the exp, nbf and iat claims, converts them to readable dates in UTC and in your own time zone, and shows a live countdown to expiry. It also runs security checks on the token, such as a missing expiry, an unsigned alg none token, a very long lifetime, an exp value in milliseconds, or keys referenced from the header. You can even verify the signature in your browser with your own secret or public key. Everything works locally, without any third-party API, so your token is never uploaded.
See at a glance if the token is valid, expired or not yet valid, with the exact expiry date, the time left and a live countdown that updates every second.
Convert every time claim to UTC, to your local time or to any city, see how old the token is, and test a clock skew tolerance to understand borderline cases.
Spot risky tokens early and verify HS256, RS256, PS256 and ES256 signatures locally, with protection against the classic algorithm confusion mistake.
A JSON Web Token (JWT) carries a set of claims, which are statements about a user or a session. The exp claim is the expiration time. It holds a number called a NumericDate: the number of seconds since 1 January 1970 at 00:00:00 UTC, which is the same Unix time that databases and programming languages use. The rule is simple. A server must reject the token when the current time is on or after exp.
Expiry is one of the most important protections of a JWT. A token is usually valid on its own: the server does not look it up in a database, so it cannot easily cancel a token before it expires. A short lifetime limits the harm when a token is stolen or leaked.
| Claim | Name | Meaning | Validation rule |
|---|---|---|---|
exp | Expiration time | The moment after which the token is no longer valid | Reject if now is on or after exp |
nbf | Not before | The moment before which the token must not be accepted | Reject if now is before nbf |
iat | Issued at | The moment the token was created | Used to work out the age of the token |
All three are NumericDate values in seconds, not milliseconds. This is the most common source of mistakes: JavaScript Date.now() returns milliseconds, so it must be divided by 1000 before it is placed in a token.
{
"sub": "1234567890",
"iat": 1700000000,
"exp": 1700003600
}
In this example the token was issued on 14 November 2023 at 22:13:20 UTC and expires exactly one hour later, at 23:13:20 UTC, so its lifetime is 3,600 seconds. You can convert any of these numbers to dates yourself with the Unix Timestamp Converter.
A correct validator performs these checks in order: it verifies the signature with the right key and algorithm, then compares the current time with the time claims. In simple terms, the token is accepted only when nbf is less than or equal to now and now is less than exp. Many libraries also let you set a leeway.
Leeway, also called clock skew tolerance, is a small number of seconds added to the comparison so that tokens are not rejected because two servers disagree by a moment. A typical value is 30 to 60 seconds. Use it only to absorb small clock differences. A large leeway quietly makes all your tokens live longer than you intended. This tool lets you test a tolerance and shows how it changes the status.
When a request fails with a message such as jwt expired, the token has passed its exp time. These are the usual causes and the way to fix each one:
| Language and library | Error you will see |
|---|---|
| Node.js (jsonwebtoken) | TokenExpiredError: jwt expired |
| Python (PyJWT) | ExpiredSignatureError: Signature has expired |
| Java (jjwt) | ExpiredJwtException |
| .NET (Microsoft.IdentityModel) | SecurityTokenExpiredException |
| Go (golang-jwt) | token is expired (ErrTokenExpired) |
| PHP (firebase/php-jwt) | ExpiredException: Expired token |
The right lifetime depends on how sensitive the action is and how easily you can revoke access. These are common practices, not fixed standards:
| Token type | Common lifetime | Notes |
|---|---|---|
| Access token | 5 to 15 minutes, up to 1 hour | Sent with every API request, so keep it short |
| ID token | About 1 hour | Proves who signed in, not meant for calling APIs |
| Refresh token | Days to weeks | Store it carefully and rotate it on every use |
| Email verification or password reset | 15 minutes to 1 hour | Single purpose, ideally single use |
The inspector warns you when a token lives for more than 24 hours and when it lives for more than 30 days, so you can spot tokens that are likely to be too generous.
In your own code you should let a JWT library verify the signature and the expiry together. This is how it looks in popular languages:
// JavaScript: read the exp claim (does NOT verify the signature)
function isExpired(token) {
const part = token.split(".")[1].replace(/-/g, "+").replace(/_/g, "/");
const payload = JSON.parse(atob(part));
return Date.now() / 1000 >= payload.exp;
}
# Python with PyJWT: verifies the signature and exp, with 30 seconds of leeway
import jwt
try:
data = jwt.decode(token, key, algorithms=["HS256"], leeway=30)
except jwt.ExpiredSignatureError:
print("Token expired")
// PHP with firebase/php-jwt
use Firebase\JWT\JWT;
use Firebase\JWT\Key;
use Firebase\JWT\ExpiredException;
JWT::$leeway = 30;
try {
$data = JWT::decode($token, new Key($key, 'HS256'));
} catch (ExpiredException $e) {
echo 'Token expired';
}
The first example is only suitable for showing a countdown in a user interface. Never use it to decide whether a request is allowed. Authorization decisions must be made on the server after the signature is verified.
A JWT has three parts separated by dots: a header, a payload and a signature. The first two are only Base64url-encoded JSON, which anyone can decode. The signature is what protects the token. It is created with a secret or a private key, and it proves that the header and the payload were not changed. So the dates that you see in a decoded token are only reliable after the signature has been verified. The optional signature check in this tool supports HS256, HS384, HS512, RS256, RS384, RS512, PS256, PS384, PS512, ES256, ES384 and ES512, using the browser's built-in cryptography.
A valid JWT works like a temporary password. Anyone who has it can use it until it expires, so be careful where you paste it. This inspector does all of its work inside your browser, and it does not call an API, store the token or send it anywhere. For extra safety, use test tokens or expired tokens when you can, never paste long-lived production tokens or signing secrets into a website that you do not trust, and rotate or revoke a token if you believe that it was exposed. For a full view of every claim in a token you can also use the JWT Decoder.
Use the Unix Timestamp Converter to turn exp, iat and nbf values into dates, the Base64 Encode and Decode tool to read the parts of a token by hand, the JSON Formatter to format the payload, the Hash Generator to create checksums, and the UUID Generator to create unique values for the jti claim.
Our JWT expiry inspector is free, fast and works on desktop, tablet and mobile. There is no account, nothing to install and no limit on the number of tokens you check. The token is processed in your browser and never leaves your device. Use it to debug expired token errors, to confirm token lifetimes, to compare the dates with your server clock and to review the security of your tokens.
Find answers to common questions about the exp claim, expired tokens, clock skew and keeping your tokens safe.
Paste the token into the JWT Expiry Inspector. The tool decodes the payload, reads the exp claim, which is a Unix timestamp in seconds, and compares it with the current time. It then shows whether the token is valid, expired or not yet valid, the exact expiry date in UTC and in your time zone, and a live countdown. If the token has no exp claim, the tool tells you that it never expires on its own.
The exp claim is the expiration time of the token. Its value is a NumericDate: the number of seconds since 1 January 1970 at 00:00:00 UTC. The token must not be accepted on or after that moment. For example, exp 1700003600 means 14 November 2023 at 23:13:20 UTC. The related claims nbf (not before) and iat (issued at) use the same format.
Decoding a token only reads it. It does not prove that the token is genuine, because anyone can create a token with any claims. This tool can optionally verify the signature in your browser if you enter the secret for HS256, HS384 or HS512, or the public key for RS, PS and ES algorithms. Without a key, treat the dates as unverified information. Your server must always verify the signature itself.
The most common causes are a clock that is wrong on the server or the client, an exp value written in milliseconds instead of seconds, confusion between time zones, an old token that was cached, or a refresh that failed. Check the expiry date shown in UTC, compare it with the real current UTC time and look for the milliseconds warning in the findings list. A small clock skew tolerance, also called leeway, can hide minor clock differences.
Clock skew is the difference between the clocks of the system that issued the token and the system that checks it. Leeway is a small number of seconds, often 30 to 60, that the validator adds to exp and nbf so that tokens are not rejected because of tiny clock differences. You can set the tolerance in the settings and see how the status changes. Keep leeway small, because it extends the life of every token.
There is no single rule, but common practice is to keep access tokens short, from about 5 to 15 minutes up to one hour, and to use a longer-lived refresh token, valid for days or weeks and ideally rotated, to get new access tokens. Short lifetimes limit the damage if a token is stolen, because a JWT usually cannot be revoked before it expires. The inspector warns you when a token lives for more than a day.
The decoding, the countdown and the optional signature check all run in your browser. The token is not uploaded, saved or sent to any API. Even so, a valid token works like a password until it expires, so avoid pasting live production tokens into any website. Prefer test tokens or expired tokens, and if you think a real token was exposed, revoke it or rotate the signing key.
Merge, split, compress and convert files in seconds. Explore powerful free tools for all your everyday needs.
Explore All Tools →