How to Decode a JWT: Reading Header, Payload and Signature
Decode any JWT by hand or with a browser tool: how the three parts are encoded, which claims matter (sub, exp, iss, aud) and why decoding is not verification.
A JSON Web Token looks like three random strings glued with dots, but each part is just encoded data. Learning to read it takes two minutes and pays off in every auth debugging session.
The anatomy of the three parts
Split the token on dots: header.payload.signature. Header and payload are JSON objects encoded with URL-safe Base64 — not encrypted. The signature is raw bytes produced by HMAC or an RSA/ECDSA operation over the first two parts.
You can decode the first two parts by hand: add padding, swap - for + and _ for /, then Base64-decode. Or simply paste the token into the JWT Decoder, which formats the JSON and flags standard claims.
Claims worth reading first
exp— expiry time as a Unix timestamp. Convert it with the Timestamp Converter when a session dies mysteriously.issandaud— who issued the token and who it is for. Mismatches cause most unexpected 401 responses.sub— the user or system subject the token authorizes.
Decoding is not verification
Anyone can decode a JWT — that is its design. Verification means recomputing the signature with the signing key and comparing it; a decoded token proves nothing. Never make authorization decisions from payload content alone.
Common debugging scenarios
- Expired-token errors: check
expagainst your server clock, not your laptop clock. - Garbled signature: normal — it is binary data, not text.
- Wrong audience: compare
audwith the value your API actually verifies.
The JWT Decoder shows the header, the formatted payload and claim-by-claim explanations entirely offline, so even production-shaped tokens are safe to inspect.
Related guides
Base64 vs Hex Encoding: When to Use Each (Developer Guide)
Base64 vs hex encoding compared: size overhead, readability, common use cases in JWTs, data URLs and git diffs — with a quick decision table for engineers.
Read guide →2026-10-10UTF-8 Explained: Why One Chinese Character Counts as 3 Bytes
How UTF-8 encodes ASCII, Latin accents, CJK and emoji: byte lengths per code point, why string length disagrees across systems and how to inspect any character.
Read guide →2026-10-05SHA-256 for Developers: Checksums, HMAC and What Hashing Cannot Do
When to use SHA-256 (and when not to), how HMAC adds a secret, why password hashing needs bcrypt or Argon2 instead, and how to verify checksums quickly.
Read guide →Try these tools
JWT Decoder
Decode a JWT header and payload into readable JSON with formatted dates for exp/iat/nbf, signature state and expiry status. Safe: verification never happens in the browser.
Open tool →Base64 Encoder / Decoder
Encode text to Base64 or decode it back in one click, plus image ⇄ Base64 data-URL conversion with drag & drop. Free, instant and 100% browser-based — nothing is uploaded.
Open tool →SHA-256 Generator
Compute the SHA-256 digest of any text instantly — with SHA-1, SHA-384 and SHA-512 alongside. Uses WebCrypto when available, with a pure-JS fallback. Includes HMAC demo mode.
Open tool →