Skip to content
  • Software & Technology
    • Custom Software Development
    • Web Application Development
    • Mobile App Development
    • Enterprise Software
    • SaaS Development
    • UI/UX Design
    • API Development & Integrations
    • Cloud Solutions
    • DevOps Services
    AI & Automation
    • AI Development
    • AI Chatbot Development
    • Machine Learning
    • AI Automation
    • Data Analytics & BI
    Cybersecurity & Compliance
    • Managed Cybersecurity
    • Penetration Testing
    • Cloud Security
    • Governance, Risk & Compliance
    Managed IT & BPO
    • Managed IT Services
    • BPO & Customer Operations
    Talent & Teams
    • Dedicated Development Teams
    • IT Staff Augmentation
    • Tech Recruitment
    Case studyMillionsof global users supported on a Web3 streaming platform we architected, scaled and operate.MYCORead case study
    View all services Discuss Your Project
  • Industries

    All industries
    • Fintech & Banking
    • Healthcare
    • Retail & E-commerce
    • Automotive
    • Logistics
    • Education
    • Media & Streaming
    • Startups & SaaS
    • HR Tech
    • Real Estate
    • Insurance
    • Manufacturing
    • Travel & Hospitality
    • Energy & Utilities
    • Telecommunications
    • Legal
    • Government
    • Nonprofit
    • Agriculture
    • Construction
    Fintech & banking400%increase in ENR sales alongside a 50% cost reduction across banking operations.UAE Banking & Fintech InstitutionRead Discuss Your Project
  • Case Studies
  • Company

    About Ability

    Company

    • About Ability
    • How We Work
    • Careers
    • Contact

    Resources

    • Insights
    • Project Estimator
    • Compare Options

    Talk to us

    Austin, Texas HQ · 8 offices worldwide

    • info@abilitytechub.com
    • WhatsApp(opens in a new tab)
    Get a Free Consultation
Get a Free Consultation
Services
Software & Technology
  • Software & Technology overview
  • Custom Software Development
  • Web Application Development
  • Mobile App Development
  • Enterprise Software
  • SaaS Development
  • UI/UX Design
  • API Development & Integrations
  • Cloud Solutions
  • DevOps Services
AI & Automation
  • AI & Automation overview
  • AI Development
  • AI Chatbot Development
  • Machine Learning
  • AI Automation
  • Data Analytics & BI
Cybersecurity & Compliance
  • Cybersecurity & Compliance overview
  • Managed Cybersecurity
  • Penetration Testing
  • Cloud Security
  • Governance, Risk & Compliance
Managed IT & BPO
  • Managed IT & BPO overview
  • Managed IT Services
  • BPO & Customer Operations
Talent & Teams
  • Talent & Teams overview
  • Dedicated Development Teams
  • IT Staff Augmentation
  • Tech Recruitment
All services
Industries
  • Fintech & Banking
  • Healthcare
  • Retail & E-commerce
  • Automotive
  • Logistics
  • Education
  • Media & Streaming
  • Startups & SaaS
  • HR Tech
  • Real Estate
  • Insurance
  • Manufacturing
  • Travel & Hospitality
  • Energy & Utilities
  • Telecommunications
  • Legal
  • Government
  • Nonprofit
  • Agriculture
  • Construction
  • All industries
Case Studies
Company
  • About Ability
  • How We Work
  • Careers
  • Contact
  • Insights
  • Project Estimator
  • Compare Options
Get a Free Consultation

Site footer

Start a project

Have a product to build or a system to modernize?

Tell us what you are working on. A solution architect reviews every inquiry and replies with concrete next steps, not a sales script.

Get a Free ConsultationEstimate a Project

Software development, AI, cybersecurity and dedicated engineering teams for US companies. Building since 2018, headquartered in Austin, Texas.

  • info@abilitytechub.com
  • WhatsApp +1 (203) 491-5276(opens in a new tab)
  • LinkedIn(opens in a new tab)

Services

  • Software & Technology
  • AI & Automation
  • Cybersecurity & Compliance
  • Managed IT & BPO
  • Talent & Teams
  • Custom Software Development
  • AI Development

Industries

  • Fintech & Banking
  • Healthcare
  • Retail & E-commerce
  • Automotive
  • Logistics
  • Education
  • Media & Streaming
  • Startups & SaaS

Company

  • About Ability
  • How We Work
  • Technologies
  • Careers
  • Insights
  • Project Estimator
  • Compare Options
  • Case Studies
  • Contact

Offices

  • Austin, USA(HQ)
  • Lisbon, Portugal
  • Dubai, UAE
  • Karachi, Pakistan
  • Islamabad, Pakistan
  • Dhaka, Bangladesh
  • Cairo, Egypt
  • Casablanca, Morocco

© 2026 Ability TechHub, part of Ability Global. All rights reserved.

  • Privacy Policy
  • Terms & Conditions
  1. Home
  2. Glossary
  3. JSON Web Token (JWT)

What is JSON Web Token (JWT)?

