JWT decoder
Decode a token's header and payload — locally, never sent anywhere. Private
—
—
How to use the JWT decoder
- Paste a JSON Web Token — the eyJ… string from an Authorization header, a cookie or your framework's session store.
- The header (algorithm and type) and payload (the claims) decode instantly as pretty-printed JSON. No secret is needed for this — JWTs are encoded, not encrypted.
- Check the timestamp line under the payload: exp (flagged EXPIRED or valid), iat (issued) and nbf (not before), converted from Unix seconds to your local time.
- To check an HS256 signature, enter the signing secret — you'll get “✓ Signature valid” or “✕ Signature does not match”, computed locally.
- If the token uses another algorithm (say RS256), the tool tells you so rather than guessing — signature checking here is HS256 only.
Common uses
- Debug a 401: decode the token your app actually sent and see whether it's expired, missing a claim, or scoped to the wrong audience.
- Inspect what your identity provider (Auth0, Firebase, Cognito, Keycloak…) actually puts inside its access and ID tokens — roles, scopes, emails.
- Verify a webhook or internal service token signed with a shared HS256 secret, without writing a script.
- Check how much lifetime a token gets: compare iat and exp to see the TTL your auth server issues.
- Confirm a token was signed with the secret you think it was — a mismatch explains “invalid signature” errors between services.
Tips & limitations
- Anyone can decode a JWT's payload — it's Base64URL, not encryption. Never put secrets or sensitive personal data in claims, and treat any token as readable by whoever holds it.
- Decoding is not verification: the payload displays even for a tampered or unsigned token. Trust claims only after the signature is checked — here for HS256, or by your server for anything else.
- Verification here covers HS256 only. RS256/ES256 tokens (most cloud identity providers) verify against a public key — this tool still decodes them and names the algorithm, it just can't check the signature.
- A stray space or line break inside a pasted token breaks Base64URL decoding — paste the raw three-part string only. Whitespace at the ends is trimmed automatically.
How it's built & why it's safe
Decoding is plain Base64URL parsing done in JavaScript, with proper UTF-8 handling and JSON pretty-printing — the token never leaves the page. The optional HS256 check imports your secret with the Web Crypto API (crypto.subtle) and verifies the HMAC-SHA-256 signature over header.payload locally. Nothing is sent, logged or stored — which is the point: pasting a live production token into a random website is how tokens leak, so this one stays on your machine.
Related tools: Base64 Encoder / Decoder · JSON Formatter · Timestamp Converter
Further reading: JWTs explained: what's inside a token and how to debug it · Why Toolkit runs entirely in your browser (and why that matters)
Frequently asked questions
Is it safe to paste a real token here?
The token is decoded entirely in your browser and never transmitted, so nothing leaks from this page. Still, treat any token as a credential — if it grants real access and may have been exposed elsewhere, rotate it.
Why can I read the payload without any secret?
Because JWTs are signed, not encrypted — Base64URL is an encoding anyone can undo. The signature lets a server detect tampering; it does nothing to hide the contents.
Can it verify RS256 tokens?
No — signature checking supports HS256 (HMAC-SHA-256 with a shared secret) only, and the tool tells you which algorithm your token actually uses. RS256 verification needs the issuer's public key; decoding the header and payload works regardless.
What do exp, iat and nbf mean?
They're registered claims holding Unix timestamps: exp is when the token stops being valid, iat is when it was issued, and nbf is the earliest moment it may be used. The tool converts each to your local time.
Why does it say EXPIRED when my server still accepts the token?
Expiry is compared against your device's clock, and many servers allow a small leeway (often 30–60 seconds) for clock skew. A token near its boundary can be judged differently by the two — check your machine's time before blaming the server.
Does entering the signing secret expose it?
No — the HMAC verification runs through the browser's Web Crypto API on your device, and the secret is never sent anywhere. Even so, prefer testing with a development secret rather than a production one when you can.
What if my token only has two parts?
It still decodes: header and payload are enough to display, and the signature check is simply skipped. A missing third segment usually means an unsigned token or a truncated copy-paste.