Free online JWT decoder — paste token, view JSON

Inspect header and payload; signature is not verified—debugging only.

  • Browser-only
  • Paste JWT
  • JSON view
Decode
JWT Token
Decoded Result
Decoded JWT will appear here...

Features

⚡ Auto-Decoding✓ Header Parsing✓ Payload Parsing✓ Signature Display✓ Client-Side Only✓ No Verification

Note: This tool only decodes JWTs. It does not verify signatures. Your tokens are processed locally and never sent to any server.

About the JWT Decoder

Paste a JSON Web Token from an Authorization header, cookie or log line to read its header and payload as formatted JSON. Decoding starts as soon as you paste. Use it to check which user, roles, audience and expiry a token carries while debugging a login or API call. The signature is shown but not verified, so a decoded token proves nothing about who issued it.

How to use the JWT Decoder

  1. Paste the token into JWT Token. Remove any leading "Bearer " text first.
  2. Read the HEADER, PAYLOAD and SIGNATURE sections in Decoded Result.
  3. Check the alg in the header and the exp, iat, aud and sub claims in the payload.
  4. Use Copy on the result pane to copy all three sections as text.

Worked example: decoding the classic sample token

The sample token shown in the input box decodes as below. The iat claim is a Unix timestamp in seconds: 1516239022 is 2018-01-18 01:30:22 UTC. You can convert iat and exp claims to readable dates to see whether a token has expired.

Input
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Header
{
  "alg": "HS256",
  "typ": "JWT"
}
Payload
{
  "sub": "1234567890",
  "name": "John Doe",
  "iat": 1516239022
}
Signature
SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

Debugging a rejected token: what to check in the payload

Times in exp, iat and nbf are seconds since 1970, not milliseconds. A 13-digit value means the issuer wrote milliseconds, which most libraries will treat as a date tens of thousands of years in the future.

SymptomClaim to checkWhat to look for
401 right after loginnbf, iatServer clock behind the issuer's clock; nbf is in the future
Works, then fails after an hourexpexp minus iat is the token lifetime, often 3600 seconds
Rejected by one API onlyaudAudience does not include that API's identifier
Wrong permissionsscope, roles, groupsMissing or stale claim; tokens keep old roles until refreshed
"Invalid JWT format" error(structure)A JWT has exactly 3 dot-separated parts; an encrypted JWE has 5

JWT structure: three Base64url-encoded parts

A JSON Web Token consists of three parts separated by dots: header.payload.signature. Each part is Base64url-encoded (URL-safe Base64 without padding). The header declares the token type and signing algorithm. The payload contains claims — statements about a subject and additional metadata. The signature verifies the token was not tampered with.

A typical header: {"alg": "HS256", "typ": "JWT"}. Common algorithms are HS256 (HMAC-SHA256, symmetric — same key signs and verifies), RS256 (RSA-SHA256, asymmetric — private key signs, public key verifies), and ES256 (ECDSA, more compact signatures than RSA). Always check the alg field — accepting "none" as a valid algorithm is a critical vulnerability.

Standard JWT claims

The payload contains registered claims (standard fields) and custom claims. Registered claims: iss (issuer — who created the token), sub (subject — whom the token refers to, typically a user ID), aud (audience — intended recipient), exp (expiration time as Unix timestamp), iat (issued-at time), nbf (not-before time — token not valid until this point).

Custom claims carry application-specific data: user roles, permissions, feature flags, or tenant IDs. Keep the payload small — JWTs are typically sent in every request as a header or cookie. Large payloads add latency. Claims that change frequently (like credits balance) are better fetched from the database on demand rather than embedded in a long-lived token.

Security pitfalls to know

Algorithm confusion: if your server accepts the client-specified alg header, an attacker can switch from RS256 to HS256 and sign the token with the server's public key (which is not secret). Always enforce the expected algorithm server-side regardless of what the token header claims.

The JWT decoder on this page decodes the header and payload without verifying the signature — it is read-only inspection. Signature verification requires the secret key or public key and must happen on the server. Never trust a decoded JWT's claims in a browser context without a server-side validation step.

Storing JWTs in localStorage exposes them to XSS attacks — any injected script can read localStorage. Storing in httpOnly cookies protects against XSS but requires CSRF protection. Short expiration times (exp) combined with refresh tokens reduce the damage window if a token is leaked.

JWT Decoder: frequently asked questions

Does this verify the JWT signature?
No. The page decodes the Base64URL header and payload so you can read claims and metadata. Signature verification needs the issuer’s public key or secret and is not performed here.
Is my token sent to a server?
No. Parsing runs in your browser. Paste a token from staging or logs without uploading it to WebToolz365.
Why does decoding fail for some tokens?
JWTs use Base64URL encoding. Malformed strings, truncated copies, or non-JWT blobs will not split into three parts. Refresh the token if it expired while testing.