What is the JWT Token Decoder?
The JWT Token Decoder is a zero-trust, 100% client-side JSON Web Token (RFC 7519) debugger that unpacks Base64URL-encoded authentication tokens into human-readable JSON headers, payload claims, and cryptographic signature segments. Modern single-page applications, OAuth 2.0 / OpenID Connect (OIDC) providers (Auth0, Clerk, Cognito, Firebase, Keycloak, Okta), and microservices rely on JWT Bearer tokens to transmit stateless identity and permission claims.
When you paste a JWT (or an `Authorization: Bearer eyJ...` header string), our inspector immediately renders a Color-Coded Visual Token Split: the JOSE Header in Rose/Red, the Claims Payload in Violet/Purple, and the JWS Signature in Cyan. Simultaneously, it decodes the Header (`alg`, `typ`, `kid`) and Payload into formatted JSON views and extracts standard RFC 7519 registered claims (`iss`, `sub`, `aud`, `exp`, `nbf`, `iat`, `jti`).
Crucially, numerical Unix epoch timestamps inside `exp` (Expiration Time), `iat` (Issued At), `nbf` (Not Before), and `auth_time` are automatically translated into human-readable local and UTC timestamps alongside a live Valid / Expired / Not Yet Active Status Badge showing the exact time remaining or elapsed since expiration.
How to Use JWT Token Decoder (Step-by-Step)
- 1
Paste Your JWT or Bearer Header
Paste any 3-part JWT (`xxxx.yyyy.zzzz`) into the token input box. Leading `Bearer ` prefixes and whitespace are stripped automatically.
- 2
Inspect the Color-Coded Token Anatomy
View the visual split highlighting the Base64URL Header (Red), Payload (Purple), and Signature (Cyan) segments.
- 3
Check the Live Expiration Status Badge
Look at the status banner at the top of the Payload panel to see whether the token's `exp` claim is currently Valid (Green) or Expired (Red), and by how many minutes/hours/days.
- 4
Review Decoded Header & Payload JSON
Examine the pretty-printed JSON objects for both Header (`alg`, `typ`, `kid`) and Payload claims, plus the annotated Registered Claims table.
- 5
Copy Decoded JSON or Load a Sample Token
Click Copy on the Header or Payload cards to paste claims into your bug report, or click 'Generate Fresh Sample JWT' to test with an active token.
Key Features of Our JWT Token Decoder
Color-Coded Visual Token Split
Highlights the encoded token in three distinct colors matching industry convention: Header (Red), Payload (Purple), and Signature (Cyan).
Live Token Expiration & Validity Badge
Evaluates `exp` and `nbf` claims against your live system clock to display an instant Valid / Expired badge with relative countdowns.
Automatic Timestamp Claim Translation
Converts numeric Unix timestamps in `exp`, `iat`, `nbf`, `auth_time`, and `updated_at` into human-readable Local and UTC dates.
RFC 7519 Registered Claims Dictionary
Explains standard claims (`iss` Issuer, `sub` Subject, `aud` Audience, `jti` JWT ID, `azp`, `scope`) in a clear reference table.
Automatic 'Bearer ' Prefix Stripper
Paste raw headers straight from Chrome DevTools (`Authorization: Bearer eyJ...`) without manually deleting prefixes.
100% Air-Gapped Client-Side Decoding
Production access tokens and ID tokens never leave your browser memory—zero network calls, zero telemetry.
Key Benefits & Advantages
Debug 401 Unauthorized Errors in Seconds
Instantly see if an API call failed because the token expired 5 minutes ago, had the wrong `aud` audience, or lacked a required `scope`.
Zero Risk of Leaking Live Production Tokens
Pasting an active production Bearer token into a server-logged website is a severe security breach. Our 100% client-side decoder runs strictly inside your local browser tab.
No Manual Epoch Timestamp Conversion Needed
Hovering or reading `1792162786` is replaced by instant human-readable date badges and relative time ('Expires in 45m' or 'Expired 2d ago').
Inspect Signing Algorithms & Key IDs (kid)
Quickly verify whether a token is signed with symmetric HMAC (`HS256`) or asymmetric RSA/ECDSA (`RS256`, `ES256`) and check its JWKS `kid`.
Common Real-World Use Cases
OAuth 2.0 & OpenID Connect (OIDC) Debugging
Inspect `id_token` and `access_token` payloads from Auth0, AWS Cognito, Clerk, Supabase, Azure AD, or Google Identity.
Role-Based Access Control (RBAC) Verification
Verify custom claims, tenant IDs (`org_id`), user roles, and permission arrays embedded inside session tokens.
API Gateway & Microservice Troubleshooting
Check `iss` (Issuer) and `aud` (Audience) strings when debugging Envoy, Kong, or AWS API Gateway JWT authorizer rejections.
Security Auditing (`alg: none` & Claim Leakage)
Audit application tokens to ensure sensitive PII or plaintext passwords are not inadvertently stored in the unencrypted JWT payload.
How JWT Token Decoder Works Technically
A JSON Web Token (RFC 7519) serialized in JWS Compact Serialization (RFC 7515) consists of three dot-separated Base64URL strings: `BASE64URL(UTF8(JWS Header)) + '.' + BASE64URL(UTF8(JWS Payload)) + '.' + BASE64URL(JWS Signature)`. Unlike standard Base64, Base64URL replaces `+` with `-`, `/` with `_`, and strips trailing `=` padding characters so the token can be safely transmitted in HTTP `Authorization` headers, cookies, and URL query parameters.
To decode a JWT client-side, our parser splits the trimmed string on `.`, validates the 3-segment structure (or 5-segment JWE structure notice), converts each Base64URL segment to canonical padded Base64 (`str.replace(/-/g, '+').replace(/_/g, '/')` padded to `length % 4 === 0`), decodes the UTF-8 byte stream via `TextDecoder`, and parses the resulting JSON via `JSON.parse()`. It then compares `payload.exp * 1000` and `payload.nbf * 1000` against `Date.now()` to compute real-time token lifecycle state.
Expert Tips for Best Results
- Remember that standard JWTs (JWS) are signed, NOT encrypted! Anyone who intercepts the token can Base64URL-decode the Header and Payload—never put plaintext secrets inside a JWT payload.
- You can copy the entire `Authorization: Bearer eyJhbGci...` line straight out of Chrome DevTools Network Headers and paste it here; our input parser strips `Authorization:` and `Bearer` automatically.
- If an API rejects your token right after login, check the `nbf` (Not Before) and `iat` (Issued At) badges for clock skew between the authentication server and your backend.
- Check the `alg` field in the Red Header card: `HS256` uses a shared secret key, whereas `RS256` and `ES256` use public/private key pairs published at a `/.well-known/jwks.json` endpoint.
- Note that decoding a JWT inspects its contents; verifying the cyan cryptographic signature requires the issuer's secret or public key.
100% Local Browser Privacy Guarantee
Security First: JWT decoding runs 100% locally in your browser's JavaScript memory. Your authentication tokens are never transmitted, logged, or stored anywhere.
Frequently Asked Questions About JWT Token Decoder
Is it safe to paste my JWT access token into this decoder?+
Yes, because this decoder operates 100% client-side in your browser with zero network requests. However, as a general security best practice, you should always be cautious with live production tokens and use development or expired tokens whenever possible.
Why can you decode a JWT without knowing the secret key?+
A standard JWT (JWS) is digitally signed, not encrypted. The Header and Payload are simply Base64URL-encoded JSON strings so that clients and servers can read the claims. The secret or private key is used to compute the third part (the Signature) to prevent anyone from tampering with the payload.
What do iss, sub, aud, exp, nbf, and iat mean in a JWT?+
These are standard RFC 7519 Registered Claim Names: `iss` is the Issuer, `sub` is the Subject (usually the user ID), `aud` is the intended Audience, `exp` is the Expiration Time (Unix epoch seconds), `nbf` is Not Before time, and `iat` is the Issued At timestamp.
Why are JWT timestamps 10 digits long instead of 13 digits?+
Per the RFC 7519 NumericDate specification, JWT timestamps (`exp`, `iat`, `nbf`) are always expressed in Unix Epoch Seconds (10 digits, e.g., `1760626786`), rather than JavaScript's 13-digit milliseconds.
What happens if someone modifies the decoded JSON payload and re-encodes it?+
If an attacker modifies a claim (like changing `"role": "user"` to `"role": "admin"`) and Base64URL-encodes it without possessing the server's signing key, the cryptographic signature in the 3rd segment will no longer match, and the backend server will reject the token.
Why does my JWT have 5 dot-separated parts instead of 3?+
A 3-part token is a JWS (JSON Web Signature, readable JSON). A 5-part token is a JWE (JSON Web Encryption, RFC 7516), where the payload itself is encrypted (`Header.EncryptedKey.IV.Ciphertext.AuthTag`) and cannot be read without the decryption private key.