Skip to content

Token Basics

How to Decode a JWT Token Safely

A decoded token is readable data—not proof that the token was signed by a trusted issuer.

Last updated: October 24, 2026

To inspect a token, split its compact form at the periods, Base64URL-decode the header and payload, and parse those two segments as JSON. The MyJSONPal JWT Decoder does that locally in your browser and displays common registered claims. It doesnot verify the signature or establish that any claim is trustworthy.

The three JWT segments

A signed compact JWT has three Base64URL-encoded segments separated by periods:

BASE64URL(header).BASE64URL(payload).BASE64URL(signature)

The header commonly identifies the signing algorithm in alg and the token type in typ. The payload contains claims. The final segment is the signature (or a signature-related value in the compact form); it is not normally readable JSON. These segments are encoded, not encrypted. Anyone who has a signed JWT can usually decode its header and payload.

Base64URL is not ordinary encryption

JWT segments use Base64URL: the URL-safe alphabet substitutes - and _for Base64's + and /, and padding may be omitted. A decoder converts the segment back to bytes, reads the JSON text, and parses it. No secret key is needed to perform this decoding.

A fictional example

This made-up payload uses the reserved example.test domain and fake identifiers. It is sample data only; it is not a real credential and does not demonstrate a verified token.

{
  "iss": "https://identity.example.test",
  "sub": "user-123-demo",
  "aud": "inventory-api-demo",
  "iat": 1700000000,
  "exp": 1700003600
}

In this example the issuer says it issued the token for a demo user, for a particular audience, during a one-hour window. Those statements are just decoded JSON until a relying application verifies the signature and applies its own checks.

Common registered claims

  • iss — the issuer identifier.
  • sub — the subject the token refers to, often a user or service identifier.
  • aud — the intended recipient or recipients; it may be a string or an array.
  • exp — the time after which the token must not be accepted, represented as a NumericDate (seconds since the Unix epoch).
  • iat — the time the token was issued, also a NumericDate.

A decoder can display timestamps for claims such as exp and iat, but displaying an expiration time does not itself enforce expiration. Applications may also check claims such as nbf, issuer, audience, and permitted clock skew according to their policy.

Decoding does not verify a JWT

A token can have well-formed JSON and an expired date while still having a forged signature. Conversely, decoding successfully says nothing about whether the issuer is trusted or whether the claims grant access. The MyJSONPal decoder reads the header and payload and exposes the encoded signature segment; it does not perform cryptographic verification.

Verification requires the appropriate algorithm and trusted key, plus validation rules for the expected issuer, audience, time claims, and application context. Use a maintained JWT library and an explicit algorithm allowlist; select keys through a trusted configuration or issuer process, not untrusted token claims alone. Authorization decisions must use the verified result and the application's access-control rules.

Handle live tokens carefully

A production bearer token can grant access to its holder. Do not paste live production tokens, passwords, signing keys, or other secrets into tools you do not trust. MyJSONPal's decoder processes the token locally in your browser, but use a trusted environment and non-sensitive sample tokens whenever possible. If a token is exposed, follow your issuer's process to revoke or rotate it.

For a non-sensitive sample, open the JWT Decoder, paste the compact token, and select Decode token. Inspect the header, payload, displayed registered claims, and signature segment—but do not treat those values as authenticated.