Introduction to JWT
JWT (JSON Web Token) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object. This information can be verified and trusted because it is digitally signed.
Compact
Small size makes JWTs easy to send through URLs, POST parameters, or HTTP headers
Secure
Digitally signed using HMAC or RSA to verify authenticity and integrity
JWT Structure
A JWT consists of three parts separated by dots (.):
xxxxx.yyyyy.zzzzz1. Header
Contains the token type (JWT) and signing algorithm (e.g., HS256, RS256)
{
"alg": "HS256",
"typ": "JWT"
}2. Payload
Contains the claims - statements about an entity and additional data
{
"sub": "1234567890",
"name": "John Doe",
"iat": 1516239022
}3. Signature
Created by encoding the header and payload with a secret, ensuring the token hasn't been tampered with
Common JWT Claims
iss - Issuersub - Subjectaud - Audienceexp - Expirationiat - Issued AtWhy Use JWT?
- •Stateless: No server-side session storage needed
- •Scalable: Easy to scale horizontally
- •Cross-domain: Works across different domains
- •Mobile-friendly: Perfect for mobile apps and SPAs
Try Our JWT Debugger
Now that you understand JWT, decode and validate your tokens with our advanced tool!