
JWT Explained: What's Actually Inside a JSON Web Token
You're integrating an API and you get back a token that starts with eyJ . You paste it somewhere and suddenly you can read your user's email address, their user ID, and an expiry timestamp. No decryption key needed. How? And if anyone can read it, is that secure? JWTs look encrypted but aren't. That tension — readable but trustworthy — is the whole point. Understanding it takes about five minutes, and it changes how you think about auth tokens for good. What is a JWT? A JSON Web Token is three base64url-encoded strings joined by dots: header.payload.signature Take a real minimal example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyXzEyMyIsImVtYWlsIjoidXNlckBleGFtcGxlLmNvbSIsImV4cCI6MTcxMjcwMDAwMH0.signature Each part can be decoded in a browser console right now — no keys, no secrets, no libraries: // Manually decode the payload (works in any browser console) const token = " eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyXzEyMyIsImVtYWlsIjoidXNlckBleGFtcGxlLmNvbSIsImV4cC
Continue reading on Dev.to
Opens in a new tab

