Back to all guides
4 min read·2026-11-27

JWT Structure & Base64 Security: What Every Developer Should Know

Understand Header, Payload, and Signature in JSON Web Tokens, why Base64URL is not encryption, and how to debug exp claims safely.

1. JWT Is Signed, Not Encrypted

A standard JWT consists of three Base64URL segments separated by dots: Header.Payload.Signature. Because the payload is merely encoded—not encrypted—anyone holding the token can inspect its claims. Never store passwords or sensitive PII inside JWT payloads.

2. Debugging 401 Errors with iat, nbf, and exp

When an API rejects a request with 401 Unauthorized, check the exp (expiration) and nbf (not before) Unix epoch timestamps first. Clock skew between servers and clients is a common culprit.

3. Why Client-Side Decoding Matters

Pasting live production bearer tokens into server-backed web tools risks logging credentials on third-party servers. Always inspect tokens with a 100% client-side decoder.

Try the Related Free Tools