Guides · Utiltown
JWT Explained: Structure, Decoding and Verification
JSON Web Tokens (JWT) are everywhere in modern authentication: login sessions, API bearer tokens, and single sign-on. A JWT looks like an opaque string, but it is actually three base64url-encoded parts separated by dots: header, payload, and signature. Understanding what each part means — and why decoding alone does not prove authenticity — is essential for using them safely.
This guide explains the JWT structure, the critical difference between decoding and verification, which parts you can safely inspect in the browser, and how to use Utiltown\'s JWT decoder locally. For a deeper look at where browser decoding is safe and where it must never be trusted, see the related guide JWT: Decoding vs Verifying.
Core Concepts
- Three parts: the header declares the algorithm
(
HS256,RS256) and type (JWT). The payload carries claims such asiss,exp,sub, and custom fields likeuserIdorroles. The signature proves the token was issued by a trusted party and not altered. - Decode vs verify: decoding only base64url-decodes the header and payload so you can read the claims. Verification checks the cryptographic signature using a secret or public key. A decoded JWT with an invalid signature must never be trusted — anyone can forge the first two parts.
- Client-side limits: you can decode a JWT in the browser safely because it is pure base64url decoding with no secret required. But verification needs the issuer\'s secret or public key, which client code should not hold. Verify on the server, never in the frontend.
How to Use This Site\'s Tool
- Open JWT Decoder.
- Paste a JWT into the input field.
- Inspect the decoded header and payload as readable JSON.
- Check the expiry (
exp) and other claims. - Remember: decoding is for inspection only. Verify signatures server-side before authorizing anything.
Bottom Line
A JWT is readable, not trustworthy by itself. Decode locally at JWT Decoder to inspect claims, but always verify the signature server-side before acting on a token.
Frequently Asked Questions
What is a JWT?
A JSON Web Token (JWT) is a compact, URL-safe token made of three base64url parts separated by dots: header, payload, and signature. It carries claims such as user ID, roles, and expiry, and is widely used for authentication and authorization in web and mobile apps.
Is decoding the same as verifying?
No. Decoding only base64url-decodes the header and payload so you can read the claims. Verification checks the cryptographic signature to prove the token was issued by a trusted party and has not been tampered with. A decoded JWT with an invalid signature must never be trusted.
Can I decode a JWT in the browser safely?
Decoding is safe to do locally because it is just base64url decoding — no secret or network call is needed. But you should never send a real JWT to an online decoder you do not control, and never treat decoded claims as authorized without verifying the signature.
Is my token uploaded?
No. This site's JWT decoder runs entirely in the browser. Your token is parsed locally and never sent to a server.
What is in the header and payload?
The header typically declares the algorithm (HS256, RS256) and token type (JWT). The payload contains claims: registered ones like iss (issuer), exp (expiration), sub (subject), plus custom application claims such as userId or roles.