Toolcin

Decode a JWT

A JWT is three base64url segments separated by dots: header, payload and signature. Decoding reads the first two and proves nothing about authenticity — only the issuer's key can verify the signature.

A JSON Web Token looks like three random strings joined by dots:

eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjMifQ.dBjftJeZ4CVPmB92K27uhbUJU1p1r_wW1gFWFOEjXk

It is not encrypted. It is encoded. That distinction is the source of most JWT mistakes.

The three parts

The first two segments are base64url, a URL-safe variant of base64 with + and / replaced and padding dropped. Decoding them is a text transformation, not a cryptographic operation.

What decoding does not tell you

It does not tell you the token is genuine. Anyone can write a payload claiming to be an administrator and encode it. The signature is what a server checks; without the key, nobody can forge it.

This is why "the JWT says role: admin" is not authorisation. A server that reads the payload without verifying the signature is trusting whatever the client sent — a well-known class of bug.

Decoding safely

  1. Use a local decoder. Pasting a production token into a website hands that site a working credential. Tokens are bearer credentials: whoever holds one can act as the user until it expires.
  2. Check the timestamps. exp, iat and nbf are Unix seconds, not milliseconds. A token that "expired in 1970" is usually a millisecond timestamp divided by the wrong figure.
  3. Read the algorithm. If a token claims alg: none, something is wrong upstream. Rejecting that is table stakes for a verifier.

Reading the claims that matter

ClaimMeaningCommon mistake
expExpiry, in secondsComparing to a local time instead of UTC
audIntended audienceNot checking it, so a token for service A is accepted by service B
issIssuerNot checking it, so any issuer's token is accepted
subSubject, usually a user idTreating it as a role or permission

The one-line rule

Decode to understand a token. Verify to trust it. The two are different operations, and only the second one uses a key.

Questions

Is a JWT encrypted?

No. JWS tokens are signed and readable by anyone. Only JWE tokens are encrypted, and they are far less common. Treat any JWT payload as public data.

Can someone change the payload and still pass verification?

Not without the signing key. Changing one character of the payload invalidates the signature, which is the entire point of signing.

Why is my token three dots but four parts?

Some tokens include a trailing dot or use a five-part JWE structure. Standard JWS tokens have exactly three parts.

Is it safe to paste a token into this tool?

The decoding happens in the browser, so nothing is transmitted. Even so, treat real tokens as passwords: a screenshot of one is a credential leak.

Updated 2026-11-16 · written for this site, no trackers, no account.