Inspecting JWT Claims, Expiration Timestamps, and Signing Risks
Every time an API answers with 401 Unauthorized, the quickest clue usually sits inside the Bearer token attached to that request. Yet pasting an active login JWT into a remote web service is almost as risky as sharing a temporary password: until its expiration timer runs out, anyone who logs that string can replay requests under that user's identity. Decoding the token inside local browser memory lets you inspect headers, roles, and clock drift without sending a single byte over the network.
How Base64URL Unpacks Header, Payload, and UTF-8 Claims
A signed JSON Web Token (JWS, defined in RFC 7519) consists of three dot separated Base64URL strings: header.payload.signature. Once you paste a token, the editor colors each segment separately so you can spot truncated copies or misplaced dots before even reading the JSON output.
Unlike classic Base64, Base64URL replaces + with -, replaces / with _, and strips trailing = padding so tokens survive HTTP headers and query parameters untouched. Internally, our decoder swaps those two URL symbols back, restores missing = padding cleanly, decodes the bytes with atob(), and pipes the byte array through a UTF-8 TextDecoder. That final step matters more than people expect: naive atob() calls alone corrupt accented user names, Arabic text, or emoji inside a name claim, whereas UTF-8 byte decoding renders international characters cleanly.
Reading Time Claims (exp, iat, and nbf) During 401 Debugging
JWT time claims use numeric Unix epoch timestamps measured in whole seconds since January 1, 1970 UTC, never milliseconds. A common integration bug happens when developers pass Date.now() in milliseconds directly into exp, creating a token dated thousands of years in the future or failing numeric validation downstream.
Whenever the payload contains numeric exp (Expiration Time), iat (Issued At), or nbf (Not Before) values, the Timestamp Breakdown panel converts them against your browser clock and prints relative phrases such as Expires in 42 minutes or Expired 2 hours ago. If an auth identity provider sits a few seconds ahead of your backend server, nbf can briefly evaluate in the future, causing this tool to show an amber warning (Token is not valid yet) and explaining sudden intermittent 401 errors right after sign in. Checking whether you copied the whole token cleanly into tools like our API Request Builder also rules out truncated header values.
Concrete Example: Signed Token Breakdown
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkphbmUgRG9lIiwicm9sZSI6ImFkbWluIiwiaWF0IjoxNTE2MjM5MDIyLCJleHAiOjE5MDAwMDAwMDB9.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Header:
{
"alg": "HS256",
"typ": "JWT"
}
Payload:
{
"sub": "1234567890",
"name": "Jane Doe",
"role": "admin",
"iat": 1516239022,
"exp": 1900000000
}
Decoding Is Not Verification: How Trust Actually Works
Base64URL is encoding, not encryption. Every user agent, browser extension, or proxy sitting along the network path can unpack the header and payload with zero keys. Keeping three boundaries straight prevents real production leaks:
- Signatures protect integrity, not secrecy: The third segment only proves nobody edited the header or payload after signing. Never store passwords, recovery codes, tax numbers, or private API secrets inside JWT claims because they sit in plain JSON text once decoded.
- Symmetric versus asymmetric verification: With
HS256(HMAC SHA-256), the backend shares a private signing secret so frontend tools cannot verify signatures without exposing that key. WithRS256orES256, identity providers publish public keys via a JWKS endpoint so services can verify signatures without holding the private signing key. Either way, real trust verification belongs on your resource server before honoring claims. - The
alg: nonesignature bypass: RFC 7519 defines an unsecured JWT variant where the header declares"alg": "none"and the signature segment stays blank (ending the string with a trailing dot). Historical server vulnerabilities (such as CVE-2015-9235) allowed attackers to switchRS256tokens tonone, elevate"role": "admin", and drop the signature. When this inspector sees"alg": "none"or an empty third segment, it raises an amber warning badge explicitly.
Signed JWS (3 Segments) Versus Encrypted JWE (5 Segments)
| Trait | Signed JWT (JWS) | Encrypted JWT (JWE) |
|---|---|---|
| Dot separated segments | 3 (Header, Payload, Signature) | 5 (Header, Encrypted Key, IV, Ciphertext, Auth Tag) |
| Payload visibility | Readable by anyone via Base64URL decode | Opaque ciphertext without private decryption key |
| Supported in this inspector | Yes (Header, Payload, and time claims decoded) | No (rejected with 3 part structure error) |
If a compact string from Azure AD or Google Identity contains five dot separated parts and fails validation here, check the decoded first segment with our Base64 Encoder & Decoder: you will usually spot an enc field like A256GCM confirming an encrypted JWE token rather than a regular readable access JWS. Once you inspect a valid JWS token, click Copy Full JSON to export the combined header and payload object formatted cleanly for issue tickets or test mocks.
JSON Web Token FAQs
Is my JWT token or secret key uploaded to your server?
No. Decoding runs locally in browser JavaScript using native Base64URL and UTF-8 parsing, so tokens and claims stay strictly on your machine.
What is the difference between decoding and verifying a JWT?
Decoding unpacks the Base64URL header and payload into readable JSON without needing any key. Verification checks the third signature segment against a secret or public certificate to prove nobody altered the token.
What do the standard registered claims (sub, iss, aud, exp) mean?
sub identifies the user subject, iss names the token issuer, aud specifies the intended recipient service, and exp marks the Unix epoch second when the token stops being valid.
Why does the tool show that my token is expired?
It compares the numeric exp timestamp (Unix seconds converted to UTC milliseconds) against your browser's current clock, displaying your readable local date alongside relative elapsed time.
Does this tool support nested or encrypted JWTs (JWE)?
No. Encrypted JWE payloads contain five dot separated parts and require private key decryption first, whereas this inspector targets standard three part signed JWS tokens.