JWT decoder
Decode the header and payload of a JSON Web Token and show its times, without verifying it.
Input
Result
Fill in the input and press Run.
Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.
Use it from code or an agent
curl -s https://setget.net/v1/tools/jwt-decode \
-H 'Content-Type: application/json' \
-d '{"input":{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}}'
import json, urllib.request
body = {'input': {'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c'}}
request = urllib.request.Request("https://setget.net/v1/tools/jwt-decode", json.dumps(body).encode(),
{"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/jwt-decode", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"input":{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
"slug": "jwt-decode",
"input": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}
}
{
"input": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}
}
Endpoint: POST /v1/tools/jwt-decode. Over MCP: run_tool with slug: "jwt-decode".
Machine-readable: input schema, Markdown. Connect an agent.
Inputs
| Name | Type | Required | What it does |
|---|---|---|---|
token |
string | yes | The JWT to decode. Use a test or expired token, never a live one. |
now |
string | no | The time to compare "exp" and "nbf" against, as an ISO 8601 time. Adds the "expired" flag. Left out, no comparison is made. |
Examples
Input
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}Result
{
"header": {
"alg": "HS256",
"typ": "JWT"
},
"payload": {
"sub": "1234567890",
"name": "John Doe",
"iat": 1516239022
},
"signature": "SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
"algorithm": "HS256",
"times": {
"iat": "2018-01-18T01:30:22Z"
},
"verified": false
}Checking expiry against a given time
Input
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI0MiIsIm5iZiI6MTY5OTk5NjQwMCwiZXhwIjoxNzAwMDAwMDAwfQ.c2lnbmF0dXJl",
"now": "2024-01-01T00:00:00Z"
}Result
{
"header": {
"alg": "HS256",
"typ": "JWT"
},
"payload": {
"sub": "42",
"nbf": 1699996400,
"exp": 1700000000
},
"signature": "c2lnbmF0dXJl",
"algorithm": "HS256",
"times": {
"exp": "2023-11-14T22:13:20Z",
"nbf": "2023-11-14T21:13:20Z"
},
"verified": false,
"now": "2024-01-01T00:00:00Z",
"expired": true,
"not_yet_valid": false
}Questions
- Does this verify the signature?
- No. It only decodes. A decoded token proves nothing about who made it, so never trust its contents without verifying the signature in your own code.
- Is it safe to paste a live token?
- No. A valid token works like a password until it expires. Never paste live tokens into any online tool; use an expired or test token.
- Is the payload encrypted?
- No. The header and payload of a signed JWT are only base64url-encoded, so anyone holding the token can read them.
- Why is there no "expired" flag?
- The tool never reads the clock. Send the current time as "now" to have "exp" and "nbf" compared against it.
Related tools
- Base64 encoder and decoderEncode text to Base64 or decode it back, in the standard or URL-safe alphabet.
base64 - HMAC generatorCompute an HMAC signature of a message with a secret key, as hex or base64.
hmac - JSON formatterPretty-print JSON with your choice of indentation, optionally sorting keys.
json-format - UUID inspectorCheck a UUID and read its version, variant and, for time-based versions, its timestamp.
uuid-inspect - All hashes at onceCompute every supported hash of one input at once: MD5, SHA-1, SHA-2, SHA3-256 and BLAKE2b.
hash-all - Base32 encoder and decoderEncode text to Base32 (RFC 4648) or decode it back, with or without padding.
base32