blog
Tools Guide

JWT Validation: What to Check After You Verify the Signature

Use a practical JWT validation checklist: restrict algorithms, verify the signature, and enforce issuer, audience, and time claims before trusting a token.

Published 2026-10-03 · Updated 2026-10-03 · 7 min read

Decoding a JSON Web Token (JWT) makes its header and claims readable. It does not establish that the token was issued by the party you expect, is intended for your application, or is still valid. Those are validation decisions.

This guide answers a practical question: what should an application check before it trusts a JWT for authentication or authorization?

Treat decoding and validation as different operations

A compact signed JWT is commonly a JWS: three dot-separated Base64url values for the protected header, payload, and signature. The signature covers the encoded protected header and payload, but an application must verify it with the expected algorithm and key before it treats the contents as trustworthy. 1 A JSON parser or token viewer can show the claims; neither one validates them.

That distinction matters because a payload can contain familiar-looking fields such as sub, role, email, or admin. They are only untrusted input until successful validation. Do not make an authorization decision merely because a decoded payload says the user has a particular role.

Start with a fixed validation policy

Define the policy in application configuration, not from values supplied by the token. At minimum, establish these facts before processing requests:

  1. Which issuer or issuers are allowed.
  2. Which audience value identifies this API or application.
  3. Which signing algorithm or algorithms are allowed.
  4. Which key or trusted key source is associated with each allowed issuer.
  5. How much clock skew, if any, is acceptable for time-based claims.

RFC 8725 recommends that applications perform algorithm verification and only allow algorithms that their security policy permits. It specifically warns against deriving the allowed algorithm from the token's alg header. 2 The header helps a verifier select among already permitted options; it must not let an attacker choose a weaker verification path.

If tokens can come from more than one issuer, keep their validation rules distinct. A key, audience, or token type accepted for one issuer should not automatically be accepted for another. RFC 8725 recommends mutually exclusive validation rules for different kinds of JWTs to prevent one kind from being confused with another. 3

Verify the signature with the expected key and algorithm

Use a JWT library that supports the algorithm your issuer documents. Give it an explicit allow-list of permitted algorithms, then verify the signature using the correct verification key. Do not accept an unsigned token or fall back to a different algorithm just because the header requests it.

Key selection needs the same care. A kid header can help find a key within a trusted issuer's published key set, but it is an identifier, not proof that an arbitrary key location is trustworthy. Obtain keys only through the configured issuer relationship or another trusted distribution mechanism. The JWT Best Current Practice notes that applications should use trusted keys and validate cryptographic operations. 2

Signature verification answers an integrity and origin question for the signed content. It does not by itself mean that the token is meant for this service or usable at this moment. Continue with the claim checks below.

Enforce issuer, audience, and time claims

The exact required claims depend on the protocol and your application, but these checks are common for access tokens and identity tokens.

ClaimValidation question
issDoes the issuer exactly match an issuer your application trusts?
audIs this API or client one of the intended recipients?
expHas the expiration time passed?
nbfIs the token being used before its allowed time?
iatIf your policy uses it, is the issued-at time plausible for the token's intended lifetime?
jtiIf replay detection is required, has this token identifier already been used or revoked?

The iss claim identifies the principal that issued the JWT, and the aud claim identifies its intended recipients. A recipient that does not identify itself in aud when that claim is present must reject the token. 4 5 Compare the values according to the issuer's documented format; do not normalize, trim, or loosely match an issuer URL unless the protocol explicitly says to.

The exp claim identifies the time on or after which a token must not be accepted, while nbf identifies the time before which it must not be accepted. RFC 7519 permits a small allowance for clock skew, but that allowance is a local policy choice—not a reason to make expired tokens broadly acceptable. 6 7

iat and jti are optional registered claims. An application can use iat to apply an age policy, and jti can support replay prevention when the application stores and checks identifiers. Their presence alone does not implement either control; the application must define and enforce the surrounding policy. 8 9

Apply authorization after token validation

After validation succeeds, map the verified subject and permitted claims to an application authorization decision. Keep that decision specific to the endpoint and action. For example, a valid token may establish who presented it, yet still lack the scope, role, tenant membership, or resource ownership required for a particular request.

Avoid treating a claim name as universal. role, groups, scope, and custom claim names do not have one shared meaning across issuers. Follow the issuer's protocol documentation and make the API's authorization rules explicit. RFC 8725 cautions that the same JWT claims can have different meanings in different application contexts. 10

A practical request-time sequence

Use this order as a review checklist:

  1. Extract the compact token from the expected request location without logging it.
  2. Parse only enough of the protected header to select from keys already trusted for this endpoint and an allowed algorithm.
  3. Verify the signature with the configured key and an explicit algorithm allow-list.
  4. Reject malformed tokens and tokens with an untrusted issuer, wrong audience, or failed exp or nbf check.
  5. Enforce any application-specific iat, jti, token-type, scope, tenant, and resource rules.
  6. Make the authorization decision using the validated identity and claims, then record only safe diagnostic information.

The yukt.tools homepage lists JWT utilities among its online tools. A decoder can help inspect a non-sensitive sample while debugging formatting, but it cannot replace server-side signature verification and claim enforcement. Keep real bearer tokens out of screenshots, issue trackers, logs, and third-party tools unless you are authorized to disclose them.

Frequently asked questions

Is decoding a JWT the same as verifying it?

No. Decoding translates the compact token's encoded header and payload into readable data. Verification checks the signature using the expected algorithm and key; validation then checks whether the claims meet the application's issuer, audience, time, and authorization rules. A decoded payload is not trustworthy merely because it is valid JSON. 1 2

Should an API always check the JWT audience?

When a token includes an aud claim, a recipient that does not identify itself in that claim must reject it under RFC 7519. Whether an aud claim is required for a particular token profile is a protocol and application-policy decision, so configure the API to follow the issuer's documented contract rather than accepting any otherwise valid token. 5

Does a valid JWT signature mean the request is authorized?

No. A valid signature establishes that the signed content passed cryptographic verification under the configured key and algorithm. The application must still validate the token's issuer, audience, and temporal claims and then decide whether the validated subject has permission for the requested action or resource. 2 10

Sources and research

  1. RFC 7515, section 3.1: JWS Compact Serialization — IETF specification for the signed compact serialization form, accessed 2026-10-03.
  2. RFC 8725, section 3.1: Perform Algorithm Verification — IETF Best Current Practice for JWT algorithm and key verification, accessed 2026-10-03.
  3. RFC 8725, section 3.12: Use Mutually Exclusive Validation Rules — IETF guidance for preventing cross-JWT confusion, accessed 2026-10-03.
  4. RFC 7519, section 4.1.1: iss (Issuer) Claim — IETF definition of the issuer claim, accessed 2026-10-03.
  5. RFC 7519, section 4.1.3: aud (Audience) Claim — IETF requirements for the audience claim, accessed 2026-10-03.
  6. RFC 7519, section 4.1.4: exp (Expiration Time) Claim — IETF definition of expiration time and clock-skew allowance, accessed 2026-10-03.
  7. RFC 7519, section 4.1.5: nbf (Not Before) Claim — IETF definition of not-before time, accessed 2026-10-03.
  8. RFC 7519, section 4.1.6: iat (Issued At) Claim — IETF definition of issued-at time, accessed 2026-10-03.
  9. RFC 7519, section 4.1.7: jti (JWT ID) Claim — IETF definition of JWT identifiers, accessed 2026-10-03.
  10. RFC 8725, section 3.8: Validate Issuer and Subject — IETF guidance on validating claim context, accessed 2026-10-03.