JWT Claims Explained: exp, iat, nbf, iss, aud and sub
JWT claims are just fields in a JSON object until a trusted verifier applies rules to them. The registered names below are common because they let systems express identity, issuer, audience and time boundaries in a consistent form.
Read claims as a set, not isolated fields
JWT bugs often come from validating one familiar claim and assuming the rest of the token is acceptable. A production verifier should interpret claims in the context of the application. For example, a future exp does not help if iss belongs to a different identity provider or aud names another API.
Worked time-claim example
{
"iat": 1788433200,
"nbf": 1788433200,
"exp": 1788436800
}
The intended window is one hour. A verifier should compare these NumericDate values with a trustworthy server clock and apply only a small, deliberate clock-skew allowance. It should not silently extend the token by hours merely to hide clock problems. If the token is rejected near a boundary, inspect NTP/time synchronization and the identity provider’s issuance policy.
Issuer and audience example
Suppose an API expects iss=https://login.example.com/ and aud=inventory-api. A correctly signed token with aud=billing-api should still be rejected by the inventory service. Signature verification tells you who signed the token; audience validation tells you whether the signer intended this token for this recipient.
Claims that need application-specific policy
sub is commonly used as a stable subject identifier, but applications should avoid assuming it is an email address or database primary key unless the issuer contract says so. Custom claims such as role, scope or permissions are even more application-specific. Document whether they are strings, arrays, space-delimited scopes or namespaced values and reject unexpected shapes.
Debugging checklist
- Convert NumericDate values to UTC first; then compare with server time.
- Confirm whether
audis a string or array and whether your library handles both correctly. - Compare issuer values exactly; trailing slashes and environment-specific issuer URLs can matter.
- Do not treat a missing optional claim as equivalent to an expected value. Decide explicitly which claims your application requires.
- When troubleshooting, use a redacted or non-production token. Claims can reveal user identifiers and bearer tokens can grant access.
What the browser tools can and cannot tell you
The JWT Claims Decoder can make timestamps and claim names easier to inspect, while the JWT Expiry Checker focuses on time-related claims. Neither tool receives your verification key, so neither can establish authenticity. The correct next step after inspection is to fix or test the server-side verifier, not to use the decoded payload as an authorization source.