JWT Decoder

Paste a JSON Web Token to see its header and payload as formatted JSON, including UTF-8 claims. Decodes in your browser; it does not verify signatures.

The interactive tool loads here when JavaScript runs.

About this tool

What is the JWT Decoder?

The JWT Decoder splits a JSON Web Token into its parts and shows the header and payload as formatted JSON, so you can read the algorithm, the claims and the expiry time without writing code.

It decodes only. It does not check the signature, because that requires the issuer's secret or public key. Treat what you see as "what this token claims", not "what has been proven".

You can paste the token on its own or with a leading "Bearer " copied from an Authorization header; surrounding whitespace is ignored. Claims are decoded as UTF-8, so names with accents or non-Latin scripts display correctly. Timestamps such as exp and iat are shown as raw numbers.

  • Decodes header and payload from Base64URL to formatted JSON
  • UTF-8 aware, and accepts a pasted "Bearer " prefix
  • Sample token to try it instantly
  • Copy buttons for header and payload
  • Tokens are decoded locally and never uploaded
Read the guide: How JWTs Work: Decoding Headers, Payloads and Claims

Updated

How to use the JWT Decoder

  1. Paste a token, starting with eyJ, into the JWT token box. Use Load Sample if you want to try it first.
  2. Click Decode JWT.
  3. Read the Header to see the signing algorithm (alg) and type, and the Payload for claims such as sub, iat and exp.
  4. Copy the header or payload JSON with the copy buttons.

Worked example

The sample token

Input

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

Output

Header {"alg": "HS256", "typ": "JWT"}; payload {"sub": "1234567890", "name": "John Doe", "iat": 1516239022}

iat 1516239022 is 18 January 2018, 01:30:22 UTC. There is no exp claim, so this token never expires on its own, which is something a reviewer should flag.

Background and insight

JWTs are defined in RFC 7519 (2015) as part of the JOSE family of standards, alongside JWS for signatures and JWE for encryption. A typical signed token is three Base64URL strings joined by dots: a header naming the algorithm, a payload of claims, and a signature over the first two.

The payload is not encrypted. Anyone holding the token can decode it exactly as this page does, which is why tokens should never carry passwords or other secrets. The signature is what stops a client from editing the payload, and only the server that verifies it can trust the contents.

Most production JWT incidents come from verification shortcuts rather than cryptography: accepting the "none" algorithm, letting the token header choose between HMAC and RSA, or forgetting to check exp and aud. RFC 8725, the JWT Best Current Practices document, lists these pitfalls. Decoding a token during debugging is the easy part; the server still has to verify it properly.

Common use cases

  • Debugging login problems

    Check whether a token has expired (exp) or was issued for a different audience (aud) when an API returns 401.

  • Checking roles and scopes

    See which roles, scopes or tenant IDs your identity provider actually put in the token.

  • Reviewing token size

    Spot bloated payloads that make every request header larger than it needs to be.

  • Learning OAuth and OIDC

    Inspect real ID and access tokens to understand standard claims.

Tips and limitations

  • eyJ at the start of a string is the Base64 encoding of {" and is a quick way to recognize a JWT or another Base64-encoded JSON value.
  • exp, iat and nbf are seconds since 1970, not milliseconds. Paste them into the Epoch Converter to read them as dates.
  • An encrypted token (JWE) has five dot-separated parts, not three. It cannot be decoded without the key, and this tool will reject it.
  • Some providers issue opaque access tokens that are not JWTs at all. If a token has no dots, introspect it with the provider instead.
  • Clock skew between servers causes "token not yet valid" errors. Most libraries allow a small leeway of 30 to 60 seconds on exp and nbf.

Sources and further reading

  1. RFC 7519: JSON Web Token (JWT), IETF. Defines the token format and registered claims such as exp and aud
  2. RFC 7515: JSON Web Signature (JWS), IETF
  3. RFC 7518: JSON Web Algorithms (JWA), IETF. HS256, RS256, ES256 and the other alg values
  4. RFC 8725: JSON Web Token Best Current Practices, IETF. The verification pitfalls behind most JWT incidents
  5. RFC 4648: The Base16, Base32, and Base64 Data Encodings, IETF. The Base64URL alphabet tokens use

Frequently asked questions

Does this JWT decoder verify the signature?

No. Verification needs the issuer's secret for HS256 or its public key for RS256, ES256 and similar algorithms, usually fetched from a JWKS endpoint. This tool only decodes the readable header and payload, so a decoded token says nothing about whether it is genuine.

Is it safe to paste a production JWT into a decoder?

Decoding here happens entirely in your browser and nothing is sent anywhere. Still, a live token grants access until it expires, so treat it like a password: prefer expired or test tokens, and avoid pasting live tokens into online tools whose code you cannot inspect.

How do I read the exp claim in a JWT?

exp is a Unix timestamp in seconds, defined in RFC 7519. Compare it with the current epoch time, or paste it into the Epoch Converter to see the date in UTC and your time zone. If the current time is past exp, servers should reject the token.

Why is the JWT payload readable if the token is secure?

Signed JWTs are protected against tampering, not against reading. The payload is only Base64URL-encoded, so anyone holding the token can decode it. If the contents must stay secret, use an encrypted token (JWE) or keep the data on the server and send an opaque reference.

What does an "Invalid JWT token" error mean here?

The input did not have exactly three dot-separated parts, or the header or payload did not decode to valid JSON. Common causes are a token cut off when copying, quotes copied along with it, or a five-part encrypted JWE token, which cannot be decoded without the key.

What do the alg values HS256 and RS256 mean?

HS256 signs the token with HMAC-SHA256 and one shared secret, so every service that verifies tokens can also create them. RS256 uses an RSA private key to sign and a public key to verify, which suits setups where many services check tokens issued by one identity provider.

Is there an in-depth guide to the JWT Decoder?

Yes. “How JWTs Work: Decoding Headers, Payloads and Claims” covers the background, how it works, common pitfalls and worked examples. Read the full guide.