plain/devtools home

JWT claims explained

A JWT is a signed JSON object. The claims are its fields. Seven of them are registered in RFC 7519 and mean the same thing everywhere, so it pays to know exactly what each one promises.

Last reviewed 2026-10-21. Definitions follow RFC 7519, section 4.1 (May 2015). The decoder on this page reads a token in your browser and never checks or sends the signature.

jwt-decodersampless sample · c copy
■ Header
■ Payload

This tool decodes only. It does not check the signature, so a decoded token is not proof the token is genuine.

never leaves your browser

The seven registered claims

None of these is required by RFC 7519; each is optional. Your application decides which ones it needs and enforces them.

ClaimNameValue typeWhat it saysCheck on receipt
issIssuerCase-sensitive string or URIWho issued the token.Compare to the issuer you trust.
subSubjectCase-sensitive string or URIWho the token is about. Locally unique within the issuer, or globally unique.Use as the user or principal key.
audAudienceString or array of stringsWho the token is intended for. Each recipient must identify itself with a value in aud.Reject the token if your service is not listed.
expExpiration timeNumericDateOn or after this time the token must not be accepted.Reject when now is at or past exp.
nbfNot beforeNumericDateBefore this time the token must not be accepted.Reject when now is before nbf.
iatIssued atNumericDateWhen the token was issued; lets you compute its age.Optional age limits.
jtiJWT IDCase-sensitive stringA unique identifier, usable to prevent replay.Track seen IDs if you must reject replays.

Wording is paraphrased from RFC 7519, section 4.1.

Time claims are seconds, not milliseconds

exp, nbf and iat are NumericDate values: the number of seconds since 1970-01-01T00:00:00Z UTC, ignoring leap seconds, and fractions are allowed. JavaScript dates use milliseconds, so convert with new Date(exp * 1000). A value around 1.7 billion is seconds; one around 1.7 trillion is milliseconds and almost certainly a bug.

RFC 7519 allows implementers to provide a small leeway, usually no more than a few minutes, to account for clock skew when checking exp and nbf. Keep it small and make it explicit in your configuration.

A worked example

Take a token whose payload is {"iss":"https://auth.example.com","sub":"user_123","aud":"api.example.com","exp":1761003600,"nbf":1761000000,"iat":1761000000,"jti":"b1c2d3e4"}. Decoded by this page's code:

ClaimValueUTC timeMeaning
iat17610000002025-10-20T22:40:00ZIssued at this moment.
nbf17610000002025-10-20T22:40:00ZValid from the same moment.
exp17610036002025-10-20T23:40:00ZExpires 60 minutes after issue.

The token is illustrative and unsigned; the values were chosen for the example.

Paste any token into the decoder above to see the same breakdown for your own claims. A decoder reads the claims; it does not prove the token is genuine. Only your server, with the right key, can verify the signature.

Checks people forget

  • Verify the signature before you trust any claim. Decoding is not verifying.
  • Check iss and aud, not only exp. A valid token meant for another service should be rejected.
  • Pin the accepted signing algorithm in your code. RFC 8725 collects best practices for JWT validation.
  • Do not put secrets in the payload. It is encoded, not encrypted, and anyone holding the token can read it.

Frequently asked questions

What is the difference between iat and nbf?

iat records when the token was issued. nbf sets the earliest time the token may be accepted. They are usually equal, but a token can be issued now and made valid later.

Why does my JWT say it expired when it just got issued?

Usually clock skew between the issuer and the verifier, or the issuer wrote milliseconds where seconds are required. Compare the exp value to the current time in seconds.

Is aud a string or an array?

RFC 7519 allows either. With a single audience it may be a plain string; with several it is an array of strings.

Can I add my own claims?

Yes. Parties that agree on them can use private claim names. For names that others may see, RFC 7519 recommends collision-resistant names, for example ones that include a domain you control.

Sources

Related

esc
↑↓ move↵ open? all shortcuts

Keyboard shortcuts

Cmd or Ctrl shortcuts always work.
Everywhere
Everywhere
Open the command palette
CtrlK
Open the palette (outside a text field)
/
Show these shortcuts
?
Toggle light and dark theme
t
Go home
gh
Go to all tools
gt
On a tool page
On a tool page
Run the main action
Ctrl↵
Copy the output
c
Load the next sample
s
Focus the input
i
Leave a text field
Esc
Previous or next tool
[]
In the palette
In the palette
Move the selection
↑↓
Open the selected item
↵
Close
Esc