JWT structure
A JWT is three base64url strings joined by dots: header.payload.signature. The header names the algorithm (for example HS256 or RS256), the payload carries claims, and the signature proves the first two parts were not changed.
Registered claims
| Claim | Meaning |
|---|---|
iss | Issuer |
sub | Subject (usually the user ID) |
aud | Audience the token is meant for |
exp | Expiry, Unix seconds |
nbf | Not valid before, Unix seconds |
iat | Issued at, Unix seconds |
jti | Unique token ID |
Convert any timestamp with the Unix timestamp converter.
Security notes
- The payload is encoded, not encrypted. Do not put passwords or personal data in it.
- Reject tokens with
"alg":"none"on the server. - Keep expiry short and refresh tokens server-side.