JWT Decoder

Decode a token's header and claims locally, then see what to check before trusting them.

Runs entirely in your browser — the token is never transmitted anywhere. Verify with DevTools: zero network requests on decode.

How it works

A JSON Web Token (JWT) carries claims about a subject or transaction. A typical signed JWT uses the compact JSON Web Signature (JWS) format with three dot-separated segments, header.payload.signature. The first two segments are JSON represented as Base64URL. The last holds a digital signature or a message authentication code (MAC). An encrypted JWT uses JSON Web Encryption (JWE). Its compact form has five segments and its claims require decryption to read.

Paste the compact signed token, with or without the leading Bearer prefix. The decoder reads the first two segments, displays their JSON and shows iat, nbf and exp in UTC when present. It flags alg: none, a missing signature segment, a missing expiration claim and an expiration earlier than the browser's current time. It also warns when the expiration is more than 24 hours after the issue time, or after the current time when no issue time is available. That threshold is a tool heuristic. The nbf line shows a date for inspection. The receiving service enforces the acceptance window.

A successful decode shows that the first two segments can be read as JSON. Even the “Valid until” line reports an expiration check using the local clock. Verification requires a trusted key and an expected algorithm to check the original signed bytes. The receiving application then applies its own rules about who may issue a token, which service may accept it and when it can be used. If the decoder reports a missing exp, check whether the service rejects the token under its profile or imposes a separate session lifetime.

Read the header and standard claims

Start with alg, the algorithm declared by the token. Compare it to the receiving service's configuration. If kid appears, record it as a hint for finding the signing key in the trusted issuer's key set. Anyone can read the payload of a signed JWT, so look for passwords, credentials or unnecessary personal data that should be removed at issuance.

RFC 7519 defines these registered claims. The token profile used by your application determines which it requires. The three time claims use NumericDate, measured in seconds from the Unix epoch.

ClaimMeaningWhat to check
issIssuerMatch the configured issuer and use keys associated with it.
subSubjectCheck the subject in the issuer's namespace.
audIntended recipientsLook for this service's expected value in the string or list.
expExpirationCheck the expiry and whether the lifetime meets policy.
nbfEarliest acceptance timeCompare it with the verifier's current time.
iatIssue timeCheck for unexpected age or future issuance under your policy.
jtiToken identifierUse it where your application tracks tokens to detect replay.

Worked example for an API token

Suppose you are diagnosing a request to inventory.example.com. The service trusts https://login.example.com and expects the audience inventory. Here are the decoded claims from an illustrative test case.

{
  "iss": "https://login.example.com",
  "sub": "test-user",
  "aud": "billing",
  "iat": 1704067200,
  "exp": 1704067500
}

iat is 00:00 UTC on January 1, 2024, and exp is 00:05 UTC. Even during those five minutes, the inventory API should reject this token because billing is the intended audience. For a spate of these failures, check which API the client requested a token for, and compare that with the verifier's audience configuration. The issuer string alone carries no proof of identity.

For a second test case, suppose the issuer says a token expires at 00:00 UTC on January 1, 2024, but the decoded exp is 1704067200000. That value is the intended time in milliseconds. The JWT decoder interprets it as seconds and displays a date far in the future. Compare the issuer's output with the verifier's required time unit before changing any lifetime setting.

What to do with your result

Use a time warning to compare issuer and verifier clocks and examine the configured lifetime. If an issuer, audience or token type is unexpected, check how the client acquired the token and which rules its destination enforces. Keep raw bearer tokens out of logs and tickets. Share a sanitized claim summary, the verification failure reason and a request ID when escalating.

For authentication tokens expected to be signed, reject none. Historical failures include verifiers accepting unsigned tokens or confusing a symmetric MAC algorithm with an asymmetric signature algorithm. Configure the server's supported algorithm set in advance and bind each verification key to one algorithm. RFC 8725 describes these checks. Follow the JWT security checklist to review signature verification, claim validation, storage and rotation.

FAQ

Does decoding a JWT verify the signature?

Decoding displays what the token claims. Use the server’s verifier with the intended algorithm and a trusted key to check the signature or MAC, then validate the claims against that service’s rules.

Can you read a JWT without a key?

You can read the header and claims of a signed JWT by decoding its first two segments. You need the appropriate decryption key to read the protected claims of an encrypted JWT.

What does alg: none mean in a JWT?

The token declares the unsecured JWT algorithm. A service that requires signed authentication tokens should reject it. The decoder flags the header value as a warning about the token’s format.

Are JWT timestamps in seconds or milliseconds?

RFC 7519 uses NumericDate in seconds since the Unix epoch for exp, nbf and iat. The tool converts those seconds to UTC. Compare an implausible date with the issuer’s timestamp units.

Which JWT claims are required?

RFC 7519 describes registered claims whose use depends on the application. An authentication profile can require specific claims such as issuer, audience or expiration. Follow the profile your verifier implements.

Why would a signed JWT be rejected before it expires?

The verifier may reject the algorithm, key, signature, issuer, audience or token type. A future nbf can also put it outside its acceptance window. Check the server’s recorded reason.

Can I paste a production JWT into a decoder?

This decoder processes the token locally, without uploading it. Prefer a synthetic or expired token and keep live credentials out of screenshots, tickets and shared logs.

From the channel

Video thumbnail: The Server Handed Me an Admin Key The Server Handed Me an Admin Key Watch safe, hands-on security demonstrations for complete beginners on The Exploit HQ ▸ Video thumbnail: Authentication Bypass Explained — Web Application Security for Beginners Authentication Bypass Explained — Web Application Security for Beginners Watch safe, hands-on security demonstrations for complete beginners on The Exploit HQ ▸