Skip to content

JWT Decoder

Decode a JWT to read its header and payload, see issue and expiry dates, and check if it has expired. Your token never leaves your browser.

Runs in your browser. Nothing is uploaded.

About the JWT Decoder

A JSON Web Token (JWT) is a compact token used for logins and API access. It has three parts separated by dots: a header (the algorithm), a payload (the “claims”, such as user ID, roles and expiry time) and a signature. The first two parts are just Base64URL-encoded JSON, so anyone can read them.

This decoder shows the header and payload as formatted JSON, converts time claims (iat, nbf, exp) into readable dates, and tells you whether the token has expired, which makes it handy for debugging authentication.

Tokens are effectively passwords while they're valid. This tool decodes them entirely in your browser; the token is never sent anywhere.

How to use it

  1. Paste a token into the box. A leading “Bearer ” is removed automatically. Or press “Load sample” to try it.
  2. Read the status badge: expired, not yet valid, or not expired.
  3. Check the readable dates for issued-at, not-before and expiry.
  4. Inspect or copy the decoded header and payload.

Examples

Debugging a 401 error

Paste the token from the failing request. If the badge says “Expired”, the client needs to refresh the token.

Checking roles

Look in the payload for claims like role, scope or permissions to see why an API allows or denies access.

Unix timestamps

exp: 1700003600 means 14 November 2023, 23:13:20 UTC. The decoder shows this in your local time.

Limitations

  • The signature is not verified. Verification needs the secret or public key, which should never be pasted into a website. A decoded token is not proof that it's genuine.
  • Encrypted tokens (JWE, five parts) can't be decoded without the key.
  • Dates are shown in your device's time zone.

Frequently asked questions

Is it safe to paste my token here?

The token is decoded in your browser and never transmitted, so this page doesn't expose it. As a habit, avoid pasting live production tokens into tools you don't trust, and prefer expired or test tokens.

Why can anyone read a JWT's contents?

JWTs are signed, not encrypted. The signature prevents tampering but doesn't hide the payload, so never put secrets like passwords in a JWT.

What do iat, nbf and exp mean?

iat is when the token was issued, nbf is the time before which it must not be accepted, and exp is when it expires. All are Unix timestamps in seconds.

Why doesn't this tool verify the signature?

Verifying requires your secret key (for HS256) or the issuer's public key (for RS256/ES256). Your server should do this; sharing a secret key with a website would defeat its purpose.

Related tools