How to Decode a JWT (JSON Web Token)

Laptop screen showing lines of computer code
Photo: β€œCoding Code” by Startup Stock Photos Β· CC0 1.0 Β· via Openverse (stocksnap)

Short answer

A JWT has three Base64URL parts separated by dots: header.payload.signature. Decoding the first two parts only reads claims β€” it does not prove the token is authentic. Use our JWT decoder to inspect header and payload and, when you have the shared secret, verify HS256/384/512 signatures offline in the browser.

JSON Web Tokens (JWTs) carry signed claims between systems. Developers decode them while debugging auth bugs, expiry issues and role claims. This guide explains the structure, safe decoding practice, and what verification actually means. It is educational β€” treat real production secrets carefully.

The three segments

Header describes the algorithm (for example HS256). Payload holds claims such as sub, iat, exp and custom fields. Signature is a MAC or public-key signature over the first two segments. All three are Base64URL-encoded and joined with periods.

Decode versus verify

Anyone can Base64URL-decode the payload. That is not authentication. Verification recomputes the signature with the correct key and compares. Our JWT decoder shows claims in readable form and can verify HMAC algorithms when you supply the secret locally β€” nothing is uploaded.

Worked walkthrough

  1. Copy a sample or staging token (never a live customer session token into a public chat).
  2. Paste it into the decoder and read alg, exp and custom claims.
  3. Convert exp with a Unix time tool if needed β€” see Unix timestamps.
  4. If the token should still be valid but APIs reject it, compare clocks, audience (aud) and issuer (iss).

Algorithms and pitfalls

Related: UUIDs, invalid JSON, and hashing with the hash generator.

More worked numbers

Change one input at a time so you build intuition. Write the rule, substitute values, then confirm with the free JWT decoder. If the tool disagrees with your hand result, check units, delimiters and time zones first.

Common mistakes to avoid

How to practise

Invent three mini-problems from your own work or study and solve them on paper before you open the tool. Teaching the steps to someone else locks in the method.

After you finish this guide, explore the linked tools above and the related articles. Calculators and translators here run privately in your browser with no sign-up.

Quick reference card

Keep the short answer box at the top as your cheat sheet. Last updated 17 October 2026. General information only β€” not professional security, medical or legal advice.

Checklist before you finish

Re-read the short answer box. Re-run one example in the linked tool. Skim the FAQ for the question you actually searched. If this topic is money or health related, treat the numbers as educational estimates and confirm with primary sources or a qualified professional before you act.

Articles on this site exist to answer the search question and then hand you a private browser tool so you can try your own numbers. No account is required. When you are done, the related guides below cover neighbouring skills that people usually learn next.

Frequently asked questions

Does decoding prove a JWT is valid?

No. Decoding only reads data. Cryptographic verification with the correct key proves integrity and authenticity for that algorithm. Double-check details and confirm with the linked tool on this page when numbers matter.

Is it safe to paste JWTs into online tools?

Avoid production tokens in third-party sites. Prefer an offline browser tool and redact secrets in screenshots. Double-check details and confirm with the linked tool on this page when numbers matter.

What does exp mean?

Expiry time as a Unix timestamp. APIs should reject tokens after exp. Double-check details and confirm with the linked tool on this page when numbers matter.

Can I edit a JWT payload and keep the same signature?

Not without the signing key. Changing claims invalidates the signature. Double-check details and confirm with the linked tool on this page when numbers matter.

Sources

More games

All games