What a JWT Actually Is
The Three Parts: header.payload.signature
Standard Claims You Should Know
Common Pitfalls That Bite Teams
Frequently Asked Questions
Is a JWT encrypted?
No. A standard JWT is signed, not encrypted, so anyone holding it can read the header and payload. The signature only proves the token has not been altered. Never place secrets in the payload.
What is the alg=none vulnerability?
It is an attack where a token sets its algorithm to "none" to claim it is unsigned. A server that does not enforce an expected algorithm may accept the forged token. Always pin the accepted algorithm server-side.
Where should I store a JWT in a browser app?
An HttpOnly cookie is usually safer than localStorage because JavaScript cannot read it, which limits the impact of cross-site scripting. Pair cookies with CSRF protection for session-style auth.
Is it safe to decode a token in an online tool?
The JWT decoder here runs in your browser, so the token is not uploaded. Even so, treat production tokens as live credentials and avoid pasting them into tools you do not fully trust.