Skip to content
MyToolkit.pro

Code & Data

JWT Decoder

Paste a JSON Web Token and read its header and payload as formatted JSON. Choose which part to show, and see the signing algorithm and how many claims the payload carries. Your token never leaves this browser.

Private by design: no text is uploaded or stored.

Note: decoding does NOT verify the signature — never trust a token by its contents alone.

Private by design: no text is uploaded or stored.

Token anatomy

A JWT is three dot-separated parts. The signature is never verified here — decoding only shows what the token claims.

..

Header Payload Signature

Try an example

Result

Updates when you decode or change what to show.

No token

Algorithm
—
Claims
0

Claims explained

How does the decoding work?

A JWT has three dot-separated parts: header, payload and signature. The header and payload are base64url-encoded JSON, which this tool decodes and pretty-prints. The signature is left untouched — decoding reveals what a token says but does NOT prove it is authentic, so never rely on a decoded payload for authorization without verifying the signature on a server.

How to decode a JWT token step by step

  1. Copy the token from wherever you found it: an Authorization: Bearer … header, a cookie, a browser storage entry or a log line. Copy only the part after Bearer . The token starts with eyJ.
  2. Paste it into the JWT to decode box. The result updates as you type or paste, so you don't need to press anything. The Decode button re-runs it by hand.
  3. Look at the Token anatomy strip under the input. It shows the token split at the dots into header, payload and signature. The split is shown even when the content can't be decoded, so you can quickly see whether a piece is missing.
  4. Read the status badge and the Claims explained table in the result panel. Time claims (exp, nbf, iat, auth_time, updated_at) are converted to a UTC date with a relative time such as in 3d 2h or 5m 30s ago. Common claims like iss, sub, aud and jti get a short description.
  5. Use Show to choose what goes into the decoded JSON: Payload (the default), Header, or Both wrapped in one object.
  6. Copy the decoded JSON with Copy result.

If you see "Invalid JWT — could not decode.", either the input has fewer than two dot-separated segments, or the first two segments are not base64url-encoded JSON objects. The second case usually happens when the Bearer prefix or surrounding quotes were copied along with the token.

Example tokens and what the decoder shows

The sample token behind the Standard token button:

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

With Show set to Payload, the decoded output is:

{
  "sub": "1234567890",
  "name": "John Doe",
  "iat": 1516239022
}

Algorithm: HS256, Claims: 3. The iat row shows 2018-01-18T01:30:22.000Z. The token has no exp, so the badge says "No expiry claim" instead of guessing that it is valid.

The Extra claims example has an expiry in the past:

Claim Value What the table shows
sub 42 Subject — who the token is about
iss mytoolkit Issuer — who created the token
exp 1700000000 2023-11-14T22:13:20.000Z plus how long ago
admin true custom claim, no description

The status badge reads "Expired". This check uses your device's clock, and a token counts as expired from the exact second in exp.

With Both selected, the RS256 header example gives:

{
  "header": {
    "alg": "RS256",
    "typ": "JWT"
  },
  "payload": {
    "sub": "abc123",
    "role": "admin"
  }
}

When a JWT decoder saves debugging time

  • A request returns 401 and you need to check whether the token has expired or isn't valid yet (nbf in the future, often caused by clock skew between servers).
  • An API rejects a token issued for a different client. Compare aud and iss with what the API expects.
  • Roles or scopes look wrong in your app. Check the actual scope, role or roles values the identity provider put into the token. Arrays and nested objects are shown as JSON, not [object Object].
  • You are setting up a new OIDC or OAuth provider and want to confirm the header uses the algorithm your backend accepts (RS256 vs HS256), or check that it doesn't say none.
  • You want to copy the claims into a ticket or a test fixture. Copy the payload and tidy it further in the JSON Formatter if needed.

If you need to convert a single timestamp outside a token, for example a value from a database row, the Timestamp Converter handles that directly.

What this JWT parser does not do

It does not check the signature. A token edited by hand decodes just as cleanly as a real one, and an unsigned token with alg: none and an empty signature is decoded too. Use the decoded output to inspect a token, never to trust it. Signature checks belong on the server, following the verification practices in RFC 8725, which also covers rejecting alg: none.

Other limits worth knowing:

  • Only the first two segments are read. An encrypted token (JWE, five segments) shows "Invalid JWT — could not decode.", because its second segment is an encrypted key, not JSON claims.
  • The token must be one continuous string. Remove surrounding quotes and line breaks added by log wrapping.
  • Time claims are only resolved when they are numbers. A string such as "exp": "soon" is shown as-is, and the badge ignores it.
  • If you only need to decode one base64url segment, or text that isn't a JWT, use the Base64 Encoder / Decoder.

Frequently asked questions

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

On this page, decoding runs in your browser and the token isn't uploaded or stored. Still, a live token works like a password until it expires, so avoid pasting it anywhere you don't control and rotate it if it leaks.

Why is the exp date in my token wrong?

JWT time claims are absolute times in seconds since the Unix epoch. A date in 1970 means `exp` holds a small number, usually a lifetime such as `3600` instead of an absolute timestamp. A date thousands of years away means the issuer wrote milliseconds.

Where do I find my JWT in the browser?

Open DevTools, go to the Network tab, select an API request and look for the `Authorization: Bearer …` request header. If the app keeps the token client-side, check Local Storage, Session Storage or Cookies under the Application (Chrome) or Storage (Firefox) tab.

Why does every JWT start with eyJ?

The header is a JSON object, so it always begins with `{"`, and those two characters encode to `eyJ` in base64url. The payload is JSON too, which is why the part after the first dot usually starts with `eyJ` as well.

Can I edit a decoded JWT and send it back to the server?

You can change the claims and re-encode them, but the signature was computed over the original header and payload, so it no longer matches. A server that verifies signatures properly will reject the edited token.

All in Code & Data

Cron Expression Helper

Explain a cron expression in plain English and preview its next run times. Runs entirely in your browser — nothing is uploaded.

Code & Data In your browser

JSON Formatter

Format, validate and beautify JSON data privately in your browser.

Code & Data In your browser

Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 to text instantly in your browser.

Code & Data In your browser

URL Encoder / Decoder

Percent-encode or decode URL text instantly and privately in your browser.

Code & Data In your browser

Regex Tester

Test a regular expression against your text, see every match highlighted and copy a match report. Runs entirely in your browser.

Code & Data In your browser

Hash Generator

Generate MD5, SHA-1, SHA-256 and SHA-512 hashes of any text in your browser. Digests update instantly and nothing is uploaded.

Code & Data In your browser

What do you need?

Swipe up for the next one