A JSON Web Token (JWT) is a compact, signed string that carries claims, such as a user ID and an expiry time, so one system can pass verified information to another.

Web & mobile
The same web app on a laptop browser and a phone

Definition

JSON Web Token (JWT), explained

A JSON Web Token is an open standard format for securely transmitting a small set of facts, called claims, between parties. A JWT looks like three chunks of encoded text separated by dots. Inside are a header describing how the token is signed, a payload of claims, and a signature that lets the receiver check the token was issued by a trusted party and has not been altered.

JWTs are widely used for authentication and authorization in web and mobile apps. After a user signs in, a server or identity provider issues a token stating who the user is, what they may access and when the token expires. The client sends it with later requests, and APIs can validate it locally using a key, without looking up a session in a database.

Why it matters

  • APIs can verify requests locally, which avoids a session lookup on every call and helps services scale.
  • One token format works across web apps, mobile apps, microservices and third-party identity providers.
  • Standard claims such as issuer, audience and expiry make it easier to apply consistent security checks.
  • JWTs are the required format for OpenID Connect ID tokens, so they appear in most modern sign-in flows.
Hand holding a smartphone running an app, with a tablet behind

How it works

How a JSON Web Token works

The header is a small JSON object naming the token type and the signing algorithm, for example an HMAC algorithm with a shared secret or an RSA or elliptic curve algorithm with a public and private key pair. The payload is another JSON object with claims. Some are registered names defined by the standard, such as sub for the subject, iss for the issuer, aud for the intended audience and exp for the expiry time. Others are custom, such as a role or tenant ID.

Each part is base64url encoded, and the signature is computed over the encoded header and payload using the chosen key. Encoding is not encryption: anyone holding the token can decode and read the payload. What the signature guarantees is integrity and origin. If someone changes a single character in the payload, the signature no longer matches and the token is rejected. When confidentiality is needed, a related standard called JWE encrypts the contents.

To validate a token, the receiving API checks the signature with the right key, confirms the algorithm is one it expects, and verifies the claims: that the token has not expired, that it came from the expected issuer and that it was meant for this audience. Because validation needs no database call, JWTs suit distributed systems and microservices, but it also means a token stays valid until it expires unless the system adds a revocation check.

Examples and common mistakes

Examples

  • A single-page app sending a short-lived access token in the Authorization header with each API request.
  • An identity provider returning an ID token that tells an app who signed in and when.
  • Microservices passing a signed token between them so each service knows which user and tenant a request belongs to.
  • A signed, time-limited link for password resets or email verification.

Common mistakes

  • Putting sensitive data in the payload, forgetting that anyone with the token can decode and read it.
  • Accepting whatever algorithm the token header names, including none, instead of enforcing the expected algorithm and key.
  • Issuing long-lived tokens with no way to revoke them, so a stolen token keeps working for days or weeks.
  • Skipping issuer and audience checks, which lets a token meant for one service be replayed against another.

Keep learning

Related terms

  • OAuthOAuth is an open standard for delegated authorization. It lets a user grant an app limited access to their data on another service without sharing their password with that app.
  • REST APIA REST API is a web API that follows the REST architectural style: it exposes data as resources at URLs and lets clients read and change them with standard HTTP methods such as GET, POST, PUT and DELETE.
  • Identity and access management (IAM)Identity and access management (IAM) is the set of policies, processes and tools that ensure the right people and systems have the right access to the right resources, and nothing more.
  • Application programming interface (API)An application programming interface (API) is a defined set of rules that lets one piece of software request data or actions from another, without needing to know how the other system works inside.

Put it into practice

Services that apply this

  • API Development & Integrations

    Well-designed APIs and dependable third-party integrations that connect your products, partners and internal systems.

    Explore service
  • Managed Cybersecurity Services

    Security audits, threat monitoring, incident response and network security delivered as an ongoing, leadership-led managed security program.

    Explore service
  • Web Application Development

    Fast, secure and accessible web applications built with React and Next.js, designed for real users and real traffic.

    Explore service

FAQ

JSON Web Token (JWT): common questions

Is a JWT encrypted?

A standard signed JWT is not encrypted. Its header and payload are only encoded, so anyone with the token can read them. The signature prevents tampering, not reading. If the contents must stay private, use an encrypted token format such as JWE, or keep sensitive data on the server and put only an identifier in the token.

Should I use JWTs or server-side sessions?

Both work. Server-side sessions are simple to revoke and suit traditional web apps on one domain. JWTs suit APIs consumed by several clients and distributed services that need to validate requests without a shared session store. Many systems combine them, using short-lived JWTs with refresh tokens managed on the server.

Where should a web app store a JWT?

There is no perfect answer, but a common recommendation is an HttpOnly, Secure cookie with an appropriate SameSite setting, which keeps the token out of reach of JavaScript and reduces exposure to cross-site scripting. Browser local storage is convenient but readable by any script on the page.

Turning this into a project?

Talk to a solution architect about where it fits in your roadmap.

Talk to an Expert
Ability TechHub team members together in the office