JWT Decoder
Decode JWT tokens to inspect header, payload, and expiration.
100% Private — Your files never leave your device.
All processing happens in your browser. Nothing is uploaded to any server.
Header
algHS256
typJWT
Payload
subSubject
1234567890
nameJohn Doe
iatIssued At
Jan 18, 2018, 1:30:22 AM UTC
(1516239022)
Signature
SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Algorithm: HS256. Signature verification requires the secret key and is not performed client-side.
How it works
What Is a JWT?
A JSON Web Token (JWT, pronounced “jot”) is a compact token format defined in RFC 7519. It’s the industry standard for authentication and authorization in modern web applications.
Structure
A JWT consists of three parts separated by dots (.):
eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.dozjgNryP4J3jVmNHl0w5N_XgL0n3I9PlFUP0THsR8U
└──────── Header ────────┘└──────── Payload ────────┘└──────────── Signature ────────────┘
- Header — Algorithm (
alg) and token type (typ) - Payload — Claims (user data, permissions, expiry)
- Signature — Cryptographic verification of header + payload
Standard Claims
| Claim | Full Name | Description |
|---|---|---|
iss | Issuer | Who created and signed the token |
sub | Subject | Who the token is about (usually user ID) |
aud | Audience | Who the token is intended for |
exp | Expiration | Unix timestamp when the token expires |
nbf | Not Before | Unix timestamp before which the token is invalid |
iat | Issued At | Unix timestamp when the token was created |
jti | JWT ID | Unique identifier to prevent token replay |
Common Algorithms
| Algorithm | Type | Key | Use Case |
|---|---|---|---|
| HS256 | HMAC | Shared secret | Simple apps, single-server |
| HS384 | HMAC | Shared secret | Higher security HMAC |
| RS256 | RSA | Public/private key pair | Distributed systems, microservices |
| ES256 | ECDSA | Public/private key pair | Mobile apps, IoT (smaller keys) |
Security Best Practices
- Always verify signatures server-side before trusting claims
- Check
exp— never accept expired tokens - Validate
issandaud— ensure the token is from the expected source - Use short expiration times — 15 minutes for access tokens, hours/days for refresh tokens
- Never store sensitive data in the payload — it’s readable by anyone with the token
- Use HTTPS — JWTs sent over HTTP can be intercepted
Privacy
This decoder runs entirely in your browser. Your JWT is never sent to any server. The token is split on dots, Base64URL-decoded, and JSON-parsed using native JavaScript functions.
Real-World Examples
Debugging an expired authentication token
A developer's API calls are returning 401 Unauthorized. Pasting the JWT into the decoder reveals the 'exp' claim is set to 1704067200 (January 1, 2024), which has already passed. The expiry badge shows 'Expired 2 years ago' in red. The fix is to refresh the token using the refresh token endpoint.
Inspecting user roles from an OAuth token
A team lead needs to verify what permissions a user's token grants. The decoder shows the payload contains 'role: admin' and 'scope: read write'. The header reveals it uses RS256 (RSA + SHA-256), meaning the server uses public/private key pairs for signing — more secure than HMAC-based tokens.
Verifying a token's issuer and audience
Before accepting a JWT from a third-party service, a developer checks the 'iss' (issuer) and 'aud' (audience) claims. The decoder shows 'iss: auth.example.com' and 'aud: api.example.com', confirming the token was issued by the correct auth server for the correct API. This is a critical security check to prevent token misuse.
Frequently Asked Questions
What is a JWT (JSON Web Token)?
Does this tool verify the JWT signature?
What are JWT claims?
Is it safe to decode JWTs in the browser?
What is the difference between HS256 and RS256?
What does Base64URL encoding mean?
Related Calculators
Base64 Encode/Decode
Encode text or files to Base64 and decode Base64 back instantly.
JSON Formatter
Format, validate, and beautify JSON with syntax highlighting.
URL Encode/Decode
URL-encode and decode text instantly. Supports component and full URI modes.
Password Generator
Generate strong, random passwords with customizable options.
CSV ↔ JSON Converter
Convert between CSV and JSON formats. Paste or upload, download instantly.