Skip to main content

Your JWT still expired even though it decoded fine

Decoding shows header and payload in the browser. It does not verify the signature. Read exp yourself—and keep real checks on the server.

Updated 3 min readMarkdown
Your JWT still expired even though it decoded fine

I pasted a bearer token into a decoder, saw a clean JSON payload, and almost moved on. Then I looked at exp. The session was already dead. The JSON still looked perfect.

That is the gap between decode and verify—and it shows up in Slack threads every week.

Tool: https://kepttools.com/jwt-decoder

Decode is reading, not trusting

A JWT has three Base64url parts: header, payload, signature. KeptTools decodes the first two so you can read alg, sub, exp, and the rest of the claims. The FAQ on the page is direct: this tool does not verify the signature. Anyone who holds the string can read the payload. A decoded token is not proof that the signature is valid, that your issuer signed it, or that the session is still live.

I open the page when I am debugging login and I need to see what the client actually holds—without shipping that string to a random “decode JWT” API. The page states that nothing you paste is uploaded; decode is base64url parsing on the device. The sensitive-tool note also says no analytics, ads, or third-party scripts on that flow. Tip from the same page: open DevTools → Network while you work and confirm no request carries your paste.

The exp habit that saves an afternoon

Expired tokens still decode. Look at exp in the payload. It is a Unix timestamp in seconds. Compare it with “now” before you treat the session as active. If the number is opaque, convert it with a timestamp tool on the same site—but the decoder will not refuse the paste just because time ran out. Pretty JSON is not a clock.

What I leave on the server

Signature checks stay where the secret or public key lives. The browser decoder is for inspection. My API still rejects bad signatures the same way it did before I opened the tab. If your product must refuse forged or expired tokens, that decision never belonged in a client-side decode step.

Mistakes I see in chat logs

  • “It decoded, so it’s fine.”
  • Sharing production refresh tokens in screenshots.
  • Forgetting that three parts are required; the page expects header.payload.signature.
  • Skipping exp because the payload “looks right.”

One-line limit

Limit: header and payload only—no signature verification; expired tokens still decode.

A short workflow

  1. Paste a non-production JWT you control.
  2. Read header alg and payload claims.
  3. Check exp against the current time.
  4. Confirm Network shows no upload of the paste.
  5. Verify the same token on your server the way your app already does.

If step 5 fails while step 2 looks pretty, you have the whole lesson in one afternoon: decode answered “what’s inside,” verify answered “should I trust it.”

When decoding is enough—and when it is not

Enough: reading claims during a local debug session, confirming which sub the client received, checking whether exp matches what you expect from your issuer. Not enough: any gate that must reject a forged or expired bearer string in production. That gate stays on the server.

Start here when you next stare at an opaque bearer string: https://kepttools.com/jwt-decoder

No comments yet. Be the first to comment.