You revoke a JWT early by making your API check server-side state on every request, because a signed token stays valid until its exp time no matter what you delete. The usual options are a denylist of revoked token IDs (jti), a per-user version or "revoked at" time, an OAuth introspection call, or short-lived tokens with a refresh token you can kill. Pick by how fast access must end.
Why you can't just delete a JWT
A JWT is self-contained, so any server holding the key can accept it without asking anyone. The JWT spec says the current time MUST be before the exp time, and it does not define revocation at all. Signature plus expiry is the whole check.
That is the trade you made for stateless auth. The OAuth revocation spec puts it plainly: self-contained tokens need some non-standardized backend interaction if you want immediate revocation.
As of November 2026, Amazon Cognito's guide warns that revoked tokens still verify in any JWT library that checks only the signature and expiration. The library isn't broken. It has no way to know.
The post on decoding vs verifying a JWT covers what each step proves.
Four ways to revoke a JWT
Revoking a JWT always means adding one lookup the signature can't do for you. Each option below trades speed of revocation against cost per request.
1. Denylist the jti
A jti denylist stores the ID of each revoked token, and your API rejects any token whose ID is on the list. The spec defines jti as a unique identifier that must have a negligible chance of being reused, which is exactly what a denylist key needs. The JWT access token profile for OAuth makes both jti and exp required.
This revokes one token at a time, which suits "log out this device" or "kill the token that leaked."
2. Per-user version or revoked-at time
A per-user marker revokes every token for one user at once. You store a number or timestamp on the user record. Tokens carry the version they were issued with, or you compare their iat against the user's revoked-at time. Anything older fails.
This is the "log out everywhere" button, and it also covers a password change.
3. Introspection
Token introspection asks the authorization server whether a token is still good. RFC 7662 returns an active boolean, which must be false once the token is revoked or outside its validity window. You get revocation that is as current as the server, at the cost of a network call.
4. Short access tokens plus a revocable refresh token
Short-lived access tokens limit damage instead of stopping it. The revocation spec suggests issuing short-lived access tokens refreshed with refresh tokens. You revoke the refresh token, and the access token dies on its own soon after.
The spec names the catch: if the server doesn't support access token revocation, revoking the refresh token does not immediately invalidate the access tokens already issued. For the difference between the two tokens, see access token vs refresh token.
Which revocation method fits your case
The right method depends on how quickly a revoked user must lose access.
| Need | Method | Extra cost per request | Revokes |
|---|---|---|---|
| Cut off within seconds, one token | jti denylist | One key lookup | A single token |
| Cut off within seconds, all of a user's sessions | Per-user version or revoked-at | One user lookup | Every token for that user |
| Central control across many APIs | Introspection | One network call (cacheable) | Whatever the auth server says |
| A short delay is acceptable | Short access token + revoke refresh token | None | Future renewals |
| A signing key leaked | Rotate the key | None after rollout | Every token signed with it |
My take: start with short access tokens and a revocable refresh token, then add a per-user version for "log out everywhere." Save the jti denylist for the day a security team needs one stolen token dead right now.
Details the usual advice skips
Most guides stop at "use a denylist." These details decide whether your JWT revocation holds.
- Match on jti, not the raw token string. The same claims can arrive in slightly different encodings, so a denylist keyed on the whole string is easy to slip past. Key it on the decoded
jti, checked after the signature passes. - Expire denylist entries at exp. Once a token's
exppasses, the normal check rejects it. Keep each entry only until then, plus your clock-skew allowance. The spec says that leeway is usually no more than a few minutes. iatis whole seconds. JWT dates are a NumericDate, the number of seconds since 1970-01-01T00:00:00Z UTC. If you store a revoked-at time in milliseconds, a token issued in the same second as the logout can slip through or be wrongly rejected. Store revoked-at in seconds and reject tokens whereiatis less than or equal to it.- Cached introspection can outlive a revocation. The introspection spec says responses must not be cached past exp, and warns the token may be revoked while you rely on the cache. Keep cache times short.
- Expect propagation delay. Revocation is meant to take effect immediately, but the spec admits some servers may learn of it later than others.
More on the iat rule in what the iat claim means.
A worked example with a real token
Here is how a jti denylist check runs, using the claims from the sample token in RFC 9068: "jti": "dbe39bf3a3ba4238a513f51d6e1691c4" and "exp": 1639528912.
- A user reports a stolen laptop. Your admin action stores
dbe39bf3a3ba4238a513f51d6e1691c4in the denylist, set to expire at the token'sexpplus your leeway. - The thief's request arrives. Your API verifies the signature first, then checks
exp. Both pass. - The API looks up the
jti. It is on the list, so the request is rejected as unauthorized. - After
exppasses, the store drops the entry. Any replay now fails the expiry check instead.
If you use OAuth, the client side of this is a POST to the revocation endpoint with a required token parameter and an optional token_type_hint. The server answers with HTTP 200 even when the token was already invalid, so don't read a 200 as proof the token existed.
What a JWT decoder can and can't tell you
A JWT decoder shows the claims and the expiry, but it can't tell you whether a token was revoked. Revocation lives in the issuer's state, not in the token.
The OnlineViewer JWT decoder shows the header, payload and signature, plus the iat and exp times with an expired or valid flag. It runs in your browser and only decodes: it does not verify the signature, and it has no access to any denylist. A token can show "valid" there and still be revoked. Use it to read jti and exp while debugging, never to decide access.
If your token shows expired when you think it shouldn't, the guide on why a JWT looks expired walks through the clock issues.
FAQ
Does logging out revoke a JWT?
Not on its own. Deleting the token from the browser stops that client from sending it, but a copy that leaked elsewhere still passes signature and expiry checks. The API only rejects it if it also checks a denylist, a version number or an introspection endpoint.
Do I need a database to revoke JWTs?
Yes, some shared state is unavoidable. The JWT spec defines no revocation, so the API needs a place to record which tokens or users are cut off. A small key-value store that holds only revoked IDs until they expire is usually enough.
Can I revoke a JWT by changing the signing key?
Yes, but it revokes every token signed with that key at once. That makes key rotation a good emergency tool after a key leak and a poor way to log out one user.
How long should a denylist keep a revoked jti?
Only until the token's own exp time, plus whatever clock-skew leeway your verifier allows. After that, the expiry check rejects the token anyway, so the entry adds nothing.
Can a JWT decoder tell me if a token was revoked?
No. A decoder reads the header and payload and can show whether exp has passed, but revocation lives on the server that issued the token. Only that server, or its introspection endpoint, knows.