Instantly decode any JWT token - see the header, payload, and signature breakdown. Free, private, no signup required.
A JSON Web Token (JWT) is a compact, URL-safe token format defined by RFC 7519. It is the most widely used authentication format in modern web applications, REST APIs, and microservices. Every JWT consists of three base64url-encoded parts separated by dots:
Example: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyMTIzIn0.signature
exp, iat, sub, roles| Claim | Meaning | Example |
|---|---|---|
sub | Subject (user ID) | "user_123" |
iat | Issued at (Unix timestamp) | 1709000000 |
exp | Expiration time | 1709086400 |
iss | Issuer (who created it) | "api.myapp.com" |
aud | Audience (intended recipient) | "myapp.com" |
exp claim and implement refresh tokens.exp claim, but cannot cryptographically verify the signature without the key.exp (expiration time) claim is a Unix timestamp indicating when the token expires. The iat (issued at) claim shows when it was created. The nbf (not before) claim indicates the earliest time the token is valid. Our decoder converts all three to human-readable dates.alg field.Free, instant, 100% private. No account needed.
Also useful: JSON Tutorials & Guides | FAQ | JSON Validator | JSON to TypeScript
A JWT consists of three base64url-encoded parts separated by dots: header, payload, and signature. Here is a real example broken down:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkFsaWNlIiwiaWF0IjoxNzAwMDAwMDAwLCJleHAiOjE3MDAwMDM2MDB9.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Decoded:
// Header (algorithm & token type)
{
"alg": "HS256",
"typ": "JWT"
}
// Payload (claims)
{
"sub": "1234567890",
"name": "Alice",
"iat": 1700000000,
"exp": 1700003600
}
// Signature = HMACSHA256(base64(header) + "." + base64(payload), secret)
The header and payload are only base64url-encoded — they are not encrypted. Anyone who holds the token can decode and read the claims. The signature is the only part that provides authenticity; it uses a secret or private key and cannot be forged without it.
The JWT specification (RFC 7519) defines a set of standard registered claim names. All are optional but widely supported by libraries and frameworks:
| Claim | Full Name | Type | Description |
|---|---|---|---|
iss |
Issuer | string | Identifies who issued the JWT (e.g., your auth server URL) |
sub |
Subject | string | Identifies the principal (typically user ID) |
aud |
Audience | string/array | Identifies the intended recipient(s) |
exp |
Expiration | number | Unix timestamp after which the token is rejected |
nbf |
Not Before | number | Unix timestamp before which the token is rejected |
iat |
Issued At | number | Unix timestamp when the token was issued |
jti |
JWT ID | string | Unique identifier for this token (prevents replay attacks) |
Implementing JWT correctly requires more than just decoding tokens. Follow these six practices to keep your authentication secure:
aud claim — prevents tokens issued for one service from being accepted by another service in your system.A JWT (JSON Web Token) is a Base64URL-encoded string with three dot-separated parts: header.payload.signature. Decoding is always possible without the secret — the signature only protects against tampering, it does not encrypt the payload.
eyJ...)// A JWT token looks like:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkFsaWNlIiwiaWF0IjoxNzQyODYwMDAwLCJleHAiOjE3NDI5NDY0MDB9.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
// Header (decoded):
{ "alg": "HS256", "typ": "JWT" }
// Payload (decoded):
{ "sub": "1234567890", "name": "Alice", "iat": 1742860000, "exp": 1742946400 }
// Signature: verifies with the secret key
The alg field in the JWT header defines the signing algorithm. Understanding it is essential for validating tokens correctly:
| Algorithm | Type | Key needed to verify | Use case |
|---|---|---|---|
| HS256 | HMAC-SHA256 | Shared secret | Internal APIs, same-service auth |
| HS384 | HMAC-SHA384 | Shared secret | Higher security HMAC variant |
| RS256 | RSA-SHA256 | Public key (asymmetric) | OAuth2, OpenID Connect, multi-service |
| ES256 | ECDSA-SHA256 | EC public key | Mobile apps, smaller token size |
| none | Unsigned | None | ⚠ Insecure — never accept in production |
// JavaScript — decode without verification (read-only)
const [header, payload, sig] = token.split('.');
const decoded = JSON.parse(atob(payload.replace(/-/g,'+').replace(/_/g,'/')));
console.log(decoded); // { sub, name, iat, exp, ... }
// Node.js — verify with jsonwebtoken
const jwt = require('jsonwebtoken');
const data = jwt.verify(token, process.env.JWT_SECRET);
// Python — decode with PyJWT
import jwt
data = jwt.decode(token, SECRET, algorithms=["HS256"])
Also useful: JWT Tutorial | JSON Validator | JSON Schema Validator | Base64 Encoder/Decoder