JWT Expiration: exp, iat and nbf Explained

Read common JWT time claims and distinguish decoding from signature verification.

Why this matters

A token can be expired or not yet valid even when its payload decodes successfully.

Worked example

Start with this sample input:

{"iat":1760000000,"nbf":1760000000,"exp":1760003600}

Example result or interpretation (check the linked tool for exact formatting):

exp - iat = 3600 seconds

The exp claim is a Unix timestamp in seconds, not milliseconds. In this example the stated lifetime is one hour.

Token timestamps are NumericDate values

JWT exp, iat and nbf are normally expressed as seconds since the Unix epoch. A successful Base64URL decode only exposes untrusted claims. Expiry checks belong in a verifier that also validates the signature and issuer.

Claims and interpretation

exp after iat

{"iat":1760000000,"exp":1760003600}

Interpretation: Nominal lifetime: 3600 seconds

nbf after now

{"nbf":4102444800}

Interpretation: Not valid before the future timestamp

Missing exp

{"sub":"user-1"}

Interpretation: No expiration claim; policy must decide whether to reject

Clock skew can justify a small, explicit leeway in backend verification, but never accept a decoded token as proof of identity.

Step-by-step workflow

  1. Decode the token locally.
  2. Compare exp and nbf with the current Unix time in seconds.
  3. Use your backend’s trusted JWT library to verify signature, issuer and audience.

Try the related ByteKitly tool →

Common mistakes and limitations

Decoding a JWT does not verify its signature, issuer, audience or authorization; never paste production secrets into shared links.

Test examples using your own data format and verify results before using them in production systems. ByteKitly's core converters operate in the browser, but avoid sharing confidential input in screenshots or links.

Continue learning

Browse all developer guides or explore all ByteKitly tools.