Decode and inspect JWT tokens online without verification. Instantly view the header, payload claims, and expiration date — all processed locally in your browser.
What is JWT Decoder?
JWT Decoder is a free online tool that lets you decode JSON Web
Tokens (JWTs) without requiring a secret key or verification
step. A JWT consists of three parts separated by dots: a
Base64url-encoded header, a Base64url-encoded payload, and a
signature. This tool decodes the first two parts and displays
all claims in a structured table with human-readable timestamps
and expiry calculations.
When to use it?
Use the JWT Decoder whenever you need to quickly inspect the
contents of a JWT during development or debugging. It is
especially useful when troubleshooting authentication and
authorization flows, verifying that tokens contain the correct
claims before sending them to an API, or checking whether a
token has expired.
Common use cases
Developers commonly use JWT Decoder to inspect access tokens and
refresh tokens issued by OAuth 2.0 providers, debug
authentication middleware by verifying token payloads, check
token expiration times to understand session lifetimes, examine
custom claims embedded in tokens for role-based access control,
and validate that token headers specify the expected signing
algorithm.
JWT token structure explained
A JSON Web Token consists of three Base64URL-encoded parts separated by dots: the header, payload, and signature. The header specifies the signing algorithm (typically HS256 or RS256) and the token type. The payload contains claims — standardized fields like iss (issuer), exp (expiration), sub (subject), and iat (issued at) — plus any custom data your application needs. The signature verifies that the token hasn't been tampered with by hashing the header and payload with a secret key or RSA private key.
HS256 vs RS256: Which algorithm to use
| Feature | HS256 (HMAC) | RS256 (RSA) |
| Key type | Shared secret | Public/private key pair |
| Verification | Requires the secret | Public key only |
| Performance | Faster | Slower (asymmetric) |
| Best for | Single-service apps | Microservices, OIDC, third-party verification |
Use HS256 when the same service creates and verifies tokens. Use RS256 when multiple services need to verify tokens without sharing a secret — common in OAuth 2.0 and OpenID Connect architectures.
JWT security best practices
Never store sensitive data like passwords in the JWT payload — it is encoded, not encrypted. Always set expiration times (exp) to limit the damage window if a token is compromised. Validate the alg header on the server side to prevent algorithm confusion attacks. Use HTTPS exclusively — JWTs in transit over HTTP can be intercepted and replayed. Store tokens in HttpOnly cookies instead of localStorage to prevent XSS-based theft. Implement token refresh flows so short-lived access tokens can be renewed without re-authentication.