How to Use This Tool
Paste a token to read its header and payload. Timestamps are converted, the expiry is checked, and each standard claim is explained.
Decoding is not verifying
A JWT is three base64url segments joined by dots. The first two are encoded, not encrypted — base64 is a transport format, and reversing it takes no key and no effort. Anyone who obtains a token can read every claim in it: the user id, the roles, the email, whatever you put there.
The third segment is the signature, and it is the only part that proves anything. It says the token was produced by someone holding the signing key and has not been altered since. Checking it requires that key, which is why verification belongs on a server and never in a browser.
The practical rule: reading claims to decide what to display is fine. Reading them to decide what to permit is not, because a client-side decode cannot tell a genuine token from one somebody typed.
Never put secrets in a payload
This follows directly and is still a common mistake. A JWT payload is visible to the browser holding it, to every proxy and logging layer it passes through, to anyone who finds it in a URL, a browser history entry, a server log or an error report.
Put an identifier in the token and keep the sensitive data behind a lookup. If a claim would be a problem in a log file, it is a problem in a JWT.
The standard claims
iss— issuer, who made the token. Verify it matches who you expect.sub— subject, usually the user id.aud— audience, who the token is for. A token issued for one service should be rejected by another, and checking this is frequently skipped.exp— expiry, in seconds since 1970. After this the token should be refused.iat— issued at.nbf— not before; the token is invalid until this time.jti— a unique id for the token, used to revoke or to prevent replay.
Note that all the time claims are in seconds, not milliseconds. Writing
Date.now() straight into exp creates a token that expires in the year 58,000,
which is a bug that never fails loudly.
Why you cannot easily revoke one
A JWT is verified by arithmetic on its signature, with no database involved. That is what makes it fast and stateless — and it means that once issued, a token is valid until it expires, whatever happens afterwards. Logging out, changing a password, or deleting an account does not invalidate tokens already in the wild.
The usual answers are short lifetimes with a refresh token, or a denylist of jti values
checked on each request — which reintroduces the database lookup JWTs were meant to avoid. There
is no free version of this trade-off, and choosing a long expiry because refresh is inconvenient is how
it goes wrong.
