What is inside a JWT?

A JSON Web Token has three parts separated by dots. The first is the header, the second is the payload and the third is the signature. The first two are JSON in base64url form. They look scrambled, but they aren't encrypted.

{
  "sub": "user_1842",
  "iss": "https://auth.example.com",
  "aud": "shop-api",
  "iat": 1795564800,
  "exp": 1795568400
}

What do the JWT claims mean?

Claim Meaning Check when
iss Who issued the token It's rejected by the API
sub The user or service it's about The wrong account appears
aud Who the token is meant for Another service refuses it
exp When it expires Sessions end early
nbf Not valid before this time A new token fails at first
iat When it was issued You're checking its age

Times are Unix seconds. A common bug is writing milliseconds, which puts the expiry thousands of years away.

Is decoding the same as verifying?

No. Decoding reads the token. Verifying checks the signature with a key and proves nobody changed it. Never trust a claim on the server until the signature passes. A token with alg set to none should be refused.

Is it safe to paste a JWT online?

A live token works like a password until it expires, so be careful. This decoder makes no network request with your token. Even so, use a test or expired token when you can. If you paste a production one somewhere you don't trust, revoke it.

Should you put personal data in a JWT?

Avoid it. Anyone who gets the token can read the payload, and tokens end up in logs. Store an ID and look up the rest. To measure a large JSON payload, use the JSON token counter. To match tokens in log files, build the pattern in the regex tester.