Skip to content

JWT decoder: read the header and payload of a JSON Web Token

A JSON Web Token (JWT) is three Base64url-encoded parts separated by dots: a header describing the algorithm, a payload of claims such as sub, iat and exp, and a signature. Because the first two parts are only encoded, not encrypted, anyone can decode them to read the claims. This decoder shows the header and payload as formatted JSON and translates timestamp claims into readable dates. It does not verify the signature, so a token that decodes correctly has not been proven authentic.

C8JWT decoder — TabbyTools
Ready0 B sent to server

Your files never leave your device. Processing happens in your browser. How that works.

How it works

  1. Paste the token.
  2. Read the decoded header and payload; exp, iat and nbf are shown as dates with a countdown.
  3. Copy either part as JSON.

Runs as JavaScript inside this tab. Turn off your connection after the page loads and it still works.

JWT structure and claims

Anatomy

A JSON Web Token (RFC 7519) is three Base64url strings joined by dots:

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 . eyJzdWIiOiIxMjM0IiwiZXhwIjoxNzAwMDAwMDAwfQ . SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
        header                                   payload                                  signature
  • Header names the algorithm (alg), type (typ) and often the key id (kid).
  • Payload carries claims: statements about the subject and the token itself.
  • Signature is computed over header.payload with the algorithm and key. Changing one character of the payload invalidates it.

Base64url is Base64 with - and _ instead of + and /, and no padding, so a token is safe in URLs and headers. It is encoding, not encryption: anyone can read the header and payload.

Registered claims

Claim Meaning Type
iss Issuer string or URL
sub Subject (usually the user id) string
aud Audience (the API the token is for) string or array
exp Expiration time Unix seconds
nbf Not valid before Unix seconds
iat Issued at Unix seconds
jti Unique token id string

Common public claims from OpenID Connect: name, email, email_verified, picture, nonce, auth_time, azp, sid. Providers add their own: scope/scp, roles, groups, tid (Azure tenant), cognito:groups (AWS).

Algorithms

alg Family Key
HS256 / HS384 / HS512 HMAC Shared secret: whoever can verify can also forge
RS256 / RS384 / RS512 RSA PKCS#1 v1.5 Private key signs, public key verifies
PS256 / PS384 / PS512 RSA-PSS Same, newer padding
ES256 / ES384 / ES512 ECDSA Smaller keys and signatures
EdDSA Ed25519 / Ed448 Fast, modern
none unsigned Must be rejected by verifiers

Verifying, which this tool does not do

  1. Reject alg: none and any algorithm you did not expect (never let the token choose).
  2. Fetch the issuer’s public keys (usually from /.well-known/jwks.json) and pick the one matching kid.
  3. Verify the signature over the exact header and payload bytes.
  4. Check exp, nbf (allow a minute of clock skew), iss and aud.
  5. Only then trust the claims.

Use a maintained library (jose in JavaScript, PyJWT, jsonwebtoken, Microsoft.IdentityModel), server-side, with the key kept out of the browser.

Access token vs ID token

An ID token (OpenID Connect) describes the user and is meant for the client app. An access token authorises API calls and is meant for the API; it may or may not be a JWT. Refresh tokens are usually opaque and should never be decoded or exposed.

Worked examples

The example token (click Example token) decodes to:

Header

{ "alg": "HS256", "typ": "JWT", "kid": "demo-key" }

Payload

{
  "iss": "https://tabbytools.com",
  "sub": "user_42",
  "aud": "tabbytools-api",
  "iat": 1757505600,
  "nbf": 1757505600,
  "exp": 2073038400,
  "name": "Ada Lovelace",
  "email": "ada@example.com",
  "roles": ["admin", "editor"],
  "scope": "read write"
}

The claims table translates iat to 2025-09-10 12:00 UTC and exp to a date in 2035, so the token is valid for ten years, which is far too long for a real access token (minutes to an hour is normal).

An expired token shows a yellow warning with how long ago exp passed. The decoder still shows the payload; expiry is a policy check, not a decoding failure.

Bearer eyJ… copied from an Authorization header decodes normally; the Bearer prefix is stripped.

Five parts means a JWE (encrypted JWT). Its payload cannot be read without the recipient’s key.

Frequently asked questions

Does this tool verify the JWT signature?

No. It only decodes the header and payload. Verifying requires the issuer’s secret or public key and should be done server-side with a maintained library.

Is it safe to paste a token here?

The token is decoded in your browser and is not sent anywhere, and it is not put in the URL. Still, treat access tokens as secrets and avoid pasting production tokens into any website you do not control.

What do iat, exp and nbf mean?

Issued at, expiry and not-before, all as Unix timestamps in seconds. A token is valid between nbf (or iat) and exp.

Why does my token fail to decode?

It may be a JWE (encrypted) token, which has five parts, or it may be truncated or include the “Bearer ” prefix, which should be removed.

JWT decoder · last updated · changelog · part of Canned Tuna