FIRST CH TOOLS / Dev / 24 JWT DECODER
JWT Decoder & Expiry Checker
Paste a JWT to see its JSON and the time left before it expires. Everything runs on this device.
What it does, in more detail
The header and payload appear as formatted JSON, and the time left before exp is drawn on a bar. The traps that cost the most debugging time — an expired token, a clock difference, alg: none, milliseconds used where seconds belong — are called out as you paste. Add the secret or public key and the signature is verified as well (HS / RS / PS / ES / EdDSA). A token or key typed into the page is never sent anywhere.
Header and payload as formatted JSON
Paste a JWT and its header (how it is signed), payload (the claims) and signature appear here. Just looking?
—
What each claim means, and when
Add the key and the signature is checked here
Providers that publish their signing keys (Auth0, Firebase, Cognito, Keycloak and others) serve a JWKS at https://<issuer>/.well-known/jwks.json. Paste that document here as it is and the key matching the header's kid is picked automatically — this page never fetches anything, so copy it across yourself. If all you have is a certificate, pull the public key out with openssl x509 -pubkey -noout -in cert.pem.
Share how clock skew flips the verdict
A fictional token with a 15-minute lifetime, checked at five moments around exp with the default skew of common libraries (0 s, 60 s, 5 min). The verdicts use the same calculation as this page. The token and key you pasted above are never put on the card.
How to Use
- Paste the tokenDrop the JWT in as it is. An Authorization: Bearer … header, surrounding quotes and line breaks inside the token are all stripped for you.
- Read the statusThe expiry status and the time left appear right under the input, followed by a one-line verdict such as "Valid. It expires in 14m". The bar shows where you are between issue (iat) and expiry (exp); the Claims tab explains each claim and turns the timestamps into dates.
- Check the signatureOn the "Verify signature" tab, enter the shared secret (HS256 and friends) or the public key (RS256 and friends) and the signature is verified on the spot. Decoding alone tells you nothing about tampering.
About This Tool
A JWT is three base64url segments — header, payload and signature — joined by dots. base64url is not encryption. Anyone holding the token can read what is inside, which is exactly why passwords, API keys and card numbers must never be put in a payload. This page takes advantage of that same property: it decodes everything locally, with no network request at all.
Decoding is not verification. Anybody can decode a token; proving it has not been altered since it was signed needs the key. The "Verify signature" tab uses the browser's built-in Web Crypto to check HS256/384/512 (shared secret), RS256/384/512, PS256/384/512, ES256/384/512 (public key) and EdDSA. The key you type stays on this device — but getting into the habit of pasting production private keys anywhere is itself the risk, so use test keys here.
exp is counted in seconds since 1 January 1970. JavaScript's Date.now() returns milliseconds, and forgetting to divide by 1000 is one of the most common JWT bugs there is — the token then expires tens of thousands of years from now. This page detects timestamps whose magnitude is wrong and says so. The opposite symptom, a token being rejected while it still looks valid, is usually a clock difference between machines; switch the tolerance (leeway) to see which side of the boundary you are on.
A real-world example: whether a token 45 seconds past exp is accepted depends on the library. RFC 7519 lets implementers allow "some small leeway, usually no more than a few minutes" when checking exp and nbf, and the default differs from library to library. Node.js jsonwebtoken uses 0 seconds unless clockTolerance is set, PyJWT's leeway defaults to 0, Spring Security's Resource Server uses 60 seconds, and .NET's Microsoft.IdentityModel (TokenValidationParameters.DefaultClockSkew) uses 300 seconds (5 minutes). So when a 15-minute token is 45 seconds past exp, jsonwebtoken and PyJWT reject it as expired while Spring Security and .NET still accept it (the card above and "Open this case above" compute exactly this with this page's checker). When a token "works on one server and gets a 401 on another", suspect these defaults as well as the clocks themselves.
alg: none is the most famous JWT vulnerability there is. An attacker strips the signature, rewrites alg to none, and a library that trusts the header treats the token as needing no signature. The same family includes taking an RS256 token, changing it to HS256 and making the server use its public key as an HMAC secret. The rule is that the receiving side decides which algorithm it accepts: never trust the alg written in the token.
iss (issuer), aud (audience), exp, nbf, iat, sub and jti are the registered claims defined by RFC 7519. Skipping the aud check lets a token minted for one service be replayed against another that trusts the same key. The Claims tab also explains the OpenID Connect additions such as azp, nonce, auth_time and amr.
A string with five segments is a JWE — an encrypted token — and only its header can be read. Decrypting the body requires the recipient's private key, so this page cannot open it (if it could, the encryption would be pointless).
A token pasted into the page never leaves the browser. The page can also be called directly with URL parameters: /en/jwt/?token=eyJhbGciOi… or /en/jwt/?token=…&tab=claims. Be aware that a value in the URL reaches the server as part of the page request and stays in browser history and anywhere the link is shared — keep this route for development tokens and automation.
Sources (checked 2026-11-09)
- Leeway of "no more than a few minutes" for exp / nbf (§4.1.4, §4.1.5); NumericDate is in seconds (§2): RFC 7519 "JSON Web Token (JWT)" rfc-editor.org/rfc/rfc7519.html
- jsonwebtoken (Node.js): the check is clockTimestamp >= payload.exp + (options.clockTolerance || 0), i.e. 0 seconds by default github.com/auth0/node-jsonwebtoken/blob/master/verify.js
- PyJWT: leeway of jwt.decode defaults to 0 pyjwt.readthedocs.io/en/stable/api.html
- Spring Security: "By default, Resource Server configures a clock skew of 60 seconds." docs.spring.io/spring-security/reference/servlet/oauth2/resource-server/jwt.html
- Microsoft.IdentityModel.Tokens (docs for v8.23.0): DefaultClockSkew is "300 seconds (5 minutes)" learn.microsoft.com/…/tokenvalidationparameters.defaultclockskew
From AI Agents
The same decoding, expiry checking and signature verification is available as the jwt_decode tool of the MCP (Model Context Protocol) server @first-ch/tools-mcp, so an AI agent can call it directly without driving a browser. See using these tools from AI agents for setup.
Install
claude mcp add firstch-tools -- npx -y @first-ch/tools-mcp
Examples
# Decode and check the expiry jwt_decode(token="eyJhbGciOiJIUzI1NiJ9...") # Verify the signature with a shared secret jwt_decode(token="eyJ...", key="your-256-bit-secret") # Verify with a public key (PEM / JWK / JWKS) jwt_decode(token="eyJ...", key="-----BEGIN PUBLIC KEY-----\n...") # Allow up to 60 seconds of clock skew jwt_decode(token="eyJ...", clockTolerance=60)