Encoding & Hashing

JWT Decoder

Decode and inspect the header, payload and signature of a JSON Web Token, entirely in your browser.

Privacy: This tool runs entirely in your browser. Your data never leaves your device and is never uploaded to any server.

A JWT must contain three dot-separated segments: header.payload.signature.

How to use this JWT decoder

  • Paste a token — the three-part header.payload.signature string — into the input.
  • The decoder splits it and shows the header and payload as readable JSON.
  • Copy any part of the output with a single click.
  • Decoding happens locally; your token is never uploaded.

JWT compared with the alternatives

A JWT is one way to carry identity. Knowing what it trades away makes it easier to choose it deliberately.

ApproachWhere the state livesRevocableGood for
JWTIn the token itselfOnly when it expiresStateless APIs and service-to-service calls
Session cookieOn the serverYes, immediatelyBrowser apps that need instant logout
API keyA static secretYes, by rotating itServer-to-server integrations
Refresh tokenOn the serverYesKeeping sessions alive without long-lived JWTs

What is actually inside a JWT

A JWT is three Base64URL-encoded segments joined by dots. The first is the header, which names the token type and the signing algorithm, such as HS256 or RS256. The second is the payload: the claims, including a user id, roles and an expiry time. The third is the signature.

Only the first two are readable JSON, and those are exactly what this tool shows you. The signature is a cryptographic value — decoding it produces bytes, not text.

Decoding is not verification

This is the single most important thing to understand about JWTs. Decoding only reveals what is written inside the token. It proves nothing about who wrote it, or whether it has been altered.

Anyone can construct a token with any payload they like. A token becomes trustworthy only once its signature has been checked against the correct key and its claims have been validated — the expiry has not passed, the issuer is who you expect, and the audience is your application. Do that on the server, never in the browser.

Which claims are worth checking

Timestamp claims are seconds since the Unix epoch, which is why they look like ten-digit numbers.

  • exp — the expiry time. An expired token must be rejected.
  • nbf — not before. The token is not valid until this time.
  • iss — the issuer. It should match your identity provider.
  • aud — the audience. It should match your application, not somebody else’s.
  • sub — the subject, usually the user id.
  • iat — when the token was issued, useful for spotting tokens that are unexpectedly old.

JWT versus session cookies

A session cookie stores an opaque id and the server looks the state up. A JWT carries the state itself, which is what makes it stateless and easy to scale across services.

The trade-off is control. A session can be revoked by deleting a row; a signed JWT stays valid until it expires. That is why short expiry times and refresh tokens are the usual pattern.

Is it safe to paste a token here?

Decoding happens entirely in your browser, so the token is never uploaded. That said, treat any real token as a credential: avoid pasting production tokens into sites you do not trust, and revoke anything you have reason to suspect.

Frequently asked questions

What is a JWT?

A JSON Web Token (JWT) is a compact, URL-safe token made of three Base64URL-encoded parts: header, payload and signature.

Does this verify the token?

No. This tool decodes the header and payload for inspection only. It does not verify the signature or trustworthiness of a token.

Is my token uploaded?

No. Decoding happens locally in your browser, so the token never leaves your device.

Can I decode a token without the secret?

Yes, and that is the point. The header and payload are only encoded, so anyone holding the token can read them. Only the signature needs the key.

How do I tell whether a token has expired?

Read the exp claim and compare it with the current time. It is a Unix timestamp in seconds, which is why it looks like a ten-digit number.

Why is the signature unreadable?

It is a cryptographic value rather than text. Decoding it produces bytes, which is why a decoder shows only the header and payload.

More Encoding & Hashing tools