What is a JWT?
A JSON Web Token (JWT) has three Base64url-encoded segments separated by dots: header.payload.signature. The header declares the algorithm, the payload holds claims (user ID, expiry, roles), and the signature proves the token was issued by a trusted party.
Decoding reads the first two segments. Verifying checks the signature against a secret or public key β that's the step that determines whether to trust the token.
Safe debugging workflow
- Open ToolBite's JWT Decoder β it runs locally, your token never leaves the browser.
- Paste the token and inspect the header: check
algandkid. - Read the payload claims listed below.
- Verify the signature server-side before using any claim to authorize a request.
Key claims to inspect
Payload claims reference
- exp β expiry timestamp (Unix epoch). Token is invalid after this time.
- nbf β not-before. Token is invalid before this time.
- iat β issued-at. When the token was created.
- iss β issuer. Must match your expected auth provider.
- aud β audience. Must match your app's identifier.
- sub β subject. Usually the user ID.
Common mistakes to avoid
- Trusting decoded data without verification β the payload can be forged if the signature is not validated.
- Ignoring clock skew β clocks between servers drift. Allow a small buffer (60s) when checking
expandnbf. - Not validating
issandaudβ a token from one app could be replayed in another if you skip audience checks. - Using
alg: noneβ always reject tokens with no algorithm. Libraries should do this by default; verify yours does.
Safer team workflow
Decode locally in the browser for quick debugging. Redact sensitive samples before pasting into tickets or Slack. Keep verification logic in code-reviewable backend services β never move signature checking to the client.
JWT review checklist
- Token is meant for the correct environment and application.
exp,nbf, andiatalign with your session rules.issandaudare verified server-side before using the token.- Custom role or permission claims are not trusted until signature validation passes.
- Algorithm is not
none.