bytekit

JWT Decoder

Paste a JSON Web Token to inspect its header, payload and expiry. Everything runs in your browser, so your token is never uploaded anywhere.

  • Free
  • No sign-up
  • Runs in your browser

What it is for

A JSON Web Token (JWT) is a short string that apps use to say who you are and how long a login lasts. This tool splits a token into its header and payload and shows the claims and expiry in plain language.

  • Check when a token expires while debugging a login problem.
  • See which user, roles or permissions a token claims to carry.
  • Confirm which signing algorithm the token announces.
  • Understand why an API keeps answering 401 Unauthorized.

How to use it

  1. Paste the full token, with its two dots, into the box.
  2. Read the header, the payload and the claims table below it.
  3. Look at the expiry and issued-at times, which are shown as dates.
  4. Press Clear when you are done so the token is not left on screen.

Examples

A practice token

You enter

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyXzQyIiwibmFtZSI6IkFkYSBMb3ZlbGFjZSIsImlhdCI6MTcwMDAwMDAwMCwiZXhwIjoxNzAwMDAzNjAwfQ.c2lnbmF0dXJl

You get

Header: {"alg":"HS256","typ":"JWT"} Payload: {"sub":"user_42","name":"Ada Lovelace","iat":1700000000,"exp":1700003600} Issued: 14 Nov 2023, 22:13:20 UTC Expires: 14 Nov 2023, 23:13:20 UTC (one hour later)

This token was made for practice and has a made-up signature. Use the Sample button in the tool for a ready-made one.

Limits and disclaimers

  • Decoding is not verifying. The tool cannot tell you whether a token is genuine, because that needs the secret or public key.
  • A token that decodes cleanly can still be forged. Your server must check the signature before it trusts anything inside.
  • Treat a live token like a password. Prefer expired or test tokens, and avoid pasting production tokens into any site you do not control.
  • Encrypted tokens (JWE) cannot be read here. Only the common signed kind (JWS) is decoded.

ByteKit is provided as is, for convenience. Check any result that matters before you use it in production, and keep passwords, keys and personal data out of any website you do not control.

What is a JWT?

A JSON Web Token is a compact string that carries claims, such as who a user is and when a login expires, from one system to another. It has three parts separated by dots: a header, a payload and a signature. The header and payload are just Base64URL-encoded JSON, which is why anyone can read them.

Decoding is not verifying

This tool shows you what a token says, but it cannot tell you whether the token is genuine. Checking the signature needs the secret or public key, and anyone can create a token that decodes perfectly. Never trust the contents of a token until your server has verified its signature.

Is it safe to paste my token here?

ByteKit decodes your token inside your browser and makes no network request with it, and you can confirm that in your browser's Network tab. Even so, a live token works like a password, so avoid pasting active production tokens into any website you do not control, and prefer expired or test tokens when you can.

What to look for

  • exp is when the token expires, and an expired token should be rejected by the server.
  • alg set to none means the token is unsigned and must never be accepted as proof of identity.
  • iat and nbf in the future often point to a clock difference between servers.
  • JWT dates are counted in seconds, not milliseconds.

Questions people ask

Why can anyone read what is inside a JWT?

The header and payload are only Base64URL-encoded JSON, which is an encoding and not encryption. Never put secrets in a token's payload.

Why do the dates look so old or so far away?

JWT times are counted in seconds since 1 January 1970. If a time is wrong by a factor of 1,000, a system may have used milliseconds by mistake.

Does ByteKit check the signature?

No. It only decodes. Signature checking belongs on your server, where the secret key stays private.

Guides

Longer reads from the ByteKit blog that go with this tool.