Skip to main content
Dev & Data Essential

JWT (JSON Web Token) Debugger & Claims Inspector

Inspect, decode, and debug JSON Web Tokens (JWT) headers and payloads with live expiration countdown, cryptographic algorithm verification, and claims breakdown.

Instant client-side decoding of JWT Header, Payload, and Signature components
Live expiration countdown timer and human-readable UTC / Local timestamp conversions
Comprehensive breakdown of standard RFC 7519 claims (`iss`, `sub`, `aud`, `exp`, `nbf`, `iat`, `jti`)
Cryptographic algorithm indicator (HS256, RS256, ES256, EdDSA) and token structure analysis
100% private: tokens never leave your browser, safeguarding auth secrets and sensitive session claims
Sponsored Ad Zone

Clean, non-intrusive developer tools sponsor zone. Zero cumulative layout shift.

Comprehensive Technical Manual

Deep Dive into JSON Web Tokens (RFC 7519): Architecture, Claims, and Security

In-depth specifications, architectural mechanics, real-world code implementations, and industry best practices.

01

Anatomy of a JWT: Header, Payload, and Cryptographic Signature

A JSON Web Token (JWT) is a compact, URL-safe means of transferring claims between two parties. Standardized in RFC 7519, a JWT consists of three distinct parts separated by dots (.): the Header, the Payload, and the Signature. The Header specifies the token type (JWT) and signing algorithm (e.g., HS256, RS256). The Payload contains registered and custom claims describing the subject, issuer, and permissions. The Signature is produced by hashing the Base64URL-encoded header and payload with a secret key or private cryptographic key.

Implementation Example
// Structure of a JWT
// eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkFsZXgiLCJpYXQiOjE1MTYyMzkwMjJ9.signature

// Deconstructed Parts:
// 1. Header:    base64url( { "alg": "HS256", "typ": "JWT" } )
// 2. Payload:   base64url( { "sub": "1234567890", "name": "Alex", "iat": 1516239022 } )
// 3. Signature: HMACSHA256( base64UrlEncode(header) + "." + base64UrlEncode(payload), secret )
02

Standard RFC 7519 Registered Claims Reference

  • Registered claims are pre-defined claims that provide standardized metadata for token verification engines. Key registered claims include:
  • exp (Expiration Time): Unix epoch timestamp after which the token must be rejected.
  • iat (Issued At): Unix epoch time indicating when authentication occurred.
  • nbf (Not Before): Token cannot be accepted before this time.
  • iss (Issuer): Identifies the identity provider or auth authority (e.g., Auth0, Firebase, Clerk).
  • aud (Audience): Intended recipient or API audience for the token.
  • sub (Subject): Unique principal or user identifier.
Implementation Example
// Example Decoded JWT Payload
{
  "iss": "https://auth.webcraftkit.com/",
  "sub": "usr_9981240182",
  "aud": "https://api.webcraftkit.com/v1",
  "exp": 1772184000,
  "nbf": 1772180400,
  "iat": 1772180400,
  "jti": "d748f21e-84b2-4d22-92cf-4b10283a04e5",
  "role": "system_admin"
}
03

Symmetric (HMAC) vs Asymmetric (RSA/ECDSA) Algorithms

Symmetric algorithms (HS256, HS384, HS512) use a single shared secret key for both signing and verifying tokens. While fast, distributing this secret across multiple microservices poses severe security risks. Asymmetric algorithms (RS256, ES256, Ed25519) employ a public/private key pair: the authentication server signs tokens with a secure private key, while downstream APIs verify signatures using a publicly distributed JWKS (JSON Web Key Set) endpoint without exposing signing capabilities.

Implementation Example
// Node.js Verification with Asymmetric RS256 Public Key
import jwt from 'jsonwebtoken';

const token = 'eyJhbGciOiJSUzI1Ni...';
const publicKey = `-----BEGIN PUBLIC KEY-----\n...`;

try {
  const decoded = jwt.verify(token, publicKey, {
    algorithms: ['RS256'],
    audience: 'https://api.webcraftkit.com/v1',
    issuer: 'https://auth.webcraftkit.com/',
  });
  console.log('Valid JWT Subject:', decoded.sub);
} catch (err) {
  console.error('JWT Verification Failed:', err.message);
}
04

Critical JWT Security Pitfalls and Best Practices

  1. 1. Never store sensitive credentials (passwords, social security numbers) inside the payload. JWTs are encoded, not encrypted.
  2. 2. Prevent Algorithm Confusion Attacks: Always explicitly whitelist expected algorithms on your backend (rejecting "alg": "none").
  3. 3. Keep Access Token lifespans short (5 to 15 minutes) paired with secure HttpOnly Refresh Tokens stored in SameSite cookies.
  4. 4. Validate expiration (exp) and issuer (iss) claims on every single authenticated request.
Implementation Example
// Express.js JWT Guard enforcing strict algorithm & expiration checks
import { expressjwt } from 'express-jwt';

export const requireAuth = expressjwt({
  secret: process.env.JWT_PUBLIC_KEY!,
  algorithms: ['RS256'],
  requestProperty: 'auth',
  getToken: (req) => req.cookies?.access_token || req.headers.authorization?.split(' ')[1],
});
Knowledge Base & Clarifications

Frequently Asked Questions: JWT Decoder

Got questions about how JWT Decoder operates, client-side cryptographic safety, or performance limits? Explore common answers below.

Complementary Utilities
View all in Dev & Data →