Logo InterviewVault

Welcome back, Sujit Kumar Mishra

SKM

Revision Mode

Document technical questions and best-practice answers.

Cancel

JWT – Stateless or Stateful


Question:

Are JWT (JSON Web Tokens) stateless or stateful? Explain the reasoning behind your answer.

JWT (JSON Web Tokens) are stateless.


Reason:

When you use JWT, all the information needed to verify the user is stored inside the token itself. The server does not need to keep any session or user data for each token. This means the server does not remember anything between requests—each request is independent and can be verified using the JWT alone.


In simple words:

JWTs are stateless because the server does not store any data about the user session; everything is inside the token. This makes JWT fast and easy to scale.

Ready for commit