Anatomy of a JWT
A JSON Web Token (RFC 7519) is three Base64URL-encoded parts joined by dots: header.payload.signature. The header says which algorithm signed it. The payload is a JSON object of claims about the subject. The signature covers the first two parts, so a verifier can tell whether anything was altered.
The first two parts are only encoded, not encrypted. Anyone who has the token can read every claim, which is why this decoder works without any key, and why a JWT must never carry secrets.
Standard claims
| Claim | Meaning |
|---|---|
| iss | Issuer: who created the token |
| sub | Subject: who the token is about, usually a user ID |
| aud | Audience: which service the token is meant for; verifiers must check it |
| exp | Expiry, as a Unix timestamp in seconds |
| nbf | Not before: the token is invalid until this time |
| iat | Issued at |
| jti | Unique token ID, used for revocation lists |
Signing algorithms
HS256 (HMAC with SHA-256) uses one shared secret for both signing and verifying, so anyone who can verify can also forge; it suits a single service talking to itself. RS256, ES256 and EdDSA use a private key to sign and a public key to verify, which is what identity providers (Auth0, Keycloak, Google, Azure AD) use so that any service can check tokens without being able to mint them. The public keys are usually published at a /.well-known/jwks.json URL.
Things verifiers must check
- The signature, with a key appropriate for the
algin the header, and never accepting"alg": "none". - That
expis in the future andnbf, if present, in the past (allowing a little clock skew). - That
issandaudare the expected values.
Questions
Is it safe to paste my token here?
The token is decoded by JavaScript in your browser and is not transmitted. Even so, a token is a credential: treat it like a password, and prefer short-lived test tokens when debugging.
Why does the decoder say my token has expired?
Its exp claim is earlier than your computer's clock. Tokens are usually short-lived (minutes to hours); get a fresh one from the login or refresh endpoint. If your clock is wrong, the check will be wrong too.
Can I verify an RS256 token here?
Not in this version. RS256 needs the issuer's public key (from its JWKS endpoint). The decoder shows the header, payload and timing checks for any algorithm; only HMAC algorithms can be verified with a secret.
Why is the payload readable without the secret?
Because a JWT is signed, not encrypted. Base64URL is reversible by design. If the contents must be hidden, the token has to be encrypted as a JWE, which looks similar but has five parts.
What does the timestamp in exp mean?
Seconds since 1 January 1970 UTC (Unix time). The decoder converts it to a date in your time zone and shows how long remains. Use the Unix timestamp tool to convert other values.