{"uid":"cap_WovZDZxM8eq7sZ8lDPFYm","slug":"jwt-decode-header-payload-expiry-flag-0a86d73a","name":"JWT Decode (Header + Payload, Expiry Flag)","description":"Decode a JWT header and payload (no signature verification); flags expiry.","url":"https://api.24klabs.ai/api/jwt-decode","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"token":{"type":"string"}}},"responseSchema":{"type":"json","example":{"header":{},"payload":{}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_BxcHzMkv-OAwOBr1wa78e","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Decodes a JWT token's header and payload without verifying the signature, and flags whether the token is expired.","exampleAgentPrompt":"Can you decode this JWT for me and tell me what's in the header and payload, and whether it's already expired? Here's the token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c","exampleUseCases":[{"title":"Debugging expired auth token","prompt":"I've got this JWT from a user session and I want to know if it's expired and what claims are inside it — can you decode it and flag the expiry? Token: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyXzQ1NiIsImV4cCI6MTY5MDAwMDAwMH0.abc123"},{"title":"Inspecting third-party JWT payload","prompt":"We received a JWT from a partner service and I need to see the raw header and payload fields — algorithm, token type, subject, issued-at — without verifying the signature. Can you parse it? Token: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJwYXJ0bmVyLmNvbSIsInN1YiI6ImNsaWVudF83OCIsImlhdCI6MTcxMDAwMDAwMH0.xyz"},{"title":"Extracting user ID from API token","prompt":"A user submitted this JWT as their API token and I need to extract the user ID and email from the payload claims to look them up in our database — decode it and show me what's inside: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiI5OTkiLCJlbWFpbCI6InVzZXJAZXhhbXBsZS5jb20ifQ.sig"}],"resultDescription":"Returns the decoded JWT header object (algorithm, type), the decoded payload object (all claims such as sub, iat, exp, iss, aud, and any custom fields), and a boolean or flag indicating whether the token is expired based on the 'exp' claim. No cryptographic signature verification is performed.","failureModes":["Malformed JWT (not three dot-separated base64 segments) returns a parse error","Empty or missing token returns a validation error","Token with no 'exp' claim may return expiry flag as null or false","Non-base64url-encoded segments return a decode error"],"whenToPreferThis":"Use this endpoint when you need to quickly inspect or debug a JWT's contents — reading claims, checking expiry, or extracting user data — without needing to verify the signature. Prefer it over full JWT verification libraries when you don't have the signing secret or public key, or when you only need to read the payload. Not suitable when cryptographic signature validation is required for security-critical flows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T19:02:08.353Z","isFirstParty":false}