JWT Token Decoder & Claims Inspector

Inspect JSON Web Token headers, payloads, and expiration timestamps safely inside your browser.

Offline Safe — Tokens Are Never Transmitted Over the Network
Waiting for JWT
Encoded JWT (Header.Payload.Signature)
Decoded Header & Payload
HEADER (Algorithm & Token Type)

          
PAYLOAD (Claims & Data)

          

How JWT Decoding Works (And Signature Verification Warning)

A JSON Web Token consists of three Base64URL-encoded segments separated by dots: header.payload.signature. Because the header and payload are only encoded (not encrypted unless using JWE), any client application or browser tool can decode them immediately to read user IDs, roles, and expiration timestamps.

Security Note: Decoding a JWT does not verify its cryptographic signature. Your backend server must always verify the signature against your secret or public JWKS key before trusting any claim inside the token.

Step-by-Step: Inspecting a Token

  1. Paste your JWT string: Copy the Authorization: Bearer <token> value (without the word "Bearer") into the left input box.
  2. Read the Header & Payload: TechCar DevTools splits the token on dots (.), Base64URL-decodes the first two parts into UTF-8 JSON, and pretty-prints them side by side.
  3. Check Expiration Status: If an exp (Expiration Time) Unix timestamp exists, the status badge compares it against your current system clock and shows whether the token is still within its valid time window.

Common Claims Explained

  • sub (Subject): Usually the authenticated user ID.
  • iss (Issuer): Domain or service name that generated the token.
  • iat (Issued At) & exp (Expires At): Numeric Unix epoch timestamps in seconds.

Frequently Asked Questions

Why is it dangerous to paste production JWTs into server-side tools?

An active JWT grants access until it expires. If a server-backed tool logs incoming requests, anyone reading those logs could replay your token. TechCar DevTools decodes tokens strictly in browser memory with zero network traffic.

What if my token has 5 dot-separated parts instead of 3?

A 5-part token is an encrypted JWE (JSON Web Encryption) token rather than a signed JWS token. Its payload is encrypted and cannot be decoded without the decryption key.

Does decoding a JWT prove the token is authentic?

No. Anyone can encode a fake JSON payload in Base64URL. Authenticity can only be proven by verifying the cryptographic signature on your backend server using your HMAC secret or RSA/ECDSA public key.

Why do iat and exp look like 10-digit numbers?

RFC 7519 specifies Unix epoch timestamps in seconds (not milliseconds). Our claims summary table automatically multiplies them by 1,000 and converts them to readable UTC dates.

Why did my API return 401 even though the JWT shows "Valid Time Window"?

A valid expiration timestamp is only one check. Your API may still reject the token due to an invalid signature, mismatched aud (audience) or iss (issuer) claim, clock skew between servers, or an explicit token revocation check.

Understanding Standard JWT Sections

SegmentColor / PositionWhat It Contains
HeaderBefore 1st dotAlgorithm (HS256, RS256, ES256), type (JWT), and optional key ID (kid).
PayloadBetween 1st & 2nd dotClaims such as sub, iss, aud, iat, exp, and custom roles.
SignatureAfter 2nd dotCryptographic hash proving Header and Payload were not tampered with.

Quick Debugging Tips for Auth Engineers

  • Check aud and iss first in OAuth/OIDC setups: Staging tokens often fail in production simply because the issuer URL or client ID audience differs.
  • Keep payloads lightweight: Sending a 10 KB JWT inside an Authorization header can trigger 431 Request Header Fields Too Large errors on Nginx or CDNs.

How JWT Structure Maps to HTTP Authentication

When a mobile app or SPA signs in through an authentication endpoint, the server returns an access token following the RFC 7519 compact JWS layout: Base64URL(Header) + "." + Base64URL(Payload) + "." + Base64URL(Signature). On subsequent API calls, the client attaches that string inside the HTTP header Authorization: Bearer <token>. Because the Header and Payload are encoded with URL-safe Base64 rather than encrypted, any developer or API gateway can inspect the JSON claims locally in milliseconds—while only the backend server holding the secret or public JWKS key can verify the cryptographic signature.

// Example Header (Part 1)
{
  "alg": "RS256",
  "typ": "JWT",
  "kid": "key-2026-prod"
}

// Example Payload (Part 2)
{
  "sub": "usr_48921",
  "role": "developer",
  "iss": "https://auth.techcar.online",
  "aud": "https://api.techcar.online",
  "iat": 1735689600,
  "exp": 1735690500
}

Diagnosing Common 401 & 403 Token Errors

