Free Online JWT Debugger & Decoder
Paste a JSON Web Token to read its header, payload claims and expiry time. The signature is not verified.
{}
{}
How to Use the JWT Debugger
Paste the Token
Paste your JSON Web Token (header.payload.signature) or load the sample token.
Read the Header & Claims
The header and the payload claims are shown as readable JSON.
Check the Expiry
If the token has an "exp" claim, the tool shows whether it has passed, using your device clock.
What is a JWT?
A JSON Web Token (JWT, defined in RFC 7519) is a small piece of text that carries information, called claims, between two systems. It is often used to show that a user is logged in. Because it is a single string, it is easy to send in a header or a cookie.
The three parts of a JWT
A JWT has three parts separated by dots: Header.Payload.Signature.
and the token type
who the user is
was not changed
The header and payload are only encoded, not encrypted. Anyone who has the token can read them. Never put passwords or private data in a JWT.
Standard claims
You can add your own claims, but RFC 7519 defines these standard ones:
| Claim | Name | What it means |
|---|---|---|
| iss | Issuer | Who created the token. |
| sub | Subject | Who the token is about, such as a user ID. |
| aud | Audience | Who the token is meant for. A server should check that this is itself. |
| exp | Expiration time | The time after which the token must not be accepted. |
| nbf | Not before | The time before which the token must not be accepted. |
| iat | Issued at | The time the token was created. |
| jti | JWT ID | A unique ID for the token. |
Signing: HS256 and RS256
- HS256 (and HS384, HS512): one shared secret signs and verifies the token. Every service that checks tokens must hold the secret.
- RS256 and ES256: a private key signs the token and a public key verifies it. Services that only check tokens never see the private key.
Common mistakes
- Trusting alg "none": a token can claim to have no signature. Always tell your server which algorithms are allowed.
- Mixing algorithms: if a server expects RS256 but also accepts HS256, an attacker may sign a fake token with the public key. Allow one algorithm only.
- Not checking claims: check
exp,issandaudas well as the signature. - Storing the token in localStorage: a cross-site scripting bug can steal it. An HttpOnly cookie is often safer.
Verify a JWT in code
Always verify the signature and check the claims with a trusted library.
Node.js (jsonwebtoken)
const jwt = require('jsonwebtoken');
try {
const decoded = jwt.verify(tokenString, publicKey, {
algorithms: ['RS256'],
issuer: 'https://auth.example.com',
audience: 'https://api.example.com'
});
console.log('User:', decoded.sub);
} catch (err) {
console.error('Invalid token:', err.message);
}Python (PyJWT)
import jwt
try:
payload = jwt.decode(
token_string,
public_key,
algorithms=["RS256"],
issuer="https://auth.example.com",
audience="https://api.example.com",
leeway=30 # allow 30 seconds of clock difference
)
print("User:", payload["sub"])
except jwt.ExpiredSignatureError:
print("Token has expired")
except jwt.InvalidTokenError as e:
print("Token invalid:", str(e))Frequently Asked Questions
Is it safe to paste my token here?
The token is decoded in your browser and is not sent to our server. Even so, a live token can give access to an account, so avoid pasting tokens from a real production system. Use a test token when you can.
What is the difference between decoding and verifying?
Decoding turns the header and payload from Base64URL back into readable JSON. Verifying checks the signature with the right key to prove the token was not changed. This tool only decodes.
Is a JWT encrypted?
No. A normal signed JWT is only encoded, so anyone who has the token can read it. Do not put passwords or other private data inside one.
What do iss, sub, aud, exp, nbf, iat and jti mean?
They are the standard claims from RFC 7519: issuer, subject, audience, expiry time, not-before time, issued-at time and token ID. The three time claims are Unix timestamps in seconds.
What is the difference between HS256 and RS256?
HS256 uses one shared secret to both sign and verify a token. RS256 signs with a private key and verifies with a public key, so a service that only checks tokens never needs the private key.
What is the "none" algorithm problem?
A JWT header can say the algorithm is "none", which means no signature. A server that trusts the header can be tricked into accepting a forged token. Always set the allowed algorithms on the server.
Where should I store a JWT in a web app?
Many teams keep it in an HttpOnly, Secure cookie, because page scripts cannot read it. Storing it in localStorage exposes it if the site has a cross-site scripting bug. The right choice depends on your app.