MG Software.
HomeAboutServicesPortfolioBlog
Contact Us
  1. Home
  2. /Knowledge Base
  3. /What is JWT? - Explanation & Meaning

What is JWT? - Explanation & Meaning

Learn what JWT (JSON Web Token) is, how stateless authentication works, and why JWT is the standard for modern API authentication and authorization.

Definition

JWT (JSON Web Token) is an open standard (RFC 7519) for securely transmitting information between parties as a compact, URL-safe JSON object. JWTs are widely used for stateless authentication and authorization in modern web applications and APIs.

Technical explanation

A JWT consists of three parts separated by dots: header, payload, and signature. The header contains the token type and the signing algorithm used (such as HS256 or RS256). The payload contains claims, both registered (iss, exp, sub) and custom, carrying information about the user and permissions. The signature is computed by combining the header and payload with a secret (HMAC) or a private key (RSA/ECDSA). With stateless authentication, the server does not need to store session data: all required information is in the token itself. Access tokens have a short lifespan (minutes) while refresh tokens are longer-lived for obtaining new access tokens. JWTs are ideal for microservice architectures because each service can independently validate the token without a central session store. Key security considerations include: always transmitting tokens over HTTPS, setting short expiration times, not including sensitive data in the payload, and storing tokens securely (httpOnly cookies over localStorage).

How MG Software applies this

MG Software uses JWT as the standard authentication mechanism in our APIs and web applications. We implement an access/refresh token strategy with short-lived access tokens and secure httpOnly cookies for refresh tokens. In our Supabase integrations, we process JWTs for Row Level Security. For microservice architectures, we use JWTs to authenticate requests between services without a shared session store.

Practical examples

  • A web application that returns a JWT access token after login with a 15-minute validity period, after which a refresh token automatically requests a new access token without requiring the user to log in again.
  • A microservice architecture where each service validates incoming JWT tokens against the authentication service's public key without querying a shared database.
  • A mobile app that stores JWT tokens in the operating system's secure storage and sends them with every API request in the Authorization header.

Related terms

api securitytwo factor authenticationencryptionzero trustcybersecurity

Further reading

What is API Security?What is 2FA?What is Encryption?

Related articles

What is OAuth? - Definition & Meaning

Learn what OAuth is, how this authorization protocol works, and why OAuth is the standard for secure access to APIs and third-party applications.

What is an API Gateway? - Definition & Meaning

Learn what an API Gateway is, how it manages API traffic with rate limiting and authentication, and why it is essential for microservice architectures.

What is Two-Factor Authentication? - Explanation & Meaning

Learn what two-factor authentication (2FA) is, how multi-factor authentication works, and why 2FA with passkeys is the standard for account security in 2026.

Auth0 vs Clerk: Complete Comparison Guide

Compare Auth0 and Clerk on authentication, developer experience, UI components, and enterprise features. Discover which auth platform best fits your web application.

Frequently asked questions

JWT is secure when implemented correctly. Always use strong signing algorithms (RS256 or ES256 over HS256 for public APIs), set short expiration times, transmit tokens only over HTTPS, and store them in httpOnly cookies. Avoid including sensitive data in the payload, as it is base64-encoded but not encrypted.
With session cookies, the server stores session data and only sends a session ID to the client. With JWT, the token itself contains all required information (stateless). JWT is better suited for distributed systems and APIs, while session cookies are simpler for traditional web applications with a single server.
JWTs are inherently not revocable because they are stateless. Solutions include: using short expiration times, maintaining a token blacklist (which partially negates the stateless advantage), or token versioning via a claim that is updated on logout. Refresh token rotation provides a good balance between security and performance.

Ready to get started?

Get in touch for a no-obligation conversation about your project.

Get in touch

Related articles

What is OAuth? - Definition & Meaning

Learn what OAuth is, how this authorization protocol works, and why OAuth is the standard for secure access to APIs and third-party applications.

What is an API Gateway? - Definition & Meaning

Learn what an API Gateway is, how it manages API traffic with rate limiting and authentication, and why it is essential for microservice architectures.

What is Two-Factor Authentication? - Explanation & Meaning

Learn what two-factor authentication (2FA) is, how multi-factor authentication works, and why 2FA with passkeys is the standard for account security in 2026.

Auth0 vs Clerk: Complete Comparison Guide

Compare Auth0 and Clerk on authentication, developer experience, UI components, and enterprise features. Discover which auth platform best fits your web application.

MG Software
MG Software
MG Software.

MG Software builds custom software, websites and AI solutions that help businesses grow.

© 2026 MG Software B.V. All rights reserved.

NavigationServicesPortfolioAbout UsContactBlog
ResourcesKnowledge BaseComparisonsExamplesToolsRefront
LocationsHaarlemAmsterdamThe HagueEindhovenBredaAmersfoortAll locations
IndustriesLegalEnergyHealthcareE-commerceLogisticsAll industries