Free JWT Decoder — Decode, Verify & Build JSON Web Tokens
Decode any JWT instantly — see header, payload, and all claims with explanations. Verify HS256/RS256/ES256 signatures using the Web Crypto API. Build and sign new tokens. Every claim is explained. No server, no account — 100% browser-based.
Header
Algorithm: HS256
HMAC + SHA-256 — symmetric, shared secret
Type: JWT
{
"alg": "HS256",
"typ": "JWT"
}Payload — Claims
6 claims
subSubjectWho the token refers to — typically a user ID
user_12345
nameNameFull name of the authenticated user
John Doe
emailEmailUser's email address
john@example.com
roleRoleSingle role assigned to the user
admin
iatIssued AtUnix timestamp recording when the token was created
1738000000
expExpirationUnix timestamp — token must be rejected after this time
1769536000
Signature
The signature prevents tampering. It is computed as HS256(base64url(header) + "." + base64url(payload), secret). Decoding a JWT does not require the secret — anyone can read the payload. Only verification requires the key.
placeholder_signature_for_demoDecode Any JWT Instantly
Paste any JWT and instantly see the decoded header, payload, and signature. Every claim is explained — iss, sub, aud, exp, iat, nbf, jti, and all standard OIDC claims.
Expiry & Timing Analysis
Timestamp claims (exp, nbf, iat) display as human-readable dates with VALID / EXPIRED / NOT YET badges and relative times like '2h 14m ago'. Expired tokens are flagged immediately.
Signature Verification
Verify HS256/HS384/HS512 with a secret, and RS256/RS384/RS512/ES256/ES384/ES512/PS256+ with a PEM public key — using the Web Crypto API directly in your browser. No server involved.
JWT Builder
Build and sign a JWT from scratch — add custom claims, use quick-add buttons for iss/sub/exp/iat/jti, select HS256/384/512, enter your secret, and generate a signed token instantly.
Security Warning System
Automatically flags dangerous patterns: alg:none tokens, expired tokens, nbf violations, missing algorithm claims, and known insecure configurations — before you copy or use the token.
100% Private
All decoding, verification, and signing happens in your browser using the Web Crypto API. No JWT is ever sent to any server. Works offline. No account, no tracking.
Sponsored
Related Tools
JSON Formatter
Format, validate, and auto-repair JSON with live preview, syntax error detection, sort keys A-Z, and one-click copy or download
JSON Minifier
Compress JSON by removing all whitespace. Shows original size, minified size, bytes saved, and percentage reduction.
JSON to CSV Converter
Convert JSON arrays to CSV and CSV back to JSON. Nested object flattening, multi-delimiter support, type detection.
JSON to YAML Converter
Convert JSON to YAML for Kubernetes, Docker Compose, and config files. Also converts YAML back to JSON.
JSON Diff Tool
Compare two JSON objects side-by-side. Color-coded diff showing added, removed, changed, and unchanged keys with dot-notation paths.
JSON Tree Viewer
Visualize JSON as an interactive collapsible tree with color-coded types, live search, and node statistics.
JSON to XML Converter
Convert JSON to well-formed XML with configurable root element. Also converts XML back to JSON using browser DOMParser.
JSON to SQL Converter
Convert JSON arrays to MySQL, PostgreSQL, or SQLite INSERT statements with auto type detection, CREATE TABLE, and batch insert support.
Cron Expression Generator & Explainer
Build cron expressions visually, explain any expression in plain English, preview next 10 run times, and convert to AWS EventBridge, Spring/Quartz, Kubernetes, and GitHub Actions formats.
TODO Formatter
Format and organize TODO comments for better readability.
QR Code Generator
Generate QR codes for URL, WiFi, vCard, UPI payment, WhatsApp, email, SMS, and 5 more types with color customization and logo overlay
Slug Generator
Generate SEO-friendly URL slugs in 8 formats — kebab, snake, camelCase, PascalCase, and more
What Is a JWT? Structure and How It Works
A JSON Web Token is a compact, self-contained string used to securely transmit information between parties. Every JWT is made of three parts, separated by dots:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyXzEyMyIsIm5hbWUiOiJKb2huIERvZSIsImV4cCI6MTc2OTUzNjAwMH0.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c| Part | Color | What it Contains | Requires Key? |
|---|---|---|---|
| Header | Rose/Red | Algorithm (alg), token type (typ), optional key ID (kid) | No — anyone can decode |
| Payload | Violet | Claims: user ID, roles, expiry, any custom fields | No — anyone can decode |
| Signature | Blue | HMAC or RSA/ECDSA signature of header + payload | Yes — needed to verify |
Common misconception: JWTs are NOT encrypted. The payload is just base64url-encoded — any person or tool can read it without a key. Never store passwords, credit card numbers, or secrets in a JWT payload.
Standard JWT Claims — Complete Reference
RFC 7519 defines seven registered claims. OpenID Connect (OIDC) adds additional standard claims for identity tokens. All other claims are application-specific.
| Claim | Full Name | Type | Description |
|---|---|---|---|
| iss | Issuer | String | URI of the application that issued the token |
| sub | Subject | String | Unique identifier of the user or entity the token refers to |
| aud | Audience | String/Array | Service(s) that should accept this token. Must be validated. |
| exp | Expiration Time | Number | Unix timestamp. Token must be rejected after this time. |
| nbf | Not Before | Number | Unix timestamp. Token must be rejected before this time. |
| iat | Issued At | Number | Unix timestamp of when the token was created. |
| jti | JWT ID | String | Unique ID for this token. Used to prevent replay attacks. |
| name | Full Name | String | Full display name of the authenticated user (OIDC). |
| String | Email address of the user (OIDC). | ||
| email_verified | Email Verified | Boolean | Whether the email has been confirmed (OIDC). |
| scope | Scope | String | Space-separated list of OAuth 2.0 scopes granted. |
| azp | Authorized Party | String | Client ID the token was issued to. Used in OIDC. |
JWT Signing Algorithms — Which One Should You Use?
The algorithm is declared in the JWT header's alg field. Choosing the right one depends on your architecture:
| Algorithm | Type | Key | Speed | Best For |
|---|---|---|---|---|
| HS256 | HMAC | Shared secret (32+ bytes) | Very fast | Monolith, single-service apps, internal APIs |
| RS256 | RSA | RSA key pair (2048+ bits) | Moderate | Microservices, third-party token consumers |
| ES256 | ECDSA | EC key pair (P-256) | Fast | Mobile apps, IoT — smaller keys, same security as RS256 |
| PS256 | RSA-PSS | RSA key pair (2048+ bits) | Moderate | FIPS-compliant systems, highest-security requirements |
| none | None | None | — | NEVER USE — critical security vulnerability |
Use HS256 when…
- • You have a single backend that both issues and verifies tokens
- • You can securely store and rotate a shared secret
- • Simplicity and performance are priorities
- • You do NOT share tokens with third-party services
Use RS256/ES256 when…
- • Multiple services need to verify tokens independently
- • You expose a JWKS endpoint for public key distribution
- • Third-party applications consume your tokens
- • You use an identity provider (Auth0, Cognito, Keycloak)
JWT Security Best Practices
Always validate the algorithm
Never let the client or the JWT header dictate which algorithm to use for verification. Hardcode the expected algorithm on the server side. This prevents algorithm confusion attacks (e.g. an attacker swapping RS256 for HS256 and using the public key as the HMAC secret).
Always validate exp, nbf, and aud
Expiry (exp) prevents tokens from being used indefinitely after a user logs out or changes their password. Not Before (nbf) prevents use before the intended time. Audience (aud) prevents a token issued for Service A from being replayed against Service B.
Keep tokens short-lived
Access tokens should expire in 15 minutes to 1 hour. Longer lifetimes mean a stolen token grants access for longer. Use refresh tokens (stored securely in HttpOnly cookies) to issue new access tokens without forcing re-login.
Never store sensitive data in the payload
JWT payloads are only base64url-encoded — anyone can decode them. Never include passwords, API keys, PII beyond what is necessary, or data that would be a problem if leaked. Store minimal data: user ID, roles, expiry.
Use strong, unique secrets
For HS256/384/512, use a secret of at least 32 bytes (256 bits) generated from a cryptographically secure random number generator. Never use predictable strings like 'secret', 'password', or your app name. Rotate secrets regularly and ensure they are not exposed in code repositories.
Implement token revocation for critical actions
JWTs cannot be instantly revoked before expiry. For high-security scenarios (password change, account deletion, privilege change), maintain a short-lived blocklist of revoked JWT IDs (jti claim) or rotate signing keys to invalidate all previously issued tokens.
Frequently Asked Questions
What is a JWT and how does it work?▼
What are the three parts of a JWT?▼
Can I decode a JWT without the secret key?▼
What is the difference between HS256 and RS256?▼
Is a JWT encrypted?▼
What happens when a JWT expires?▼
What is the alg:none vulnerability in JWT?▼
Where should I store JWTs — localStorage or cookies?▼
What is the maximum size of a JWT?▼
What is the difference between JWT and an opaque session token?▼
What are JWKS (JSON Web Key Sets)?▼
What standard JWT claims should every token include?▼
Popular Tools
Most used this week
Image Compress
PopularImage
Age Calculator
HotDate & Time
Fake Chat Generator
TrendingCommunication
BMI Calculator
BMR + TDEEHealth & Fitness
Percentage Calculator
10-in-1Math & Calculators
JSON Formatter
Format + RepairDeveloper
Word Counter
10 StatsText
QR Code Generator
12 TypesDeveloper
Password Generator
Crypto SecureSecurity
SIP Calculator
Step-Up SIPFinance