What is JWT Decoder?
A JWT Decoder is a debugging tool for developers working with JSON Web Tokens (RFC 7519). JWTs are a compact, URL-safe means of representing claims to be transferred between two parties. They are widely used for authentication (logging in) and information exchange. A JWT consists of three parts: Header, Payload, and Signature. This tool decodes the Base64Url encoded strings to reveal the human-readable JSON content within the Header and Payload. It allows you to verify the token's structure, check expiration times (exp), issuer (iss), and custom claims without needing a backend server.
Input Formats
- JWT String (header.payload.signature)
- Bearer Token
Output Results
- Decoded Header (JSON)
- Decoded Payload (JSON)
- Signature status (structure check only)
Key Features
Who is this for?
Auth Debugging
Frontend developers checking if a user's token contains the correct roles or permissions.
Session Expiry
Verifying the 'exp' (expiration) claim to understand why a user is being logged out.
API Integration
Backend developers inspecting tokens received from third-party providers to ensure correct claims.
How to Use
Paste your JWT into the input area.
The tool automatically splits and decodes the Header and Payload.
Review the JSON output.
Hover over timestamp fields (iat, exp) to see human-readable dates.
Examples
Input
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5cOutput
Header: { "alg": "HS256", "typ": "JWT" }
Payload: { "sub": "1234567890", "name": "John Doe", "iat": 1516239022 }Common Errors
- Pasting only the payload instead of the full token
- Confusing Decoding with Verifying (we don't check the signature validity against a secret)
- Using expired tokens
Code Examples
JavaScript
function parseJwt (token) {
var base64Url = token.split('.')[1];
var base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');
var jsonPayload = decodeURIComponent(window.atob(base64).split('').map(function(c) {
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
}).join(''));
return JSON.parse(jsonPayload);
}