JWT Decoder: Read the Header, Claims and Expiry

Paste a JSON Web Token to see its header, its payload claims and when it expires. The tool decodes the token. It does not check the signature, so a decoded token is not a trusted token.

Runs in your browser: your files and text are not uploaded. Free, no account needed.

Last updated: · Reviewed by the QuickTooly Team

What the three colored parts are

A JWT is three Base64URL strings joined by dots (RFC 7519). The tool splits the token on the dots, adds back the padding, and parses the first two parts as JSON.

  • Header (red): the signing algorithm in alg (for example HS256, RS256 or ES256) and usually typ: "JWT". A kid value names the key the issuer used.
  • Payload (purple): the claims. Anyone who has the token can read them, so a payload should never hold passwords or other secrets.
  • Signature (orange): shown as the raw Base64URL string. Only a server with the secret (HMAC) or the public key (RSA, ECDSA) can check it.

Reading the standard claims

The tool labels the seven registered claims when they are present: iss (issuer), sub (subject, often a user ID), aud (audience), exp (expiry), nbf (not before), iat (issued at) and jti (token ID). Any other key, such as role or scope, is a custom claim and only appears in the JSON view.

exp, nbf and iat are Unix timestamps in seconds. The tool shows each one in your local time zone next to the raw number. For example, 1516239022 is 18 January 2018, 01:30:22 UTC.

What "Time claims OK" does and does not mean

The green or red badge compares exp and nbf with your computer's clock. "Time claims OK" means the expiry time has not passed and the not-before time has been reached. It does not mean the signature is correct or that the server will accept the token. A forged token with valid times gets the same green badge. If the payload has neither exp nor nbf, no badge is shown.

Your server must verify the signature with a JWT library, pin the algorithms it accepts (never alg: none), and check exp, nbf, iss and aud.

The token you paste is kept in this tab's session storage so it survives a page reload. Use Clear All to remove it, and avoid pasting live production tokens on a shared computer.

Frequently Asked Questions

Why do I get "JWT must have exactly 3 parts"?

The tool only accepts signed tokens (JWS) in compact form: header.payload.signature. An encrypted token (JWE) has five parts and its payload cannot be read without the decryption key. The error also appears if part of the token was cut off when you copied it.

Why does it say "Invalid base64 encoding"?

One of the first two parts is not valid Base64URL, or it decodes to something that is not JSON. A common cause is pasting the whole Authorization header: remove the "Bearer " prefix and any line breaks.

Are accented letters in claims shown correctly?

Yes. The decoder turns the Base64URL text into bytes and decodes them as UTF-8, which is the encoding JWTs use, so names such as José show as written.

The badge says the time claims are OK, but my API returns 401. Why?

The badge only checks the exp and nbf times. The API may reject the signature, the audience, the issuer or a revoked token. A clock that is wrong by a few minutes can also cause the difference.

Related Tools

  • JWT Builder - sign a test token with HS256, HS384 or HS512 and paste it back here to inspect it.
  • HMAC Generator - compute an HMAC-SHA256 by hand when you need to see how an HS256 signature is formed.
  • JSON Compare - diff the payloads of two tokens to see which claims changed.