Encoding Utilities

Jwt Decode

Extracts header and payload from JWT tokens without signature verification. Use via MCP in Cursor or Windsurf, or GET /v1/encode/jwt/decode with the token parameter. Returns decoded JSON for both sections — useful for debugging auth flows or inspecting token claims. Perfect for development when you need to peek inside JWTs quickly.

API Endpoint

GET /v1/encode/jwt/decode

Code Examples

curl "https://tinyfn.io/v1/encode/jwt/decode" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/encode/jwt/decode', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/encode/jwt/decode',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's encoding tools:

{
  "mcpServers": {
    "tinyfn-encoding": {
      "url": "https://tinyfn.io/mcp/encoding",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

How do I decode a JWT token without verifying the signature?

Send the JWT to GET /v1/encode/jwt/decode or use the MCP tool in your AI editor. Returns the decoded header and payload as JSON objects.

What's the difference between JWT decode and JWT verify?

Decode extracts the header and payload without cryptographic verification. Verify validates the signature against a secret — decode is faster for inspection, verify ensures authenticity.

Can I use this JWT decoder in Claude Code or Cursor for debugging?

Yes, the MCP integration lets AI agents decode JWTs directly in your editor. Great for troubleshooting authentication issues or inspecting token expiration times.

What format does the decoded JWT output use?

Returns a JSON object with separate 'header' and 'payload' fields, each containing the decoded claims. The signature portion is ignored during decoding.

Will this work with expired or invalid JWT tokens?

Yes, since there's no signature verification, it decodes any properly formatted JWT regardless of expiration or validity. Only checks base64 structure, not cryptographic integrity.

Try Jwt Decode Now

Get your free API key and start using Jwt Decode in seconds.

Get Free API Key