All tools

JWT decoder

Decode a token's header and payload.

JWT decoder
InputJWT

Press Command or Control plus Enter to run. Tab inserts indentation; press Escape, then Tab, to leave the editor.

Result
Your result will appear here.
Ready1 line · 114 chars

About the JWT decoder

A JWT (JSON Web Token) is a compact token used for login sessions and API authorisation. It has three parts separated by dots: a header, a payload and a signature. The header and payload are Base64URL-encoded JSON, so they can be read by anyone who has the token.

This decoder splits the token, decodes the header and payload, and shows them as formatted JSON so you can inspect the algorithm, user ID, expiry time and other claims.

How to use the JWT decoder

  1. Paste the full token (three parts separated by dots) into the Input editor.
  2. Click Decode JWT or press Ctrl + Enter (Cmd + Enter on Mac).
  3. Read the HEADER section for the token type and signing algorithm, such as HS256 or RS256.
  4. Read the PAYLOAD section for claims such as sub (subject), iat (issued at) and exp (expires).

Example

Decode an HS256 access token

Input

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyXzQyIiwibmFtZSI6IkFkYSBMb3ZlbGFjZSIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTc2NzIyNTYwMCwiZXhwIjoxNzY3MjI5MjAwfQ.dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk

Output

HEADER
{
  "alg": "HS256",
  "typ": "JWT"
}

PAYLOAD
{
  "sub": "user_42",
  "name": "Ada Lovelace",
  "role": "admin",
  "iat": 1767225600,
  "exp": 1767229200
}

Signature: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk

iat 1767225600 is 1 January 2026 00:00 UTC and exp is one hour later. Use the Timestamp converter to read them.

Common errors and how to fix them

A JWT must contain three dot-separated parts.

The value isn't a complete JWT. Copy the token without the Bearer prefix and check that it wasn't cut off; it should look like xxxxx.yyyyy.zzzzz.

JWT header or payload is not valid Base64URL-encoded JSON.

The token is encrypted (a JWE has five parts), or it's an opaque token that only looks like a JWT. Opaque tokens can only be checked by the server that issued them.

jwt expired / TokenExpiredError

The exp claim is in the past. Compare it with the current Unix time; the client needs to refresh the token or log in again. Allow a few seconds of clock skew between servers.

Good to know

  • Decoding does not verify the signature. A decoded token can still be forged or expired, so never trust its contents without verifying it on your server.
  • exp, iat and nbf are Unix timestamps in seconds. Paste one into the Timestamp converter to see the date.
  • Treat real tokens like passwords: anyone who has a valid token can use it until it expires.

Frequently asked questions

Is a JWT encrypted?

A standard signed JWT is only encoded, not encrypted, so anyone can read its payload. Don't put secrets in it. Encrypted tokens (JWE) exist, but they have five parts and can't be decoded without the key.

Why does my token fail to decode?

The most common causes are a missing part (a JWT needs exactly two dots), extra characters such as a Bearer prefix or quotes, or a token that was cut off when copied.

How do I check whether a JWT has expired?

Find the exp claim in the payload and convert it with the Timestamp converter. If that time is in the past, the token has expired.