Categories

JWT Decoder

Decode JWT tokens

Key Facts

Category
Security
Input Types
text, checkbox
Output Type
text
Sample Coverage
4
API Ready
Yes

Overview

The JWT Decoder is a secure, browser-based utility that allows you to instantly inspect the contents of JSON Web Tokens. By pasting your encoded string, you can view the header, payload, and signature components in a readable format without sending data to a server.

When to Use

  • Debugging authentication issues in web applications.
  • Verifying the claims and expiration time within a token.
  • Inspecting token structure during API development.

How It Works

  • Paste your encoded JWT string into the input field.
  • Select your display preferences to show or hide the header, payload, or signature.
  • The tool automatically decodes the Base64Url-encoded segments and displays the JSON structure.

Use Cases

Checking user roles and permissions embedded in the token payload.
Troubleshooting 'Invalid Token' errors by inspecting the 'exp' (expiration) claim.
Reviewing custom claims added by your authentication provider.

Examples

1. Debugging Expired Sessions

Frontend Developer
Background
A user is being logged out prematurely from a web application.
Problem
The developer needs to check the 'exp' (expiration) claim inside the JWT to see if the token is expiring earlier than expected.
How to Use
Paste the JWT from the browser's local storage into the decoder and check the 'Show Payload' option.
Outcome
The developer identifies that the 'exp' timestamp is set to a past date, confirming the issue lies with the token generation logic.

2. Verifying User Claims

Backend Engineer
Background
An API is failing to authorize a user despite them being logged in.
Problem
The engineer needs to verify if the 'roles' or 'permissions' array is correctly included in the token payload.
How to Use
Input the token into the decoder and inspect the JSON payload section.
Outcome
The engineer discovers the 'roles' field is missing from the payload, indicating a configuration error in the authentication service.

Try with Samples

json

Related Hubs

FAQ

Is my token data sent to a server?

No, all decoding happens locally in your browser. Your data never leaves your device.

Can this tool verify if a token is valid?

This tool decodes the content for inspection but does not perform cryptographic signature verification.

What parts of the JWT can I view?

You can view the header, the payload (claims), and the signature, depending on your selected display settings.

Does this work with expired tokens?

Yes, the decoder will display the contents of any validly formatted JWT, regardless of its expiration status.

Is the signature decoded or verified?

The signature is displayed as a raw string; this tool does not validate the signature against a secret key.

API Documentation

Request Endpoint

POST /en/api/tools/jwt-decoder

Request Parameters

Parameter Name Type Required Description
jwtToken text Yes -
showHeader checkbox No -
showPayload checkbox No -
showSignature checkbox No -

Response Format

{
  "result": "Processed text content",
  "error": "Error message (optional)",
  "message": "Notification message (optional)",
  "metadata": {
    "key": "value"
  }
}
Text: Text

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-jwt-decoder": {
      "name": "jwt-decoder",
      "description": "Decode JWT tokens",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=jwt-decoder",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

If you encounter any issues, please contact us at [email protected]