Decode and inspect JWT header, payload, and claims instantly. Shows expiry status and all token fields — fully private, nothing sent to a server.
Paste a JWT token and click Decode
Header, payload, and signature decoded and displayed
A JSON Web Token (JWT) is an open standard (RFC 7519) defining a compact, URL-safe container for securely transmitting claims between distributed parties. JWTs are ubiquitously utilized in modern OAuth 2.0 and OpenID Connect identity architectures as stateless authentication bearer tokens.
A standard JWT string consists of three separate base64url-encoded parts delimited by periods (.):
header.payload.signature
| Token Segment | Typical Contents | Function |
|---|---|---|
| Header | {"alg": "HS256", "typ": "JWT"} | Specifies cryptographic signing algorithm and token format |
| Payload (Claims) | {"sub": "123", "name": "Alice", "exp": 1789929600} | Contains identity claims, permissions, and expiration timestamps |
| Signature | Cryptographic HMAC or RSA hash | Verifies token integrity and authenticity using private key or secret |
iss (Issuer): Principal issuing the JWT.sub (Subject): Unique user or client ID.exp (Expiration Time): Unix timestamp past which the token must be rejected.nbf (Not Before): Unix timestamp before which the token cannot be accepted.iat (Issued At): Timestamp marking token creation.JavaScript
function decodeJwtPayload(token) {
try {
const base64Url = token.split('.')[1];
const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');
const jsonPayload = decodeURIComponent(
atob(base64)
.split('')
.map(c => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2))
.join('')
);
return JSON.parse(jsonPayload);
} catch (err) {
return { error: 'Invalid JWT format' };
}
}
This website and utility are provided for general informational, calculation, and educational purposes only. Always verify critical computation outputs prior to professional deployment or financial use. See our Terms of Service and Privacy Policy for full governance details.