U.UtilityApp
⚙️ DevFree · No signup

JWT Decoder

Decode a JSON Web Token to inspect its header and payload claims. Decoding happens locally — your token never leaves the page.

Decoding is not verification

This tool reads a token. It does not check it. The signature, the third part after the second dot, is ignored completely. To show this, take the sample token, replace its signature with AAAA, and decode it again: the header and payload come out exactly the same. Delete the signature entirely and you still get the same output.

Anyone can build a token with any claims they like, such as "role": "admin", and it will decode here without complaint. Only a server holding the right key can tell a genuine token from a forged one. Use this page to see what a token says, never to decide whether to trust it.

What you see after pasting a token

The tool splits the token at the dots, decodes the first two parts from base64url, and pretty-prints them as JSON under // HEADER and // PAYLOAD. The built-in sample decodes to:

// HEADER { "alg": "HS256", "typ": "JWT" } // PAYLOAD { "sub": "1234567890", "name": "Ada Lovelace", "iat": 1516239022 }

Non-English text in claims, such as accented names or emoji, decodes correctly. Spaces and line breaks around the token are trimmed.

  • "at least two dot-separated parts": you pasted only part of the token, or something that isn't a JWT.
  • "Could not decode token": usually a leftover Bearer prefix from an Authorization header. Delete it and paste only the token.
  • Unreadable characters instead of JSON: the text has dots in it but isn't base64url-encoded JSON, or it's an encrypted token (see the FAQ).

Debugging a token your API rejects

When a request fails with 401 or 403, decode the token and work through the payload:

  1. Expiry. Copy the exp number into a Unix timestamp converter. It is in seconds. If it's in the past, the client needs to refresh the token.
  2. Audience and issuer. Compare aud and iss with the values your API is configured to expect. A token issued by a staging environment can fail against production for this reason.
  3. Algorithm and key ID. Check that alg and kid in the header match what the server accepts. A rotated signing key shows up as an unfamiliar kid.
  4. Permissions. Look for the scope or role claim your endpoint checks, and its exact spelling and case.

If everything looks right, the problem is probably the signature or the clock, which only the server's own logs can confirm.

Handle real tokens like passwords

Decoding runs in your browser and nothing is uploaded. Even so, a live access token works for anyone who holds it until it expires. Don't paste one into tickets, chat threads or screenshots. For debugging, use an expired token or one from a test account.

Remember that the payload is only encoded, not hidden. Whatever you can read here, anyone who intercepts the token can read too, so email addresses and internal IDs in claims are visible to them.

Frequently asked questions

Does the decoder tell me whether a token has expired?+

No. It shows exp, iat and nbf as raw numbers. Convert them with a Unix timestamp tool and compare with the current time.

Why does a token with five parts decode to gibberish?+

A five-part token is encrypted (JWE). Its header is readable, but the content is ciphertext and can only be read with the decryption key.

Can I edit the payload and re-encode the token?+

Not with this tool, and it wouldn't help: changing any claim invalidates the signature, so a correctly configured server rejects the edited token.

Does it work with tokens from any identity provider?+

Yes, as long as the token is a standard signed JWT. The decoding is the same whoever issued it; only the claims inside differ.

Guides & deep dives

Embed this tool on your website

Free to use on blogs, school sites and intranets. Paste this code into your page's HTML; please keep the credit line.

<iframe src="https://utilityapp.lat/embed/dev/jwt-decoder" title="JWT Decoder" width="100%" height="600" style="border:0;max-width:760px" loading="lazy"></iframe>
<p style="font-size:13px"><a href="https://utilityapp.lat/dev/jwt-decoder">JWT Decoder</a> by UtilityApp</p>