Security & Privacy

Anatomy of JSON Web Tokens (JWT): Payload Decoding, Signature Verification & Claims

Understand JWT structure, base64url payload decoding, signature verification, claim validation, and safe handling of bearer tokens.

A
Ali Raza
Oct 24, 20267 min read
Share:
Anatomy of JSON Web Tokens (JWT): Payload Decoding, Signature Verification & Claims
Cybersecurity visualization representing token based access
JWTs carry claims between systems; the signature and application checks determine whether to trust them.

What a JWT contains

A compact JSON Web Token commonly has three dot separated parts: a protected header, a claims payload, and a signature or message authentication code. The first two are base64url encoded so they can be transported conveniently. Encoding is not encryption: anyone who obtains a typical signed token can decode and read its claims.

Decoding is not verification

Reading the header and payload only inspects their contents. It does not prove who issued the token or that it has not been changed. A relying service must verify the cryptographic signature using trusted keys and an explicit algorithm policy, then validate application relevant claims such as issuer, audience, and expiration.

Keep claims minimal

Do not place passwords, private keys, or other secrets in a signed but unencrypted payload. Keep token lifetimes appropriate, protect signing keys, and avoid logging bearer tokens. JWT is a token format, not a complete session management design; storage and transport choices still matter.

Inspect safely

Use sample or deliberately non sensitive tokens when learning. Even client side inspection exposes the value to the page, browser extensions, and any code running in that context. Never paste production credentials into a tool you do not control.

Inspect a sample JWT


Written by Dr. Sarah Chen
Senior Web Performance Engineer and browser runtime researcher. Ph.D. in Computer Science with a focus on compiler optimization and sandboxed execution. Research contributor on WebAssembly, HTML5 Canvas, and modern browser standards at IT Market Plus.

A
Written by

Ali Raza

Principal Software Engineer & Technical Architect with over a decade of experience in client-side web technologies, cryptography, and Core Web Vitals optimization. Founder & Editorial Lead at IT Market Plus.