Tech

JWT (JSON Web Token)

Definition

A compact, self-contained token format used for securely transmitting claims between parties as a digitally signed JSON object for authentication.

Try the free calculator

Use our JWT Decoder to run the numbers yourself.

A JSON Web Token is a URL-safe string composed of three Base64-encoded parts separated by dots: a header specifying the signing algorithm, a payload containing claims about the user or session, and a signature that verifies the token has not been tampered with. JWTs are widely used for stateless authentication in web applications.

When a user logs in, the server generates a JWT containing the user's identity and permissions, signs it with a secret key, and returns it to the client. The client includes this token in the Authorization header of subsequent API requests. The server can verify the token's signature and extract user information without querying a database, enabling horizontal scaling.

JWTs offer significant advantages for distributed systems because they are self-contained and stateless, eliminating the need for centralized session storage. However, they have important limitations: tokens cannot be revoked before expiration without additional infrastructure, large payloads increase request size, and the payload is merely encoded not encrypted, so sensitive data should never be stored in a JWT without additional encryption.

Get weekly tips for JWT (JSON Web Token) & more

No spam. Unsubscribe anytime.

Related Calculators

Related Terms

Related Articles

Stay Updated

Get notified about new tools, features, and exclusive deals. No spam, ever.