taptools/blog/What is JWT
SecurityMay 2, 2026 · 6 min read

What is a JWT Token? A Simple Explanation

JWT (JSON Web Token) is one of the most widely used authentication mechanisms in modern web applications. This guide explains what JWT is, how it works and how to use it.

What is JWT?

JWT stands for JSON Web Token. It is an open standard (RFC 7519) for securely transmitting information between parties as a JSON object. The information is digitally signed so it can be verified and trusted.

JWTs are commonly used for authentication — when a user logs in, the server creates a JWT and sends it to the client. The client then sends this token with every subsequent request to prove its identity.

JWT Structure

A JWT consists of three parts separated by dots:

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkphbWVzIn0.
SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
1

Header

Contains the algorithm used for signing (e.g. HS256) and token type (JWT). Base64URL encoded.

2

Payload

Contains the claims — data like user ID, name, roles and expiry time. Base64URL encoded. Not encrypted — anyone can read it!

3

Signature

Created by signing the header and payload with a secret key. Used to verify the token has not been tampered with.

How JWT Authentication Works

  1. User logs in with username and password
  2. Server verifies credentials and creates a JWT signed with a secret key
  3. Server sends JWT to the client
  4. Client stores JWT (in memory or localStorage)
  5. Client sends JWT in the Authorization header with every request
  6. Server verifies the JWT signature and grants access

Common JWT Claims

ClaimNameDescription
subSubjectUser ID or identifier
issIssuerWho created the token
audAudienceWho the token is for
expExpiryWhen the token expires (Unix timestamp)
iatIssued atWhen the token was created
nbfNot beforeToken not valid before this time

JWT Security Tips

  • Never store sensitive data in JWT payload — it can be decoded by anyone
  • Always set an expiry time (exp claim)
  • Use HTTPS to transmit tokens
  • Keep your secret key secure and never expose it
  • Use short expiry times for sensitive applications

Decode a JWT token instantly

Paste any JWT token and see the header, payload and claims decoded.

Open JWT Decoder →

Related articles