Encoding

JWT Decoder

Decode a JSON Web Token to inspect its header and payload in your browser. No signature verification, no upload — the token never leaves your device.

LogShare JWT Decoder Runs in your browser · nothing is uploaded

Loading tool…

About the JWT Decoder

Paste a JWT to see its decoded header and payload as formatted JSON, plus the standard claims (exp, iat, sub) translated into readable timestamps. This is a decoder, not a verifier — it does not check the signature.

How to use the JWT Decoder

  1. Paste a JWT (three dot-separated Base64url segments).
  2. The header and payload are decoded and pretty-printed automatically.
  3. Expiry and issued-at claims are shown as human-readable dates.
  4. Copy either segment individually.

Step-by-step walkthrough with examples and the errors people hit: How to Decode a JWT and Check Expiry.

Example

Example token

eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkFkYSJ9.sig
{ "alg": "HS256" }
{ "sub": "1234567890", "name": "Ada" }

Common errors and how to fix them

A segment is not valid Base64url JSON

The token was truncated or altered, often by a copy that dropped characters or added a newline. Copy it again from the source.

The token is not expired but is still rejected

Check aud and iss match what the server expects, that nbf is not in the future, and that clocks agree; a few seconds of skew can matter.

More problems and fixes in the tutorial

The anatomy of a JSON Web Token

A JWT is three Base64url-encoded segments separated by dots. The header names the signing algorithm and token type; the payload carries the claims; the signature is a MAC or digital signature over the first two parts. Because the first two parts are only encoded, not encrypted, anyone holding a token can read them, and this decoder shows both pretty-printed, with the timestamps translated into dates.

The standard claims, decoded

iss is the issuer, aud the intended audience, sub the subject (usually the user id). exp is the expiry, nbf the not-before time and iat the time of issue, all as Unix timestamps in seconds. jti is a unique token id used for revocation lists. Everything else is application-specific: roles, scopes, tenant ids, email. When a request is rejected with 401, comparing these values with what the server expects is the fastest diagnosis.

Why a token is rejected: expiry and clock skew

Most JWT failures are time. The decoder marks the token Expired when exp is in the past and shows the remaining lifetime otherwise. Tokens are also refused when nbf is in the future, and when the client's and server's clocks disagree by more than the server's tolerance (often 30 to 60 seconds). If a freshly issued token is rejected, check the machine clock before the code.

Decoding is not verifying

Reading a token proves nothing about who created it. Verification recomputes the signature with the secret (HS256) or checks it with the issuer's public key (RS256, ES256), and only the server should do that. This page intentionally does not accept secrets or keys: paste a token, read it, and leave verification to your backend or identity provider.

Security notes

Decoding happens in your browser; the token is never sent anywhere. Even so, production tokens are credentials. Decode them on a page you trust, avoid pasting them into chat, and prefer short-lived tokens with refresh flows so a leaked one is worthless quickly. Be suspicious of alg: none and of tokens whose header algorithm differs from what your server expects.

FAQ

Does this verify the signature?

No. It only decodes the header and payload, which are Base64url — not encrypted — by design. Signature verification requires the secret or public key and isn’t done here.

Is my token sent anywhere?

No, decoding happens entirely in your browser. That said, treat tokens from production systems as sensitive and avoid pasting them into any tool you don’t trust.

What if the token looks invalid?

A JWT must have exactly three segments separated by dots. If a segment isn’t valid Base64url JSON, decoding fails and the tool tells you which part.

How do I check whether a JWT has expired?

Paste it here. The exp claim is converted to a date and the token is labelled Expired or Expires, with the remaining time. In code, compare exp × 1000 with Date.now() in JavaScript.

Can this tool verify the signature?

No, deliberately. Verification needs the secret or public key, which should never be pasted into a web page. Use your server-side library or the identity provider's introspection endpoint.

What do HS256, RS256 and ES256 mean?

They are signing algorithms: HMAC with SHA-256 (a shared secret), RSA with SHA-256 and ECDSA with the P-256 curve (public/private key pairs). The header's alg field says which one the issuer used.

Why does the payload show timestamps like 1700000000?

They are Unix timestamps in seconds. The decoder translates exp, iat and nbf into readable dates; for other numeric claims, use the Unix Timestamp Converter.