Token debugging
A readable JWT is not a verified login
Learn what a JWT debugger reveals, how time claims work, and why authentication needs trusted keys and application-specific verification.
Open JWT DebuggerWhat the three sections contain
When a test login behaves unexpectedly, inspecting its token can help separate a missing claim from a server verification problem. A typical signed JWT has three dot-separated sections: a Base64URL header, a Base64URL payload, and a signature. The first two are readable without a signing key.
The header may name an algorithm and a key identifier. The payload carries claims such as a subject, issuer, or audience. Those are statements made by whoever produced the token. Reading them does not establish that the producer is trusted or that the statements are true. Encrypted compact tokens use a different five-part structure; the Zentoolia debugger does not decrypt them.
Try a token that makes the trust boundary obvious
Paste the following teaching token into JWT Debugger. It intentionally declares alg=none and has an empty signature. Its payload says sub=demo. It is not an authentication credential, but a decoder can still display its contents. This is why a “decoded” message must never be treated as “signature verified.”
If a real token fails to decode, check that you copied only header.payload.signature, without the HTTP Bearer prefix. Invalid Base64URL, malformed JSON, or a non-object header or payload can prevent inspection. Fixing those formatting issues still would not make a signature authentic.
eyJhbGciOiJub25lIn0.eyJzdWIiOiJkZW1vIn0.
Decoded header: {"alg":"none"}
Decoded payload: {"sub":"demo"}Read time claims in seconds
exp is an expiration time, nbf is a not-before time, and iat records an issued-at time. These numeric dates use seconds since the Unix epoch. JavaScript Date.now() returns milliseconds, so comparing the two without a conversion is a common cause of incorrect expiry checks.
For example, a payload with exp=0 has an expiration at 1970-01-01T00:00:00Z. A debugger using a current clock will show it as expired. The same tool can report not-yet-valid when nbf lies in the future. Both results depend on the local clock and unverified input. An absent exp is not a declaration that the token is safe to accept indefinitely.
// Unit conversion for inspection, not authentication:
const expiration = new Date(claims.exp * 1000);
const expired = Date.now() >= claims.exp * 1000;Leave acceptance to a verification library
A server should verify the cryptographic protection using trusted key material and an explicit allowed-algorithm policy. It must also apply the application’s issuer, audience, time, and other claim requirements. Do not select an arbitrary algorithm or remote key merely because an untrusted token asks for it.
Use the authentication library and configuration supported by your system rather than writing a verifier from the decoded JSON. Verification rules differ between token types and applications. A token intended for another API should not become acceptable simply because its signature is mathematically valid.
A practical debugging sequence
Start with a synthetic token from your test environment, inspect the expected claim names, and check timestamp units. Next, compare the issuer and audience with your server’s configured expectations. Then investigate verification failures in the server or identity provider, where trusted keys and rejection reasons are available.
Do not paste a live bearer token into a bug report, screenshot, saved snippet, or shared chat. Tool decoding happens locally, but third-party scripts run on this website. Use invented or expired test data for public debugging, and revoke exposed credentials through the system that issued them.