How-to guide

How to Decode a JWT Online: Header, Payload, Expiry

Updated 2026-12-041130+ wordsFree tools · no signup

To decode a JWT online, paste the token into a decoder and read the two JSON objects it returns: the header (algorithm and type) and the payload (claims such as who the token is for and when it expires). A JWT (JSON Web Token, RFC 7519) is three base64url-encoded parts joined by dots — header.payload.signature — and decoding needs no key: anyone holding the token can read it. Hellagape's JWT Decoder does this in your browser and converts the iat/exp timestamps to readable dates. Decoding is not verification: only the signature proves the token is genuine.

How to decode a JWT in the hellagape decoder

  1. Open the JWT Decoder. You will see a JWT Token textbox (pre-filled with an example token) and a Copy result button.
  2. Paste your token over the example. Copy only the token itself — if you took it from an Authorization: Bearer … header, leave the word Bearer out.
  3. Read the RESULT box: it shows the decoded Header and Payload as JSON, plus Issued At and Expires At converted from the Unix timestamps.
  4. Check the note under the result: "this only decodes the token. Signature is not verified." Treat everything you read as claimed, not proven, until a server verifies the signature.
  5. Use Copy result to copy the decoded output for your notes or bug report — never paste production tokens into tickets, chats or screenshots.

The page states the token "is decoded in your browser and never uploaded." Even so, treat a JWT like a password: decode only tokens you are allowed to inspect, and revoke any production token you have pasted anywhere public.

Worked example (the pre-filled token, decoded)

The decoder loads with this example token:

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkFkYSBMb3ZlbGFjZSIsImlhdCI6MTcwMDAwMDAwMCwiZXhwIjoxOTAwMDAwMDAwfQ.c2lnbmF0dXJl

Split on the dots and base64url-decode the first two parts (base64url uses - and _ instead of + and /, and drops the = padding — decoders re-add padding to a multiple of 4):

Header:

{"alg": "HS256", "typ": "JWT"}

alg says the token claims to be signed with HMAC-SHA256; typ says it is a JWT.

Payload:

{"sub": "1234567890", "name": "Ada Lovelace", "iat": 1700000000, "exp": 1900000000}
  • sub (subject) = who the token is about: 1234567890.
  • name = a custom claim: Ada Lovelace.
  • iat (issued at) = 1700000000 → the decoder shows 2023-11-14T22:13:20.000Z.
  • exp (expires) = 1900000000 → 2030-03-17T17:46:40.000Z.

Token lifetime: exp − iat = 1,900,000,000 − 1,700,000,000 = 200,000,000 seconds ≈ 6.3 years — fine for a demo token, far too long for a real access token (minutes to hours is normal). The third part, c2lnbmF0dXJl, is the signature — here just the word "signature" base64url-encoded, which is exactly why decoding proves nothing: anyone can assemble a token like this.

The three parts, in plain words

  • Header — how the token claims to be signed (alg, e.g. HS256 or RS256) and its type. Never trust alg from the token itself when verifying; servers must pin the expected algorithm.
  • Payload — the claims: registered ones (iss issuer, sub subject, aud audience, exp expiry, nbf not-before, iat issued-at, jti token ID) plus custom ones. exp/nbf/iat are NumericDates: seconds since the Unix epoch, not milliseconds — the most common decoding bug is reading them as milliseconds.
  • Signature — a cryptographic hash (HMAC) or public-key signature over header.payload. Verifying it needs the shared secret (HS256) or the issuer's public key (RS256/ES256) and a trusted library — the hellagape decoder deliberately does not verify.

Tips and common mistakes

  • "Bearer" left in: pasting Bearer eyJ… whole breaks strict parsers. Paste the token only.
  • Milliseconds confusion: if exp looks like 1700000000000 (13 digits), that is milliseconds from a buggy issuer — JWT NumericDates are seconds (10 digits today).
  • Trusting decoded claims: a decoded role: admin claim means nothing until the signature verifies. Anyone can mint a token that decodes beautifully.
  • Secrets in claims: base64url is encoding, not encryption. Never put passwords, card numbers or personal data in a JWT payload.
  • Expired vs invalid: an expired token (exp in the past) can still have a valid signature, and a forged token can have a future exp. Check both, separately.
  • Related hellagape tools: the Timestamp Converter for raw epoch maths, and the Base64 Decoder for non-JWT base64 strings.

Most-asked questions

How do I decode a JWT without a key?

Split the token on dots, base64url-decode part 1 (header) and part 2 (payload), and parse each as JSON. No key is needed — decoding is just encoding reversed. The hellagape JWT Decoder does this for you and converts iat/exp to dates.

How do I check when a JWT expires?

Read the exp claim: it is seconds since the Unix epoch. In the worked example, exp 1900000000 = 2030-03-17T17:46:40Z. If exp is in the past, the token is expired; also check nbf (not valid before) if present.

Is it safe to paste a JWT into an online decoder?

Only into a decoder that runs locally in your browser, like hellagape's ("the token is never sent anywhere") — and even then, treat the token as a password. Never paste production tokens you cannot revoke into unknown sites, tickets or chats.

What is the difference between decoding and verifying a JWT?

Decoding reads the header and payload — anyone can do it. Verifying checks the signature with the secret or public key to prove the token came from the issuer and was not altered. Hellagape's decoder only decodes; production systems must verify with a trusted library.

What do alg, sub, iss, aud, iat, exp and nbf mean?

alg = signing algorithm (header). iss = issuer, sub = subject (who it is about), aud = audience (who should accept it), iat = issued-at time, exp = expiry time, nbf = not-valid-before time. The three times are Unix seconds.

Why does my JWT have three parts separated by dots?

The format is header.payload.signature, each part base64url-encoded. Three parts = a signed token (JWS). Five parts = an encrypted token (JWE), which this decoder does not handle.

Can I decode a JWT in JavaScript or Python?

Yes — base64url-decode the first two dot-separated parts and JSON-parse them (e.g. Node Buffer.from(part, 'base64url'), Python base64.urlsafe_b64decode with padding re-added). Remember this decodes only; use a JWT library to verify in production.

My token decodes but the API rejects it — why?

Common causes: the token is expired (exp past), not yet valid (nbf future), signed with a different key than the server expects, issued for a different audience (aud mismatch), or sent with the Bearer prefix mangled. Decode first to read the claims, then check each against the API's expectations.

Try it now

JWT Decoder

Decode JWT header and payload claims without verifying or transmitting the token.

Open the free tool