About this tool
JWTs carry their own lifetime in the exp claim, a Unix timestamp that’s unreadable at a glance. This calculator decodes a token’s time claims into dates in UTC and your time zone, shows a live countdown to expiry, and works out the token’s total lifetime. It also does the reverse: give it a duration such as 15 minutes or 7 days and it produces the iat and exp values to put in a token.
Only the payload is decoded, locally; the signature isn’t checked. To verify a token, use the JWT Signature Verifier.
Time claims
exp: the token must be rejected at or after this time.iat: when the token was issued.nbf: the token must be rejected before this time.
All are in seconds, not milliseconds. A 13-digit exp is a common bug: Date.now() in JavaScript returns milliseconds, so divide by 1000.
Typical lifetimes
- Access tokens: 5 to 60 minutes, so a leaked token is useful only briefly.
- Refresh tokens: days to weeks, stored securely and rotated on use.
- One-off links (email verification, password reset): 15 minutes to 24 hours.
Allow a small clock skew (30–60 seconds) when validating, because servers’ clocks differ slightly.
FAQ
How do I check when a JWT expires?
Paste the token above. The exp claim is shown as a date with a live countdown, along with iat and nbf.
Is exp in seconds or milliseconds?
Seconds since 1 January 1970 UTC. If your exp has 13 digits, it’s in milliseconds and every library will treat it as far in the future.
How long should a JWT be valid?
Access tokens usually last 5–60 minutes; use refresh tokens for longer sessions.
What happens if a JWT has no exp?
It never expires on its own, which is risky. Always set exp on tokens that grant access.