Deep dive into JSON Web Tokens (JWT). Learn how base64url encoding, claims, and HMAC/RSA digital signatures secure modern stateless web APIs.
Calculate your numbers instantly in your browser. Fast, free, no signup.
In modern single-page applications (SPAs) and microservice architectures, JSON Web Tokens (JWT) serve as the industry standard (RFC 7519) for transmitting authentication and authorization claims statelessly.
A compact JWT string consists of three distinct segments separated by periods (.):
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Specifies the token type and cryptographic signing algorithm (such as HS256 or RS256):
{ "alg": "HS256", "typ": "JWT" }
Contains claims—assertions about an entity (typically the user) and metadata:
{
"sub": "usr_948291",
"name": "Alex Developer",
"role": "admin",
"exp": 1740000000
}
Created by taking the encoded header, encoded payload, a secret key, and hashing them together:
HMACSHA256(base64UrlEncode(header) + "." + base64UrlEncode(payload), secret)
Inspect Your Tokens: Debug and decode your tokens safely with our private JWT Decoder.
A JWT consists of three parts separated by dots (.): Header, Payload, and Signature (e.g., xxxxx.yyyyy.zzzzz).
No! Standard JWTs are signed, not encrypted. The header and payload are simply Base64Url-encoded JSON strings that anyone can decode and read.
Use our client-side JWT Decoder to inspect claims without sending confidential tokens to remote servers.
Technical Architect & Lead Developer • ToolsHub Pro
Abdul Nabi is a senior software engineer and technical architect specializing in client-side Web APIs, high-performance browser computing, cryptographic validation, and privacy-first digital utility platforms. All guides on ToolsHub Pro are peer-reviewed for mathematical rigor and developer accuracy.