What is a JWT
A JSON Web Token (JWT) is a compact string format used for sessions, API authorization, and service-to-service claims. A typical JWT has three Base64URL segments: Header (algorithm and type), Payload (claims such as user ID and exp), and Signature (proves integrity when verified correctly).
With Towalles jwt-decoder, you paste a token locally in the browser and inspect Header and Payload JSON instantly. Nothing is uploaded—ideal for debugging dev environments, checking expiry, and troubleshooting unexpected 401 responses.
Decoding is not verification
Anyone can Base64-decode JWT header and payload, so never put passwords or full card numbers in claims. The signature exists so servers can verify the token was issued by a trusted party and was not tampered with.
Common mistake: "I decoded the JWT in the frontend and saw role: admin, so the user is admin." Attackers can forge payloads unless your app decodes without verifying. Always verify signatures and claims (exp, aud, iss) on the server.
Practical debugging tips
Check whether exp has passed; allow for clock skew. Confirm alg matches expectations (beware alg:none or algorithm confusion). Match iss/aud to your service. For HS256, keep secrets server-side only; jwt-generator is for local dev, not production client code.
Pair with hash-generator and hmac-generator to understand signing vs HMAC: JWT signing is a structured protocol; HMAC is general message authentication. Use hmac-generator when validating API webhooks.
Privacy and compliance
Even with local tools, do not leak production tokens in screen recordings, logs, or tickets. Rotate secrets, keep access tokens short-lived, and use refresh or step-up auth for sensitive actions. Towalles tool pages include tutorials and FAQs to align team security baselines.