Understanding JSON Web Tokens (JWT) Architecture
A JSON Web Token (RFC 7519) is a compact, URL-safe means of transferring security assertions between two parties. JWTs are commonly used for stateless authorization headers in Single Page Applications (SPAs) and REST microservices.
Core Structure of a JWT
- Header: Typically consists of two parts: the signing algorithm being used (such as
HS256orRS256) and the token type (JWT). - Payload: Contains the claims — key-value statements about the authenticated user and contextual metadata (like
sub,iss,iat, andexp). - Signature: Created by encoding the header and payload using Base64URL, then hashing them with a secret key to ensure the contents have not been tampered with in transit.
Frequently Asked Questions About JSON Web Tokens (JWT)
Is it safe to paste sensitive production JWTs into this tool?
Yes, 100%. This tool operates completely in your browser memory via native JavaScript. Zero tokens, claims, or secrets are ever transmitted to any server or logged in any database.
What is the difference between HS256 and RS256?
HS256 is a symmetric algorithm using a single shared secret key for both signing and verifying. RS256 is an asymmetric algorithm using a private key to create the signature and a public key to verify it.