Jwt Decoder

Remove Ads
Remove Ads

Result

Header
Payload

Note: this decodes the token only. It does not verify the signature, which requires the secret key.

Remove Ads

Share on Social Media:

JWT Decoder — Inspect JSON Web Tokens Instantly and Privately

Every modern API debugging session eventually reaches the same question: what is actually inside this token? This free JWT decoder splits any JSON Web Token into its header, payload, and signature, pretty-prints the JSON, converts Unix timestamps to readable dates, and flags expired tokens — all locally in your browser. The token never touches a server, which matters when you're holding real credentials.

Anatomy of a JWT

A JWT is three Base64Url segments joined by dots: xxxxx.yyyyy.zzzzz

  • Header — typically {"alg":"HS256","typ":"JWT"}: the signing algorithm and token type.
  • Payload — the claims: who the token is for, who issued it, and when it expires.
  • Signature — a cryptographic MAC or signature over header.payload that verifiers check against their key.

Because the first two segments are plain Base64Url, anyone can read them without any key. The signature prevents tampering, not reading — a distinction that trips up even experienced developers. Sensitive data belongs in the database, referenced by ID, never in the payload itself.

Standard Claims Cheat Sheet

ClaimMeaningFormat
issIssuer — who created the tokenstring/URL
subSubject — usually the user IDstring
audAudience — intended recipientstring/array
expExpiration timeUnix seconds
iatIssued atUnix seconds
nbfNot valid beforeUnix seconds
jtiUnique token ID (revocation support)string

Debugging Common JWT Failures

401 with a "valid-looking" token: decode it and check exp first — expired tokens are the #1 cause. Second most common: the aud claim doesn't match what the API expects.

Signature verification failed: confirm the alg in the header matches what the server verifies with. A server expecting RS256 will reject HS256 tokens — and should, since alg-confusion attacks exploit servers that accept whatever algorithm the token declares.

Clock skew: if tokens fail immediately after issuance, the verifier's clock may be behind the issuer's. Most libraries accept a leeway parameter of 30–60 seconds.

Security Notes Worth Remembering

  • Keep access tokens short-lived (5–15 minutes) and pair them with refresh tokens.
  • Never accept "alg":"none" in production verifiers.
  • Store tokens in httpOnly cookies where possible — localStorage is readable by any injected script.
  • This tool decodes but deliberately does not verify signatures, because verification requires your secret key — which should never be pasted into any website.

Free and In-Browser

No signup, no rate limits, no network calls with your token. Decode as many JWTs as you need during development and API debugging.