{"uid":"cap_bU8bZwwgIUxLIm00r6vgt","slug":"decode-jwt-934a7865","name":"Decode JWT","description":"Decode a JWT into its header and payload without verifying the signature, and report expiry and time-to-live. Pure CPU, instant. Use to inspect a token's claims and clock skew.","url":"https://api.gadgethumans.com/jwt-decode?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"input":{"type":"object","properties":{"queryParams":{"type":"object","required":["token"],"properties":{"token":{"type":"string","description":"JWT to decode"}}}}},"output":{"type":"object","properties":{"example":{"ok":true}}}}},"responseSchema":{"type":"json","example":{"ok":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_9462PgPbyG5Z2dV8jC1k-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","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 into its header and payload claims, and reports expiry time and time-to-live, without verifying the signature.","exampleAgentPrompt":"Can you decode this JWT for me and tell me what claims are in it and when it expires? Here's the token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c","exampleUseCases":[{"title":"Debugging expired auth token","prompt":"I'm getting a 401 and I think my token is expired — can you decode this JWT and tell me when it expires and what's left on the TTL? Token: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyXzEyMyIsImV4cCI6MTcwMDAwMDAwMH0.signature"},{"title":"Inspecting claims from an identity provider","prompt":"This JWT came back from our SSO provider — decode it and show me the payload claims, especially the roles and issuer fields. Token: eyJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJhZG1pbiJdLCJpc3MiOiJhdXRoLmV4YW1wbGUuY29tIn0.sig"},{"title":"Checking clock skew in distributed system","prompt":"We're seeing intermittent auth failures across services and I suspect clock skew — decode this JWT and report the issued-at and expiry times so I can compare them to the current server time. Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2OTAwMDAwMDAsImV4cCI6MTY5MDAwMzYwMH0.sig"}],"resultDescription":"Returns the decoded JWT header object, payload claims object, expiry timestamp, and time-to-live in seconds, all without performing signature verification. The ok field confirms success.","failureModes":["Malformed or non-JWT string input returns an error (token cannot be parsed)","Missing required 'token' query parameter results in a bad request error","Token with no expiry claim may return null or zero for TTL fields","Network or server timeout, though unlikely given pure CPU operation"],"whenToPreferThis":"Use this endpoint when you need to quickly inspect the contents of a JWT — its header algorithm, payload claims, subject, issuer, expiry, and remaining TTL — without needing signature verification. Ideal for debugging auth flows, detecting clock skew, logging token metadata, or building middleware that reads claims. It is not a substitute for full token validation in security-critical paths.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T23:43:12.042Z","isFirstParty":false,"canonicalSlug":"decode-jwt-934a7865"}