Whenever an API rejects a valid-looking Bearer token, check these five failure modes in order (and see our HTTP Status Codes Guide for full error-handling patterns):

  1. Clock Skew Between Microservices: If the auth server's clock runs 45 seconds ahead of the API gateway, freshly minted tokens appear issued in the future (iat / nbf check fails). Configure NTP synchronization and allow 5–10 seconds of clock leeway on verifiers.
  2. Leading "Bearer " Included by Mistake: When pasting into this decoder or testing in Postman, paste only the raw eyJ... token—not the Bearer prefix.
  3. Stale Claims After Role Upgrade: Because JWTs are stateless snapshots at mint time, promoting a user to admin does not update existing tokens until the old access token expires and a fresh token is issued.
  4. Wrong Verification Key After Rotation: If an identity provider rotates signing keys and your API caches JWKS public keys indefinitely, newly signed tokens fail with signature errors. Always inspect the header's kid claim and refresh unknown key IDs cleanly.
  5. CORS Preflight Blocking Authorization Headers: In browser apps, adding an Authorization header triggers a CORS OPTIONS preflight—make sure your backend explicitly allows Authorization in Access-Control-Allow-Headers (read our CORS Debugging Guide).

Critical Security Rules for Production JWTs

Never store sensitive personal data, passwords, or private API keys inside JWT claims, because anyone with browser DevTools can decode Base64URL payloads instantly. Always pin expected signing algorithms explicitly on your backend verifier (for example algorithms: ["RS256"]) to block alg: "none" and symmetric-downgrade attacks, keep access token lifetimes short (5–15 minutes), and store refresh tokens inside HttpOnly; Secure; SameSite cookies rather than localStorage. For full code examples in Node.js (jose) and Python (PyJWT), read How JSON Web Tokens (JWT) Work: Architecture, Claims, and Security Best Practices.

Symmetric vs. Asymmetric JWT Signing Explained

Choosing the right cryptographic signing algorithm determines how your authentication server and downstream APIs share keys safely:

AlgorithmKey ArchitectureStrengths & Operational Fit
HS256 (HMAC-SHA256)Single shared secret keyVery fast; ideal when one monolith service both signs and verifies tokens. Requires sharing secret with every verifier.
RS256 (RSA-SHA256)Private signing key + Public verification keyBest for microservices & OAuth 2.0: auth server keeps private key secret while APIs fetch public JWKS keys safely.
ES256 / EdDSAElliptic Curve private + public keysProduces much shorter signatures and faster verification than RSA while keeping asymmetric public-key safety.

Real-World Authentication Architecture & Best Practices

When implementing JWT authentication across modern single-page apps (React, Vue, Next.js) or mobile applications, remember that decoding a token is only the debugging step—long-term security depends on your token lifecycle design:

  • Pair Short Access Tokens With Refresh Token Rotation: Stateless JWTs cannot be revoked individually before exp without consulting a server allowlist or deny-list. Keeping access tokens short-lived (5 to 15 minutes) limits exposure if a token leaks, while rotating refresh tokens inside secure server-set cookies keeps users logged in seamlessly. Learn more in our OAuth 2.0 & PKCE Flow Guide.
  • Protect Browser Storage Against XSS: Storing long-lived bearer tokens inside localStorage exposes them to any third-party script or Cross-Site Scripting bug on your domain. Review the exact trade-offs in our localStorage vs sessionStorage vs Cookies Security Comparison.
  • Avoid Oversized Claim Payloads: Every HTTP request carrying an Authorization: Bearer ... header transmits the full JWT across the network. Keep claims minimal (sub, iss, aud, exp, coarse roles) instead of embedding hundreds of granular permission strings that trigger 431 Request Header Fields Too Large errors on proxies.
  • Test Base64URL Payloads Safely: Remember that JWT segments use URL-safe Base64 (- and _ without = padding). You can also experiment with encoding or decoding raw header/payload segments manually inside our UTF-8 Safe Base64 Tool.

Interpreting Key JWT Claims & Refresh Workflows

Understanding each standard claim inside the decoded payload makes cross-service authorization debugging dramatically faster. The sub (Subject) claim identifies the authenticated user ID, iss (Issuer) names the identity authority that minted the token, and aud (Audience) ensures tokens issued for a low-privilege portal cannot be replayed against billing or admin microservices. Meanwhile, iat, nbf, and exp define the exact UTC validity window in Unix epoch seconds. Whenever you observe sudden 401 Unauthorized responses in production, compare the decoded exp timestamp against your server clock, verify that aud matches your API gateway configuration, and check whether your frontend handles concurrent refresh-token calls with a single shared request lock so parallel tabs never race and revoke each other's sessions.

Debugging Multi-Tenant Permissions & Key Rotation

In multi-tenant SaaS architectures, custom claims such as tenant_id, org_role, or fine-grained scope strings govern every protected endpoint. Inspecting decoded payloads directly reveals whether a permission error stems from missing scopes on the identity provider side or strict claim parsing inside your backend middleware. After rotating RSA or ECDSA keys on your authorization server, confirm that the decoded header's kid matches an active entry on your public JWKS endpoint. Explore our complete collection of local debugging tools whenever you also need raw Base64URL inspection or JSON diff comparisons.