JWTs are everywhere. Login sessions, API auth, SSO flows — they all pass tokens around. Yet most developers paste them into random online tools without thinking twice. This guide shows you what a JWT actually contains and how to decode it safely.

What Is a JWT?

A JSON Web Token is a compact, URL-safe string that carries verified information between two parties. It has three parts separated by dots:

JWT structure example:

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
eyJ1c2VyIjoiYWxpY2UiLCJyb2xlIjoiYWRtaW4iLCJleHAiOjE3MjAwMTIzNDV9.
SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

Step 1: Decode the Header

The header tells you how the token is signed. Look for the alg field. HS256 uses a shared secret. RS256 uses a private/public key pair. The typ field is almost always JWT.

Step 2: Inspect the Payload

The payload contains the actual data. Standard claims include:

Privacy note: Never put sensitive data like passwords or credit card numbers in a JWT payload. The payload is only base64url encoded — it is not encrypted. Anyone with the token can read it.

Step 3: Check Expiry and Claims

The most common JWT issue is an expired token. Convert the exp Unix timestamp to a readable date. If it is in the past, the token is invalid regardless of the signature. Also verify the aud (audience) and iss (issuer) claims match your expectations.

Step 4: Use the JWT Decoder

Stop converting timestamps manually. The JWT Decoder parses the header and payload instantly, highlights expiry, and shows every claim in a readable table. It runs entirely in your browser — your token never leaves your device.

JWT Decoder
Decode JWT tokens – inspect header, payload and expiry

Debugging Common Auth Flows

JWTs fail silently when you least expect it. Here are the most common issues:

Browse all dev tools: AllOmnitools.com/all-tools/ – 20+ free developer utilities, no account required.


Related Articles