The iat claim in a JWT means "issued at". It holds the time the token was created, written as a Unix timestamp in seconds. The JWT iat claim tells a verifier how old a token is, but it does not make the token expire. That job belongs to exp.
What is the JWT iat claim?
The JWT iat claim is a registered claim that records when the token was issued. The specification says it "identifies the time at which the JWT was issued" and can be used to determine the token's age.
The issuer writes iat into the payload at signing time. The payload is signed, so changing the value afterwards breaks the signature.
The base specification makes iat optional. Two profiles built on it don't: OpenID Connect requires iat in every ID token, and the JWT profile for OAuth 2.0 access tokens requires it in access tokens.
What format does the iat value use?
The iat value is a JSON number in NumericDate format: the number of seconds from 1970-01-01T00:00:00Z UTC to the moment of issue, ignoring leap seconds. It is a number, not a quoted string, and it has no time zone of its own.
Take this decoded payload:
{
"sub": "user_8",
"iat": 1795082400,
"exp": 1795086000
}
Here iat is 2026-11-19T10:00:00Z and exp is 11:00:00Z the same day. The difference is 3600 seconds, so the issuer gave this token a one-hour lifetime.
JavaScript's Date works in milliseconds, so multiply by 1000 before converting:
new Date(1795082400 * 1000).toISOString();
// "2026-11-19T10:00:00.000Z"
The usual bug runs the other way. An issuer writes Date.now() straight into iat, which gives 1795082400000. Read as seconds, that date is tens of thousands of years away, and a strict verifier will treat the token as issued in the future.
How is iat different from exp and nbf?
The three time claims do different jobs: iat describes the past, while exp and nbf are rules a verifier must enforce. Only the last two have a processing requirement in the specification.
| Claim | Meaning | Must a verifier reject on it? |
|---|---|---|
iat |
When the token was issued | No rule defined |
nbf |
Earliest time the token may be used | Yes, before that time |
exp |
Time after which the token is invalid | Yes, from that time on |
For exp and nbf, the specification also allows "some small leeway, usually no more than a few minutes" to cover clock differences between servers. The iat section has no such sentence, because it defines no check to relax.
If your token is being rejected for age, look at exp first. The post on why a JWT shows as expired covers that case.
What is the iat claim used for?
The iat claim is used to measure token age and to enforce rules that exp alone can't express. Four uses come up most often.
- A maximum age on the verifier's side. The issuer may hand out tokens valid for a day, while one sensitive endpoint only accepts tokens younger than 15 minutes. That endpoint compares the current time with
iatand rejects anything older than 900 seconds. - Rejecting tokens issued before an event. After a password change, a server can store the time of the change and refuse any token whose
iatis earlier. That is revocation without a list of token IDs. - Limiting replay windows. OpenID Connect notes that
iatcan be used to reject tokens "issued too far away from the current time", which limits how long nonces have to be stored. The acceptable range is left to the client. - Debugging. When a token's lifetime looks wrong,
expminusiattells you what the issuer actually set.
My take: always include iat, even when nothing checks it yet. It costs a few bytes. The day you have to invalidate everything issued before an incident, the timestamp is already there to compare against.
How do JWT libraries handle iat?
JWT libraries don't agree on iat, and that gap is what most short explanations leave out. Some add it for you, some check it only if asked, and they differ on a value that lies in the future.
| Library | When signing | When verifying |
|---|---|---|
| jsonwebtoken (Node.js) | Adds iat by default unless noTimestamp is set |
No age check unless you pass maxAge |
| PyJWT (Python) | You set it yourself | Raises InvalidIssuedAtError if iat is not a number |
| golang-jwt v5 (Go) | You set it yourself | Checks iat only with the WithIssuedAt() option |
In jsonwebtoken, an iat you put in the payload replaces the real timestamp when the library works out exp from expiresIn. Its README shows backdating a token 30 seconds by setting iat to the current time minus 30. To enforce an age limit, pass the maxAge verify option, described as "the maximum allowed age for tokens to still be valid".
In golang-jwt, WithIssuedAt() makes a token with a future iat fail with the error token used before issued. Pair it with WithLeeway so a second of drift doesn't lock users out.
Should you reject a token with a future iat?
Rejecting a token because its iat is in the future is not something the JWT specification asks for. If you need "not valid before", the claim built for that is nbf.
An erratum reported against the iat section on 2023-12-01 proposes stating that implementers must not reject otherwise valid tokens whose iat appears to be from the future, and that issuers who want that behaviour should include nbf. Its status is "Reported", not verified, and it notes that libraries behave inconsistently.
A future iat nearly always means one of two things:
- Clock drift. The issuing server's clock runs slightly ahead of the verifying server's. Sync both with NTP and allow a few seconds of leeway.
- Wrong units. The issuer wrote milliseconds instead of seconds, as in the example above.
The limitation: iat is only as trustworthy as the issuer's clock. A verifier can't tell an honest timestamp from one written by a server with the wrong time, so any age check based on iat is approximate, by a few seconds at best.
How do you read iat from a real token?
Decode the payload and convert the number to a date. The payload is the middle of the three parts of a JWT, and it is only Base64URL-encoded, so no key is needed to read it.
Paste a token into the JWT decoder and it shows the iat and exp times as dates, with an expired or valid flag. The decoding happens in the page. It does not verify the signature, so a readable iat proves nothing about whether the token is authentic. See JWT decode versus verify for the difference.
If the token is from production, read how to decode a JWT safely before pasting it anywhere.
FAQ
Is the iat claim required in a JWT?
Not by the JWT specification, which makes iat optional. Profiles built on top of it are stricter: OpenID Connect requires iat in ID tokens, and the JWT profile for OAuth 2.0 access tokens requires it too.
What format is the iat value in?
A JSON number holding a NumericDate: the number of seconds since 1970-01-01T00:00:00Z UTC. It is not a string and not milliseconds.
What is the difference between iat and exp?
iat is when the token was created and exp is when it stops being valid. A verifier must reject a token after exp. The JWT specification defines no rejection rule for iat.
Should I reject a JWT whose iat is in the future?
The specification doesn't say to, and libraries differ. If a token must not be used before a certain time, set nbf, which has a defined check. Small future iat values are usually clock drift between servers.
Can I change iat after the token is signed?
No. iat is part of the signed payload, so editing it breaks the signature. A verifier that checks the signature will reject the altered token.