Security & Privacy

JWT decoder: read header and payload safely (and know what is not verified)

Decode a JWT to inspect claims, expiration, issuer, and audience. Learn what decoding proves, common errors, and privacy-safe token checks.

Feb 14, 20263 min readBy Mateo Díaz
jwtsecuritydebugging
TLDR
  • A JWT has header, payload, and signature parts separated by dots.
  • Decoding a JWT reveals claims but does not prove the token is valid or trustworthy.
  • Treat JWTs like credentials and avoid pasting sensitive production tokens into shared machines.

Use it now

JWT Decoder

Open tool
Glass three-part token split into segments with decoded JSON-style cards on a deep blue gradient

JWTs show up everywhere: login sessions, API calls, SSO, and service-to-service auth.

When something breaks, the fastest way to debug is usually to decode the token and look at the claims.

Start here:

  • Open the JWT Decoder.
  • Paste the token.
  • Read the decoded header and payload.

Textavia decodes JWTs in your browser. Your token is not uploaded.

What decoding a JWT does (and what it does not)

A JWT has three base64url-encoded parts:

header.payload.signature

Decoding a JWT means:

  • turning header and payload into readable JSON

Decoding does not mean:

  • verifying the signature
  • proving the token is authentic
  • proving the token is not expired

A token can be decoded even if it was tampered with.

If you are debugging an auth system, decoding is step one. Verification is step two.

Quick start: decode a JWT and spot the problem

  1. Open the JWT Decoder.
  2. Paste the token.
  3. Look for these fields:
    • exp (expiration)
    • nbf (not before)
    • iss (issuer)
    • aud (audience)
    • sub (subject / user id)
  4. If exp looks wrong, convert it with the Unix Timestamp Converter.

Common JWT claims (what you are usually looking for)

ClaimMeaningWhy it breaks
expexpiration timeclock skew; wrong unit; token is old
nbfnot valid beforeclient clock is behind
isswho issued itwrong environment (dev vs prod)
audintended audiencewrong API/resource id
scope / rolespermissionsmissing role; wrong scope string

Examples

Example 1 (beginner): check if a token is expired

If the payload contains exp, it is usually a Unix timestamp.

If the token is expired, that is the bug.

Example 2 (professional): debug an "invalid audience" error

If your API expects aud: "api://billing" but you see aud: "api://core", you are using a token minted for a different service.

Fix the client configuration or token issuer settings.

Example 3 (professional): confirm signing algorithm

Look at the header:

  • alg tells you the signing algorithm

If you expected RS256 but see HS256, your systems might be using different keys or libraries.

Common JWT decoder errors

"Invalid JWT format"

A JWT must have exactly 3 parts separated by dots.

If you only have 2 parts:

  • you might be looking at a JWS variant or a truncated token
  • or the token was copied incorrectly

"Invalid Base64 encoding"

JWTs use base64url encoding.

If the token was URL-encoded inside a query string, decode it first with the URL encoder/decoder.

"Malformed JSON"

If decoding succeeds but JSON parsing fails, the token is corrupted or not a JWT.

Common mistakes that cause security bugs

  • Treating decoded claims as trusted without verifying the signature
  • Putting sensitive data in the payload (anyone who has the token can decode it)
  • Using long-lived tokens without rotation or revocation

If you need to see the contents for debugging, decode it. If you need to trust it, verify it.

If you only do 3 things

  • Decode to inspect claims.
  • Verify signature before trusting anything.
  • Convert exp/nbf timestamps to human time.

Sources and further reading

  • RFC 7519: JSON Web Token (JWT)
  • RFC 7515: JSON Web Signature (JWS)

Privacy and security

Textavia's JWT decoder runs locally in your browser. Your token is not uploaded to a server.

Still: treat JWTs like credentials. Avoid decoding tokens on shared computers.

Written by

Mateo Díaz

Builds, tests, and documents Textavia's tools, drawing on degrees in computer science and mathematics and a habit of explaining things plainly.

View author profile

Related tools

Related guides