Decode & Inspect

JWT Decode API

Decode JSON Web Tokens and inspect the header, payload, and expiration — all with a single POST request. No JWT libraries required.

What You Get Back

Header

Algorithm (alg), token type (typ), and key ID (kid)

Payload

All claims — sub, iss, aud, iat, exp, and custom claims

Expiry Info

Parsed expiresAt timestamp and isExpired boolean

Code Examples

cURL

curl -X POST "https://api-snap.com/api/jwt-decode" \
  -H "Authorization: Bearer snp_your_key" \
  -H "Content-Type: application/json" \
  -d '{"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."}'

JavaScript

const res = await fetch("https://api-snap.com/api/jwt-decode", {
  method: "POST",
  headers: {
    Authorization: "Bearer snp_your_key",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ token: jwtString }),
});
const { header, payload, expiresAt } = await res.json();

Python

import requests

r = requests.post(
    "https://api-snap.com/api/jwt-decode",
    json={"token": jwt_string},
    headers={"Authorization": "Bearer snp_your_key"},
)
data = r.json()
print(f"Algorithm: {data['header']['alg']}")
print(f"Expires: {data['expiresAt']}")

Common Use Cases

Debugging auth flows

Inspect JWT contents during development without installing jwt-decode

Token monitoring

Check expiration times in monitoring dashboards and alerting systems

Admin panels

Display decoded token info in admin tools for support and debugging

Webhook verification

Decode incoming JWT-signed webhooks to inspect claims before verification

Start Decoding JWTs

Inspect any JWT — header, payload, and expiry. One API call.

Get Your Free API Key