JWT Decoder
Paste a JWT to inspect it. Tokens are decoded locally in your browser, so you can safely paste a real access token.
Header
—Payload
—Claims
| Paste a token above. |
Signature
—
This tool decodes only. Verifying a signature requires the secret or public key, which should never be pasted into a web page.
What a JWT actually is
A JSON Web Token is three Base64url-encoded parts joined by dots: header.payload.signature. The header names the signing algorithm, the payload carries the claims, and the signature proves the first two parts have not been altered by anyone without the key.
The payload is not encrypted. Anyone holding the token can read every claim in it — exactly what this page does. Never put a password, a card number or anything else sensitive in a JWT.
Standard claims
| Claim | Meaning |
|---|---|
iss | Issuer — who created the token |
sub | Subject — usually the user ID |
aud | Audience — who the token is intended for |
exp | Expiry time, as a Unix timestamp in seconds |
nbf | Not valid before this time |
iat | Issued at |
jti | Unique token ID, used for revocation lists |
Algorithms
| Family | Example | Key model |
|---|---|---|
| HMAC | HS256 | One shared secret signs and verifies. Simple, but every verifier can also mint tokens. |
| RSA | RS256 | Private key signs, public key verifies. The right choice when third parties must verify. |
| ECDSA | ES256 | Same asymmetric model as RSA with much smaller keys and signatures. |
| EdDSA | Ed25519 | Modern, fast, and hard to implement incorrectly. |
Security pitfalls
- The
alg: noneattack. Some old libraries accepted a token with the algorithm set tononeand no signature. Always pin the expected algorithm on the verification side rather than trusting the header. - Algorithm confusion. If a verifier accepts both HS256 and RS256, an attacker can sign a token with the public key as an HMAC secret. Again: pin the algorithm.
- No revocation. A signed token stays valid until it expires. Keep access tokens short-lived (minutes) and use refresh tokens you can revoke server-side.
- Storage. A JWT in
localStorageis readable by any injected script. AnHttpOnly,Secure,SameSitecookie is safer for browser sessions. - Clock skew. Allow a small tolerance (30–60 seconds) when checking
expandnbf, or tokens will fail intermittently across machines.
Frequently asked questions
Is it safe to paste a real token here?
On this page, yes — decoding is done by JavaScript in your browser and there is no backend to receive it. Still treat any token you paste anywhere as potentially compromised, and prefer expired ones for debugging.
Can this tool verify the signature?
No, deliberately. Verification needs the signing secret or public key, and asking you to paste a secret into a web page would be bad practice regardless of how the page behaves.
Why is my token rejected as malformed?
A JWT must have exactly two dots. Common causes are a truncated copy, a leading Bearer prefix left in, or whitespace inserted by line wrapping.
Is a JWT encrypted?
No. A standard JWT (JWS) is signed, not encrypted, so the payload is readable by anyone. Encrypted tokens exist as a separate standard, JWE, and look different — five parts instead of three.
How long should a token last?
Access tokens: 5–15 minutes. Refresh tokens: days or weeks, stored securely and revocable. Long-lived access tokens are the most common JWT mistake because there is no way to cancel them.