1. Home
  2. Developer tools
  3. JWT Decoder

JWT Decoder

Paste a JWT to see its header, payload, and human-readable issue and expiry times.

Free, no sign-up. Runs in your browser: nothing is uploaded.

Free workspace included. Docs, spreadsheets, notes and tasks that save on your device. No sign-up.Take a look

How to use JWT Decoder

  1. Paste the token (with or without “Bearer”).
  2. Read the header, payload and timing claims.
  3. Copy any part.

Features

  • Pretty-printed header and payload
  • exp, iat, nbf as dates with status
  • Never sent anywhere

Supported formats

Input

  • JWT

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the JWT Decoder is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Decoding does not verify the signature. Verify tokens in your server code with the secret or public key.

Guide

Reading a JWT, and debugging 401 errors with it

A JSON Web Token (JWT) is three Base64URL-encoded parts separated by dots: header.payload.signature. APIs and login systems use JWTs to say who you are and what you can do. When an API call fails with 401 Unauthorized, decoding the token is usually the first debugging step. This decoder shows what’s inside, with dates you can read, without sending the token anywhere.

Decoding a token

  1. Paste the token, with or without the Bearer prefix copied from an Authorization header.
  2. Read the header and payload as formatted JSON; copy either one.
  3. Check the expiry notice: expired, or not expired yet, with the time in your time zone.
  4. Look at Dates in the payload for the issue time, not-before time and others.

If the token is malformed, you get a specific message: either it doesn’t have dot-separated parts, or a part isn’t valid Base64URL-encoded JSON, often because the token was cut off while copying.

The three parts

Part Contains Readable by anyone?
Header Token type and signing algorithm (alg), sometimes a key ID (kid) Yes
Payload Claims: who the token is for, who issued it, when it expires, permissions Yes
Signature Proof that header and payload weren’t changed Verifiable only with the key

Because the payload is readable, never put secrets in it: no passwords, no internal data you wouldn’t show the user.

The claims you’ll check most

Claim Meaning
exp Expires at (seconds since 1970). After this, the token must be rejected.
iat Issued at.
nbf Not valid before this time.
sub Subject, usually the user ID.
aud Audience: which API or app the token is for.
iss Issuer: who created the token.

Time claims are Unix timestamps in seconds. The decoder converts them for you; for other timestamps, use the Timestamp Converter.

Debugging “401 Unauthorized”

  1. Expired? Check the expiry notice. Expired tokens are the most common cause; the client should refresh them.
  2. Not yet valid? An nbf or iat in the future points to clock problems.
  3. Wrong audience or issuer? Compare aud and iss with what the API is configured to accept, such as a staging token sent to production.
  4. Clock skew: a server clock a few minutes off can make fresh tokens look expired or not yet valid. Servers usually allow a small leeway.
  5. Transport: confirm the header is Authorization: Bearer <token> with no extra quotes or line breaks.

Decoding is not verifying

Decoding reads the contents; it doesn’t prove the token is genuine. Anyone can create a token with any payload. Only checking the signature with the issuer’s secret or public key proves it’s authentic. That check belongs in your server code, using a maintained JWT library that:

  • accepts only the algorithms you expect, never none;
  • checks exp, nbf, aud and iss;
  • gets public keys from the issuer’s trusted key set.

The decoder shows the alg value from the header so you can see which algorithm the token claims to use.

Privacy

The token is decoded in your browser and never sent anywhere. Even so, a valid token lets anyone act as its user until it expires, so avoid sharing live tokens in screenshots, tickets or chats.

Who decodes JWTs

  • Backend and frontend developers debug login and API authorization.
  • QA engineers check which roles and permissions a test user’s token carries.
  • Security engineers review token contents and lifetimes.
  • Support engineers check whether a customer’s token has expired.

A complete example: a user can’t access an admin page

  1. Copy the user’s token from the request’s Authorization header in developer tools.
  2. Decode it and check the payload for a role or scope claim, such as "role": "editor".
  3. If the role is missing, the problem is in how the token was issued, not the page.
  4. Check exp too: an expired token gives a similar error.

Tips

  • Use test accounts’ tokens when sharing screenshots.
  • Never paste signing secrets into any website.

Checked against the current version of the JWT Decoder on .

Troubleshooting

It says the payload is not valid Base64URL JSON

Part of the token is missing or changed. Copy the whole token again, without surrounding quotes or line breaks (a “Bearer ” prefix is removed for you).

The token says it is expired but my app accepts it

Expiry is compared with your computer’s clock. Check the clock, and remember that servers often allow a small clock skew.

Frequently asked questions

Is it safe to paste a JWT into a decoder?

This decoder works entirely in your browser and sends nothing to a server. Treat tokens like passwords anyway - a valid token lets anyone act as its user until it expires - so prefer expired or test tokens when sharing screenshots or asking for help.

Does decoding verify the token?

No. Anyone can decode the header and payload, because they're only Base64URL-encoded. Verification checks the signature with the issuer's secret or public key, and it belongs in your server code using a maintained JWT library. Never paste secrets into a website.

My token isn't expired, so why do I still get 401?

Check that aud (audience) and iss (issuer) match what the API expects, that nbf (not before) isn't in the future, that the token is sent in the right header, and that the server's clock is correct. A token signed for a different environment also fails verification.

What does the alg value mean?

It's the algorithm used to sign the token, such as HS256 (a shared secret) or RS256 and ES256 (a private key, verified with a public key). Servers should only accept the algorithms they expect, and never "none".

Does this verify the signature?

No. Verification needs your secret or public key, which should never be pasted into a website.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.