JWT Lifetime Calculator

The JWT Lifetime Calculator measures the configured lifetime of a token — the span between its iat (issued at) and exp (expiration) claims — and presents it as a readable duration.

What This Tool Does

A token’s lifetime is a deliberate security choice made by the issuer. This tool decodes the payload, reads iat and exp, subtracts one from the other and reports the duration in human terms — minutes, hours or days — alongside the raw timestamps.

How to Use

  1. Paste your JWT into the input field.
  2. Read the calculated lifetime between iat and exp.
  3. Check the individual issued-at and expiration dates for context.
  4. Copy the result or reset to analyze another token.

Key Features

Common Use Cases

Choosing a Token Lifetime

Shorter lifetimes limit the window in which a leaked token can be abused, at the cost of more frequent renewal — usually via refresh tokens. Longer lifetimes are convenient but increase exposure.

Common practice is minutes to an hour for access tokens and days to weeks for refresh tokens, paired with revocation where possible.

Frequently Asked Questions

How is the lifetime calculated?

By subtracting the iat claim from the exp claim — both are Unix epoch seconds — and formatting the difference as a readable duration.

What if my token has no iat or exp?

The tool tells you which claim is missing. Without both values, a lifetime cannot be computed.

What is a good JWT lifetime?

It depends on risk and use case. Short-lived access tokens (minutes to an hour) with refresh tokens are a common, safer pattern.

Is lifetime the same as time remaining?

No. Lifetime is the total configured span; time remaining shrinks as time passes. The JWT Expiry Checker shows the remaining time.

Does a longer lifetime make a token stronger?

No — lifetime and cryptographic strength are unrelated. Longer lifetimes generally increase risk if a token leaks.

Is my token uploaded?

No. The calculation happens locally in your browser.

Related JWT Tools

View all 12 JWT tools