DoraPDF / Blog

JWT Decoder: How to Decode a JWT Token Online and Check When It Expires

By the DoraPDF team · 5 min read · Updated 2026-11-28
JWT Decoder: How to Decode a JWT Token Online and Check When It Expires

Your app suddenly returns "401 Unauthorized", a login works on one device but not another, or an API refuses a token you copied from the browser. Before you dig through code, it helps to see what the token actually says. A JWT decoder shows you the header and payload in plain JSON, and tells you if the token has simply expired.

This guide shows how to decode a JWT token online with the free JWT Decoder on DoraPDF, how to read the common claims such as exp, iat and sub, and what decoding can and cannot tell you.

What a JWT is made of

A JSON Web Token is three pieces of text joined by dots:

header.payload.signature

The header and payload are only Base64URL-encoded, not encrypted. That is why anyone holding a token can read them, and why a decoder is so useful for debugging. (If you want to see how plain Base64 works, the Base64 tool shows the idea.)

How to decode a JWT token (step by step)

  1. Copy the token. In a browser you will usually find it in DevTools, under Application (local storage or cookies) or in the Authorization: Bearer ... header of a request in the Network tab. Copy only the part after Bearer.
  2. Open the JWT Decoder.
  3. Paste the token into the Input box. It is decoded as you paste; there is no button to press.
  4. Read the Output. You get two neatly formatted JSON blocks, marked // HEADER and // PAYLOAD.
  5. If the payload has an exp claim, a card below shows Expires with the local date and time, followed by (valid) or (expired).
  6. Use Copy to grab the decoded JSON for a bug report, or Clear to empty both boxes.

If what you pasted does not have at least two dot-separated parts, the tool shows "Not a valid JWT" instead of a result.

How to read the common claims

Claim Meaning What to check
exp Expiry time Is it in the past? Then the token is no longer accepted.
iat Issued at Is it far in the future? The server or device clock may be wrong.
nbf Not before The token is not valid until this time.
sub Subject, usually the user ID Is it the user you expected?
aud Audience Does it match the API you are calling?
iss Issuer Is it your login server and not a test one?

Times like exp and iat are Unix timestamps in seconds, which is why 1767225600 means nothing at a glance. The decoder converts exp to a readable date for you; for other time claims you can compare the numbers with exp.

Why it helps when debugging

Important: decoding is not verifying

The tool says it plainly: the signature is not verified. Decoding only reads the header and payload. It does not prove that the token was issued by your server or that nobody edited it. A token with a perfectly readable payload can still be fake.

So use a decoder to inspect, never to trust. Your server must always verify the signature with the correct key and check exp, aud and iss before it accepts a token. Never build logic that reads a payload and grants access without verification.

Practical tips

Common problems and fixes

"Not a valid JWT." You probably copied extra text such as Bearer or quotes, or only part of the token. A JWT has two dots; paste the full string.

Strange characters or an error after pasting. The token may have been URL-encoded when it was put in a link (you will see things like %2E). Decode it first with the URL Encoder, then paste the clean token.

The payload is not readable at all. Some systems use encrypted tokens (JWE) with five parts instead of three. Those cannot be read without the key, which is the point of encryption.

No "Expires" card appears. The token has no exp claim. Some long-lived tokens are like that; check your server settings if that is not intended.

Privacy note

The JWT Decoder runs locally in your browser. The token is decoded on your device and is not uploaded to DoraPDF or anyone else. Even so, follow the tips above and avoid pasting live production tokens anywhere you do not control.

FAQ

Can I decode a JWT without the secret key?

Yes. The header and payload are only Base64URL-encoded, so they can be read without any key. The key is only needed to verify or create the signature.

How do I check if a JWT token is expired?

Paste it into the JWT Decoder. If it has an exp claim, the tool shows the expiry date and marks it as valid or expired based on your device's clock.

Does the decoder verify the signature?

No. It reads the token only. Signature verification must happen on your server with the right key.

Is it safe to paste my token into an online JWT decoder?

With DoraPDF the token is decoded in your browser and not sent anywhere. Still, treat real tokens like passwords and prefer test tokens when you can.

Try it now

Next time an API says "unauthorized", open the JWT Decoder, paste the token and see in seconds whether it has expired or carries the wrong claims. For the JSON you copy out, the JSON Validator helps you check and format it.

Try the tools from this guide — free

Keep reading

Guide

Free Developer Tools Online: JSON Formatter, Regex Tester, Base64, URL Encoder, JWT Decoder, SQL and UUID

Eight small browser-based developer tools for everyday debugging: validate JSON, test regex, decode JWTs and Base64, format SQL, make UUIDs. Free.

Guide

Base64 Encode and Decode Explained (With Simple Examples)

What is Base64 encoding used for, how does it work, and why it is not encryption? Clear examples, plus free tools to encode, decode and read JWTs.

Guide

SQL Formatter Online: Beautify a Messy SQL Query So You Can Actually Read It

Free SQL formatter online: paste a one-line query and get keywords in UPPERCASE and each clause on its own line. How it works, tips and its limits.