JWT Decoder
Decode and inspect JSON Web Tokens. Header and payload are decoded — signature is not verified. Runs entirely in your browser.
What is a JWT (JSON Web Token) and How Does JWT Authentication Work?
A JWT represents claims in a compact format. This decoder inspects supported three-part JWS-style tokens; it does not validate signatures, establish trust, or decrypt five-part JWE tokens.
Understanding the Three Parts of a JWT Token
- Header — Contains the token type (
"typ": "JWT") and the signing algorithm ("alg": "HS256","RS256", etc.). Decoded from the first Base64URL segment. - Payload — Contains the claims — the actual data. Standard claims include
sub(subject/user ID),iss(issuer),exp(expiration time),iat(issued at), andaud(audience). Custom claims can contain any application-specific data. - Signature — Created by signing the header and payload with a secret key (HMAC) or private key (RSA/ECDSA). This tool does not verify signatures — it only decodes the header and payload.
Common Debugging Scenarios for JWT Tokens
- Checking if a token has expired — Compare the
expclaim against the current time to diagnose 401 Unauthorized errors - Inspecting user roles and permissions — View custom claims like
role,scope, orpermissionsembedded in the payload - Debugging OAuth 2.0 access tokens — Inspect tokens from providers like Auth0, Okta, Azure AD, AWS Cognito, or Firebase
- Verifying token issuer and audience — Ensure
issandaudclaims match your expected values - Understanding token structure for API integration — See exactly what data is included in access tokens and ID tokens
Is It Safe to Paste JWT Tokens Into an Online Decoder?
Use nonsensitive example tokens rather than active production credentials. Decoding runs locally, but shared website features can make network requests and optional drafts can retain input. A JWT may expose readable claims and act as a bearer credential; local decoding is not a guarantee of safe handling.
JWT Security Best Practices
- Always set an expiration time (
exp) — never issue tokens that last forever - Use RS256 (asymmetric) instead of HS256 (symmetric) for public-facing APIs
- HttpOnly cookies prevent JavaScript from reading the cookie, not XSS itself. Injected scripts can still make authenticated requests; use XSS defenses, Secure/SameSite settings, and appropriate CSRF protection.
- Never store sensitive data (passwords, credit cards) in JWT payloads — they are Base64-encoded, not encrypted
- Implement token refresh rotation to limit the window of a stolen token
Frequently Asked Questions
The decoder splits the JWT into its three Base64Url-encoded parts (header, payload, signature), decodes the header and payload using JavaScript's atob() function, and displays the resulting JSON. It also checks the exp and nbf claims to show if the token is expired.
Decoding runs locally, but shared page features may use the network and browser drafts may retain text. Use a non-sensitive example token. Supported JWS-style payloads are Base64url encoded, not encrypted; decoding does not verify a signature.
This tool decodes and inspects the token contents but does not verify the cryptographic signature. Signature verification requires the secret key (HS256) or public key (RS256), which should be done server-side. The tool is designed for inspection and debugging, not authentication.
The tool displays all claims in both the header (alg, typ, kid) and payload (iss, sub, aud, exp, nbf, iat, jti, and any custom claims). Timestamps like exp, nbf, and iat are converted to human-readable dates for easy inspection.
Yes. JWTs follow the RFC 7519 standard regardless of the issuer. Tokens from Auth0, Firebase, Azure AD, AWS Cognito, Okta, and any other OIDC/OAuth2 provider can be decoded and inspected with this tool.