1. Home
  2. Tools
  3. JWT Decoder

JWT Decoder

Read the header and payload of a JSON Web Token and see when it expires. It runs in your browser and the token is never sent anywhere.

This tool only decodes. It does not check the signature, so a decoded token is not proof that the token is genuine. Your token is processed in your browser and is not sent anywhere. Still, avoid pasting live production tokens into any website you do not need to.

How to use it

  1. Paste your token into the box. It is decoded straight away. A leading Bearer is ignored.
  2. Read the Header (the algorithm and token type) and the Payload (the claims, such as who the token is for and who issued it).
  3. Check the Time claims. Expiry (exp), issued-at (iat) and not-before (nbf) are shown as dates in UTC and in your local time, and the banner says whether the token has expired.
  4. Use Load a sample token to see how it looks.

What a JSON Web Token is

A JSON Web Token (JWT) is a compact string made of three parts joined by dots: a header, a payload and a signature. The header and payload are JSON objects written in URL-safe Base64, which is an encoding, not encryption, so anyone who holds the token can read them. That is why you should never put secrets in the payload. The signature is what lets a server check that the token was issued by someone who holds the key and that it has not been changed.

What this tool does not do

  • It does not verify the signature. To do that you need the secret or public key, and the check must be done by your server, not by pasting a token into a web page.
  • It does not decrypt encrypted tokens (JWE). Those have five parts, and their contents are not readable without the key.
  • It does not tell you whether the claims are acceptable for your application, such as the right audience or issuer.

Time claims are compared with your computer’s clock, so a wrong clock gives a wrong expired or valid message.

Related tools

Base64 encoder and decoder (which handles the same URL-safe Base64), Unix timestamp converter and JSON formatter and viewer.

Frequently asked questions

No. Decoding is done by JavaScript in your browser, and the token is not sent to CodeROG or anyone else. As a general habit, still avoid pasting tokens that give access to live systems into websites unless you need to; use an expired or test token when you can.

No. It only decodes. A token that decodes cleanly can still be forged or tampered with. Signature verification needs the signing key and belongs in your server code.

A JWT has three parts separated by dots, and the first two must decode to JSON. Check that you copied the whole token, with no quotes, spaces or line breaks inside it.

It means the token is unsigned. A server must never accept an unsigned token as proof of identity, so this tool shows a warning when it sees it.

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

Need a hand with this?

Let our engineers take it from here