JWT Decoder

Decode a JSON Web Token's header and payload, and check its expiry — instantly, in your browser. Signatures are never verified or uploaded.

  • Free — No signup required
  • Instant — Results update as you type
  • Private — Processed in your browser

A JSON Web Token (JWT) is three Base64URL-encoded segments joined by dots: a header describing the algorithm, a payload of claims, and a signature over the first two. The header and payload are not encrypted, only encoded, so anyone holding a token can read them. This tool does exactly that, and nothing more.

How it works

Paste a token. The tool splits it on the two dots, decodes each of the first two segments from Base64URL (the -/_ alphabet without padding, as RFC 7515 requires) into UTF-8, and parses the result as JSON. The header and payload are shown pretty-printed with copy buttons. The third segment is shown as-is, because it is raw signature bytes rather than JSON.

If the payload contains the standard time claims, they are rendered as local dates: iat (issued at), nbf (not valid before) and exp (expires at), all Unix timestamps in seconds. The badge at the top compares exp with your device's clock; a token is reported as expired when the current time is at or past that instant. No badge appears when there is no numeric exp claim.

Common failures: a token with a different number of segments (a JWE, which is encrypted, has five), a segment that is not valid Base64URL, or a segment that decodes to something other than JSON. Each case produces a specific message.

Decoding happens in your browser and the token is never transmitted. Even so, a token is a bearer credential: whoever has it can act as its subject until it expires. Prefer decoding tokens from a test environment, and never paste a signing secret or private key into any web page.

What "not verified" means

The signature proves the token was issued by whoever holds the signing key and has not been altered since. Checking it requires the key: the shared secret for HMAC algorithms such as HS256, or the issuer's public key for RS256, ES256 and the other asymmetric algorithms. This tool has neither, so it cannot tell you whether a token is genuine. A token that decodes cleanly and is not expired may still be forged, revoked, or issued for a different audience.

Verification belongs on the server, with the key fetched from the issuer's JWKS endpoint and the alg header checked against an allow-list. Accepting whatever algorithm the header names is the classic JWT vulnerability: an attacker sets alg to none or swaps an RSA token for an HMAC one signed with the public key.

Reading the claims

Beyond the time claims, look for iss (who issued it), sub (who it is about), aud (who should accept it) and jti (a unique ID for revocation). Access tokens from OAuth 2.0 servers usually add scope or roles; ID tokens from OpenID Connect add profile fields such as email and name, plus nonce. Custom claims are common, but every byte in the payload travels with every request, so lean tokens are better tokens.

Command-line equivalent

jq can decode the payload directly, once the segment is padded to a multiple of four characters:

TOKEN='eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjMiLCJleHAiOjE3MDAwMDAwMDB9.sig'
printf '%s' "$TOKEN" | cut -d. -f2 | tr '_-' '/+' | awk '{ while (length($0) % 4) $0 = $0 "="; print }' | base64 -d | jq .

Learn more

Securing REST APIs with JWT covers issuing, validating and rotating tokens, including the algorithm-confusion attack above. The tokens themselves come from the flows described in OAuth 2.0, and ID tokens specifically from OpenID Connect. The timestamp converter converts any claim value the decoder does not already render, and the hash generator shows the SHA-256 primitive that HS256 signatures are built on.

FAQ

Does this verify the JWT's signature?
No — this tool only decodes the header and payload, which requires no secret. Verifying a signature requires the issuer's signing secret or public key, which should never be pasted into any website.
Why does it say my token is expired?
The payload's exp claim is a Unix timestamp for when the token stops being valid. If the current time is past that, the token is expired regardless of whether the signature would otherwise verify.
Is my token uploaded anywhere?
No. Decoding happens entirely in your browser.