03 / API & Auth / jwt-decoder

JWT Decoder

Decode JWT header, payload and claims in your browser.

ReadyLocal processing
03 · Workspace

How to use

  1. 01Paste a JSON Web Token into the JSON Web Token box. A value that starts with "Bearer " is accepted too; the prefix is stripped before decoding.
  2. 02The header and payload decode instantly as you type and are shown as formatted JSON.
  3. 03Review the Registered claims panel, which lists iss, sub, aud, exp, iat, nbf and jti when present, with exp, iat and nbf converted to readable dates.
  4. 04If the payload has a numeric exp claim, read the note above the header to see whether the token has expired, and when.
  5. 05Use Copy payload or Copy header to grab the decoded JSON, or Clear to start over.

What is this tool?

A JWT decoder splits a JSON Web Token into its header, payload and signature, Base64URL-decodes the first two sections and shows them as readable JSON. It labels the standard registered claims, converts Unix timestamps into local and UTC dates, and tells you whether the exp claim is in the past. Decoding does not verify the signature: it only reveals what the token claims, and the signature is shown as its raw encoded string. All decoding runs locally in your browser and the token is never uploaded.

JWT structure: header, payload and signature

A signed JWT is three Base64URL-encoded sections joined by periods: header.payload.signature. Base64URL is ordinary Base64 with + replaced by -, / replaced by _, and the trailing = padding removed, so the token is safe to put in URLs and HTTP headers. The first section, eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9, decodes to {"alg":"HS256","typ":"JWT"}, which is why almost every JWT starts with eyJ: it is the encoding of {".

The header names the signing algorithm (alg) and sometimes a key ID (kid). The payload is a JSON object of claims about the user or client. The signature is binary output from the algorithm, so the decoder displays it as-is rather than as JSON.

If decoding fails, the error tells you which step broke: the input does not have exactly three non-empty sections, a section is not valid Base64URL, or the decoded text is not valid JSON. Encrypted tokens (JWE) have five sections and cannot be read without the decryption key, so they are rejected.

Standard JWT claims (exp, iat, nbf, sub, aud)

RFC 7519 defines a small set of registered claims, and the decoder pulls them into their own panel: iss (issuer, who created the token), sub (subject, usually the user ID), aud (audience, the API the token is meant for), exp (expiration time), iat (issued at), nbf (not before) and jti (a unique token ID). Custom claims such as role, scope or email stay in the full payload view.

exp, iat and nbf are NumericDate values: seconds since the Unix epoch, not milliseconds. The decoder renders each one in your local time and as an ISO 8601 UTC string, so exp: 1735689600 shows as 2025-01-01T00:00:00.000Z. When exp is a number, a note states whether the token has expired, compared against your device clock. nbf is displayed but not evaluated, and a token whose exp is stored as a string gets no expiry note.

Why decoding a JWT is not the same as verifying it

Anyone can decode a JWT, because the header and payload are only encoded, not encrypted. Verification is a separate step that your server performs: it recomputes the signature with the shared secret (HS256) or the issuer's public key (RS256, ES256), then checks exp, nbf, iss and aud. This tool does none of that. A token with a forged payload decodes exactly as cleanly as a genuine one, so never treat decoded claims as trusted.

That also means you should never put secrets in a JWT payload, and you should treat any live token as a password: whoever holds it can call the API until it expires. Decoding here happens entirely in the page with the browser's own Base64 and JSON functions, and nothing is sent to a server, but for production tokens with long lifetimes it is still good practice to decode an expired or test token instead.

Common use cases

  • Inspecting claims while debugging a 401 or 403 from an API
  • Checking whether an access token has expired
  • Confirming which algorithm (alg) and key ID (kid) an identity provider used
  • Understanding scopes and roles embedded in a token
  • Checking that the aud and iss claims match what your API expects

FAQ

Does this JWT decoder verify the signature?

No. It decodes the header and payload and shows the signature as an encoded string, but it does not check it against any secret or public key.

Is it safe to paste a JWT into an online decoder?

This decoder runs entirely in your browser and never uploads the token. Even so, a live token grants access until it expires, so prefer test or expired tokens when you can.

How do I check if a JWT is expired?

Paste the token and read the note above the header: when the payload has a numeric exp claim, it says whether the token has expired and shows the expiry date in local time and UTC.

Why does decoding fail?

A signed JWT must have three non-empty Base64URL sections separated by periods, and the first two must decode to JSON. Stray whitespace inside the token, a truncated copy or a five-part encrypted JWE will fail.

Can anyone read my JWT?

Yes. The payload is Base64URL-encoded, not encrypted, so anyone who has the token can read its claims. Never store passwords or other secrets in it.

Are exp and iat in seconds or milliseconds?

Seconds. JWT time claims are Unix timestamps in seconds, and the decoder interprets them that way when converting them to dates.

Can I paste the whole Authorization header?

You can paste a value starting with "Bearer " and the prefix is removed. Leave out the "Authorization:" header name itself.