Free Tools

JWT Decoder

Client-Side Only

Decode and inspect JWT tokens safely in your browser. No data leaves your device.

Token is CLIENT-SIDE ONLY

Your JWT is decoded entirely in this browser tab using atob(). No network requests are made. This tool decodes only — it does NOT verify the signature (that requires your secret key).

Paste JWT Token

About This Tool

Paste a JWT token in the input box and read the decoded header, payload, and signature in three labeled sections. Each section pretty-prints the JSON with syntax highlighting.

Use it to inspect what an authentication service is putting in your tokens, debug an API that's rejecting your request, or verify the contents of a third-party SSO assertion. Decoding happens entirely in the browser — the token is never sent to a server, which matters because tokens often contain claims you don't want shared.

The decoder does not verify signatures. It shows the algorithm in the header (HS256, RS256, ES256, etc.) so you know what would be needed for verification, but the cryptography happens in your auth library, not here.

A JWT (JSON Web Token) is three base64url-encoded parts separated by dots: header.payload.signature. The header is a JSON object describing the token (algorithm, type, sometimes a key ID). The payload is a JSON object containing the claims (subject, issuer, audience, expiration, plus any custom data). The signature is the HMAC or RSA/ECDSA signature over the encoded header and payload, ensuring tamper resistance. The decoder splits the three parts, base64-decodes the header and payload, and pretty-prints them.

Worked example. Paste a token that starts `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c`. Decoder output. Header: {"alg": "HS256", "typ": "JWT"}. Payload: {"sub": "1234567890", "name": "John Doe", "iat": 1516239022}. Signature: shown as the raw base64 string (not decoded into bytes for display, since it's not human-readable). The header tells you HMAC-SHA256 was used; the payload shows the claims; the signature is what your server verifies with the right key.

The registered claims worth knowing. iss (issuer): who created the token. sub (subject): who the token is about (typically a user ID). aud (audience): who the token is intended for (typically a service identifier). exp (expiration): when the token stops being valid (Unix timestamp in seconds). nbf (not before): when the token starts being valid. iat (issued at): when the token was created. jti (JWT ID): a unique identifier for revocation tracking. Custom claims (your application's user data) live alongside these. The decoder converts the timestamp claims to readable datetimes in your local timezone for quick checking.

Why verification doesn't happen here. To verify the signature, you need the secret (for HMAC algorithms) or the public key (for RSA/ECDSA). Pasting either into a third-party web tool defeats the purpose of having a secret. Verification belongs in your server-side code where the key already lives. The decoder is an inspection tool — debugging "is the payload what I expect?" — not a verification step. If a token decodes here but fails to verify on your server, the signature step is the problem; the contents are fine.

Tokens to never paste publicly. Anything from a production system. Long-lived refresh tokens. Access tokens for paid APIs (Stripe, Twilio). Even short-lived access tokens can leak information about user IDs, emails, or internal data structures. The decoder runs entirely in the browser — nothing transmits over the network — but operational security is a habit, not a feature you can opt into. Use test tokens for inspection; let your server-side libraries handle live tokens.

The about text and FAQ on this page were drafted with AI assistance and reviewed by a member of the Coherence Daddy team before publishing. See our Content Policy for editorial standards.

Frequently Asked Questions

Why isn't the signature verified?
Verification needs the secret (HS-family) or public key (RS/ES-family). Pasting either into a web tool defeats the purpose. Verify in your server-side code where the key already lives. This tool inspects token contents — the next step in a debugging chain that ends with proper crypto.
What's in the header vs. the payload?
Header carries metadata about the token itself (algorithm, key ID, sometimes content type). Payload carries the claims (subject, issuer, expiration, plus any custom data your app added). The signature binds the two so they can't be tampered with.
Can I decode a JWE (encrypted JWT)?
No — JWE encrypts the payload, so reading it requires the decryption key. This tool handles JWS (signed JWTs only). If your token has 5 dot-separated parts instead of 3, it's a JWE and you'll need a server-side decrypter.
What does "exp" mean and why is mine expired?
exp is the expiration claim, expressed as a Unix timestamp in seconds (not milliseconds). Compare against current time — many bugs come from tokens that worked yesterday and expired silently. The decoder shows the timestamp converted to a readable datetime for quick checking.
Why does my token look different in length each time I generate one?
JWT length depends on payload size. Adding more claims (a long custom user ID, an array of permissions) makes it bigger. There's no fixed length. If your token is much longer than usual, check what's in the payload — sometimes session bloat shows up here first.
Is the data inside a JWT encrypted?
No, only signed (in JWS, the most common form). Anyone who gets the token can decode the payload — the signature only proves it wasn't modified, not that the contents are confidential. For confidentiality, use JWE (encrypted JWTs) — but those are operationally harder and rare in practice.
What's the difference between HS256 and RS256?
HS256 uses a shared secret with HMAC-SHA256 — the same key signs and verifies. RS256 uses asymmetric RSA-SHA256 — a private key signs, a public key verifies. RS256 is preferred when the verifier shouldn't be able to mint tokens (e.g., third-party services verifying your tokens).
Why is my exp claim showing 1729872000?
Because exp is a Unix timestamp in seconds, not milliseconds. 1729872000 corresponds to October 25, 2024 16:00 UTC. The decoder converts this to a readable datetime alongside the raw value. JavaScript's Date constructor takes milliseconds, so multiply by 1000 if you're parsing the value in code.
Can a JWT be revoked?
Not directly — JWTs are stateless. Once issued, they're valid until expiration unless the verifier maintains a blocklist of revoked jti values (which adds state and partially defeats the JWT design). Short expiration (5-15 minutes) plus refresh tokens is the common pattern for handling revocation.
What's the alg=none vulnerability?
Old JWT libraries accepted tokens with the algorithm header set to "none" — meaning no signature was required. Attackers could mint arbitrary tokens by setting alg to "none" and emptying the signature field. Modern libraries refuse alg=none by default. If your library accepts it, upgrade or configure it explicitly.
Should I store JWTs in localStorage or cookies?
Both have tradeoffs. localStorage is simpler but vulnerable to XSS — any script on your page can read the token. Cookies (with HttpOnly and Secure flags) protect against XSS but are vulnerable to CSRF without additional protection (SameSite cookies, CSRF tokens). For most apps, HttpOnly+SameSite cookies are the safer default.
JWT Decoder | Free Tools - Coherence Daddy