JWT Decoder
Decode JSON Web Tokens (JWT) locally, inspect Header & Payload claims, and check expiration status instantly.
JWT Decoder
Decode and inspect JSON Web Tokens locally. Check expiration & claims privately.
{
"alg": "HS256",
"typ": "JWT",
"kid": "key_01"
}{
"sub": "usr_94810293",
"name": "Jane Developer",
"role": "admin",
"email": "jane@example.com",
"iat": 1774000000,
"exp": 2524608000
}Signature string present (sample_signature...). To verify signature authenticity, use your server secret key or public key.
What is the JWT Decoder?
The JWT Decoder is a secure, browser-only tool for decoding and inspecting JSON Web Tokens (JWTs). Used universally across modern web applications, OAuth 2.0, OpenID Connect (OIDC), and API authentication, JWTs store encoded claims in a compact three-part string separated by dots: Header, Payload, and Signature.
Developers frequently need to inspect the contents of a JWT to check user roles, permissions (`scope`), issuer (`iss`), subject (`sub`), issued-at time (`iat`), and expiration (`exp`). This tool decodes your token instantly, validates claim structure, and highlights expiration status in real time.
Why Local Client-Side Decoding Is Crucial
JSON Web Tokens often contain sensitive user emails, user IDs, organizational permissions, session flags, and sometimes authorization bearer tokens. Sending JWTs to an untrusted third-party server exposes your user credentials and session tokens to potential logging or intercept attacks.
Our JWT Decoder decodes tokens entirely in your browser using client-side Base64URL decoding â no network requests are ever made.
Key Features
- Instant Header & Payload Parsing: Separates algorithm (`alg`), key ID (`kid`), payload claims, and signature.
- Real-Time Expiration Check: Automatically converts Unix `exp` and `nbf` timestamps into human-readable local/UTC dates and calculates remaining token lifespan.
- Status Badges: Shows ACTIVE, EXPIRED, or NOT YET VALID status badges with countdown timer.
- Formatted JSON View: Formats parsed header and payload as clean, highlighted JSON with one-click copy.
- Sample Token Generator: Load pre-configured sample JWTs to test the decoder.
How Does the JWT Decoder Work?
1. Paste your JWT string (`eyJhbGciOi...`) into the input box.
2. View Automatic Breakdown:
- Header (Red): Algorithm, token type, key ID.
- Payload (Purple): Claims, roles, user ID, expiration.
- Signature (Cyan): Cryptographic signature verification status.
3. Check Expiration: Inspect the token status badge (Active vs Expired) and remaining time.
4. Copy Output: Click Copy Payload or Copy Header as formatted JSON.
Formula & Calculation Method
JWT Structure:
Token = Header (Base64Url) + "." + Payload (Base64Url) + "." + Signature
Expiration Calculation:
Remaining Time = Token.exp (seconds) - (Date.now() / 1000)
If Remaining Time > 0 => Status = ACTIVE
If Remaining Time <= 0 => Status = EXPIRED
Example Calculation
Sample Payload Claim:
```json
{
"sub": "usr_94810293",
"name": "Jane Developer",
"role": "admin",
"iat": 1774000000,
"exp": 1774003600
}
```
- Issued At (iat): 2026-03-19 12:00:00 UTC
- Expires At (exp): 2026-03-19 13:00:00 UTC
- Lifespan: 1 hour (3,600 seconds)
Frequently Asked Questions
**JWT Structure:** Token = Header (Base64Url) + "." + Payload (Base64Url) + "." + Signature **Expiration Calculation:** Remaining Time = Token.exp (seconds) - (Date.now() / 1000) If Remaining Time > 0 => Status = ACTIVE If Remaining Time <= 0 => Status = EXPIRED
Disclaimer: All developer utilities run 100% locally in your browser. None of your code, tokens, passwords, or input data are sent to or stored on remote servers.