Home / Articles / How to Decode a JWT Token

How to Decode a JWT Token

Published:

A readable JWT is useful evidence when debugging a login failure, but it is not proof that a request is authorized. Start with a synthetic token, identify the claim you need to inspect, and keep decoding separate from your application’s authentication decision.

Understand the three parts

A common signed JWT uses three dot-separated segments: a Base64URL header, a Base64URL payload and a signature. The header describes the signing algorithm; the payload carries claims. The payload is readable without the signing key. Encrypted JWTs use a different representation and are outside this decoder’s scope. See RFC 7519 for the format and claim definitions.

Try a deliberately untrusted example

Paste this fixture into the JWT decoder and select Decode JWT. Its last segment is a placeholder, not a valid signature. It cannot authenticate a user.

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkZW1vLXVzZXIiLCJleHAiOjE3OTU4MjQwMDB9.c3ludGhldGlj

The decoded payload should be:

{"sub":"demo-user","exp":1795824000}

The sub value identifies this example’s subject. The exp value is Unix time in seconds: 2026-11-28 at 00:00:00 UTC. The fixture is already expired on its publication date. Expiration does not prevent inspection. Use the timestamp converter with Unix seconds to check the conversion independently.

Work through an authentication failure

  1. Check that you copied the token itself, without the HTTP header’s Bearer prefix or surrounding quotes.
  2. Inspect exp and, when present, nbf against the server’s clock. iat records issuance; it is not an expiration deadline.
  3. Compare the expected issuer and audience with iss and aud, when your token profile requires them.
  4. Check your application’s verifier and issuer configuration if the claims look plausible but authentication still fails.

Verify before trusting any claim

The browser tool does not verify signatures, fetch signing keys or enforce an authorization policy. Your application needs a maintained JWT library, an explicit set of allowed algorithms, trusted verification keys and the claim checks required by its token profile. Do not choose a verification algorithm solely because an untrusted header requested it. RFC 8725 explains these verification requirements.

FATOPS processes this input locally. Even so, live bearer tokens belong in your controlled debugging workflow: use a fixture for screenshots and issue reports, and never paste a production token into a shared chat. A successful decode means only that the encoded data could be read.

Tools used in this guide

Related technical guides