Skip to content
← All Tools
🔒All processing in your browser 🚫No uploads stored 🛡️Privacy-first conversion tools No login required
Tutorial

Decoding and Debugging JWTs: A Developer's Checklist

Bill Crawford — Developer Guide — 2026  ·  Last updated October 02, 2025

JWT authentication issues are frustrating to debug because the symptoms are vague — mysterious 401s, intermittent failures, users unexpectedly logged out — and error messages from libraries aren't always specific. This checklist gives you a systematic approach.

Connect on LinkedIn →

Decode any JWT: See header, payload, claims, and expiry status — all in your browser.

Open JWT Decoder →

Table of Contents

  1. Step 1: Decode the Token and Read the Claims
  2. Expiry Issues
  3. Signature Verification Failures
  4. Always Specify the Algorithm Explicitly
  5. Claim Validation Failures
  6. Full Debugging Checklist
  7. Security Reference: RFC 8725

Step 1: Decode the Token and Read the Claims

Before anything else, decode the token and check its actual contents. At least half of JWT debugging issues are resolved here — the token simply contains wrong or missing claims because of a bug in token generation code.

Expiry Issues

Clock skew between servers

If auth and API servers have clocks differing by more than a few seconds, just-issued tokens may appear expired. Most JWT libraries have configurable clock skew tolerance (typically 60 seconds). Ensure all servers sync via NTP.

Detecting expiry manually

const payload = JSON.parse(atob(token.split('.')[1]));
const expiry = new Date(payload.exp * 1000);
console.log(`Expires: ${expiry.toLocaleString()}`);
console.log(`Expired: ${expiry < new Date()}`);

Signature Verification Failures

A signature failure means the token was tampered with, was signed with a different key, or the verifier is using the wrong key. For HS256, the same secret must sign and verify. For RS256, services use the public key — ensure it's current after key rotation. Many auth servers include a kid (key ID) in the header to identify which key to use from the JWKS endpoint.

Always Specify the Algorithm Explicitly

// BAD — accepts any algorithm (vulnerable to algorithm confusion)
jwt.verify(token, secret);

// GOOD — specify allowed algorithms
jwt.verify(token, secret, { algorithms: ['HS256'] });

Claim Validation Failures

Full Debugging Checklist

  1. Decode the token — read all claims first
  2. Check exp — is the token expired? Is your server clock correct?
  3. Check the algorithm in the header against your verifier's allowlist
  4. Check the signing key — is it correct? Has it been rotated?
  5. Validate iss and aud
  6. Check the Authorization header format: Bearer <token> with a space
  7. Check for token truncation from copy-paste or URL encoding
  8. Check the refresh flow — is the client refreshing before expiry?
  9. Enable verbose logging in your JWT library

Security Reference: RFC 8725

When a JWT is not just failing to decode but is causing a security concern — unexpected access, tokens that should be expired still working — refer to RFC 8725 (JSON Web Token Best Current Practices) for authoritative guidance. Key issues it addresses:

// Secure JWT verification (Node.js / jsonwebtoken)
jwt.verify(token, publicKey, {
  algorithms: ['RS256'],          // explicit whitelist — never omit this
  issuer: 'https://auth.example.com',
  audience: 'https://api.example.com',
}, (err, payload) => { ... });

Further reading: RFC 7519 — JSON Web Token · MDN — Web Crypto API

BC
Bill Crawford
Founder, Data Conversion Center

Bill Crawford is a data systems developer and technical founder with over 30 years of professional experience in accounting, finance, and business operations.

He holds a Bachelor's degree in Accounting and has spent more than three decades working within financial and operational environments. Over the past 10 years, he has been heavily involved in the development, implementation, and refinement of financial and enterprise data systems for both Fortune 500 companies and smaller organizations.

His work bridges finance and technology — combining deep domain knowledge in structured reporting and accounting workflows with hands-on SQL development and database architecture experience.

Bill founded DataConversionCenter.com to build practical, browser-based tools that simplify complex data challenges, including:

Rather than focusing on theoretical examples, his tools and articles are informed by real-world challenges encountered in enterprise reporting systems, financial databases, and operational data environments.

Professional Background

Bill's mission is to reduce friction in data workflows — particularly for professionals working with structured financial, operational, and reporting data.