EzToolio

How JWTs Work: Header, Payload, Claims and Expiration

Updated 2026-08-25 · 6 min read

A JWT (JSON Web Token) is a compact way to carry identity and authorization data between services. In this guide we explain how JWTs are structured, what the claims mean, and how expiration works.

What Is a JWT?

A JSON Web Token is a string in three parts separated by dots: header.payload.signature. It is commonly issued by an authentication server and sent as an access token on later API requests. The format is compact and URL-safe, which makes it easy to pass in headers.

The Three Parts

  • Header — usually { "alg": "HS256", "typ": "JWT" }, describing the signing algorithm and token type.
  • Payload — the claims, the data you want to inspect such as user ID and expiration.
  • Signature — generated from the header, payload, and a secret or key, used by the issuer to detect tampering.

Common Claims

Registered claims include iss (issuer), sub (subject), aud (audience), exp (expiration), iat (issued at), nbf (not valid before), and jti (JWT ID). A JWT decoder shows these in a readable table so you can understand a token at a glance.

How Expiration Works

The exp, iat, and nbf claims are Unix timestamps in seconds. A decoder can convert exp into a human date and tell you whether the token has expired. That is a convenience check only — an unexpired token can still be invalid for other reasons.

Encoding vs Encryption

JWT segments are Base64URL-encoded, not encrypted. Anyone holding the token can decode and read the payload, so sensitive data should never be stored in a JWT. Decoding also differs from verification: reading the contents does not prove the signature is valid or that the issuer is trusted.

Try the free tool

Put this guide into practice in seconds with our JWT Decoder. It takes about the same time to complete as reading this post.

Open the tool

Frequently Asked Questions

What is a JWT decoder?

A JWT decoder splits a token into header, payload, and signature and converts the first two parts from Base64URL back into readable JSON so you can inspect the claims.

Can I decode a JWT without the secret key?

Yes. Decoding only reverses Base64URL and parses JSON. Verifying the signature, which proves authenticity, is a separate step that needs the secret or public key.

Is a JWT payload encrypted?

No. The payload is encoded, so anyone with the token can read it. That is why JWTs should carry only non-sensitive claims.