# Thalhammer/jwt-cpp

A header only library for creating and validating json web tokens in c++

Repository: https://github.com/Thalhammer/jwt-cpp
Canonical: https://ross.abutalabs.com/products/jwt-cpp
Homepage: https://thalhammer.github.io/jwt-cpp/
Language: C++
License: MIT
License Family: permissive
Topics: cpp, header-only, jwt, json-web-token
Last push: 2026-04-02T17:59:28+00:00

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 75, release rhythm 37, longevity 100
- inputs: {"age_days": 3229, "days_push": 153, "days_rel": 205, "gap_med": 335, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1160, forks 311 (observed 2026-08-28T04:03:49.038291+00:00)

## What it is
jwt-cpp is a header-only C++11 library for creating and validating JSON Web Tokens (JWT). It supports all standard signature algorithms (HMAC, RSA, ECDSA, PSS, EdDSA) with a modular design that allows adding custom algorithms.

## Use cases
- create and sign JWTs in a C++ application
- validate and decode JWT tokens for API authentication
- verify JWT signatures with RSA or ECDSA keys
- add token-based auth to a C++ web service
- decode JWT claims without verification
- support Ed25519 signed tokens in C++

## When to choose
- you need JWT support in a C++ project without adding compiled dependencies
- you need all standard JWT signature algorithms including EdDSA and ES256K
- you want a header-only library that integrates with your existing JSON library

## When to avoid
- you are working in another language like Python, Go, or JavaScript
- you need a full OAuth2/OpenID Connect client rather than just JWT handling
- you need token issuance/revocation infrastructure rather than a signing library

## Facets
- artifact type: library
- maturity: stable
- function: auth, cryptography, serialization
- domain: security, developer-tools, web-development, apis
- platform: cpp, cross-platform, windows
- tags: jwt, header-only, c++11, token-validation, jws, rfc7519, linux, macos

## Member repositories
- Thalhammer/jwt-cpp (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:49.038291+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:31:47.170579+00:00, confidence not recorded.
  - readme: https://github.com/Thalhammer/jwt-cpp (fetched 2026-08-28T04:03:49.038291+00:00, sha 9a14f4826d6a)
  - homepage: https://thalhammer.github.io/jwt-cpp/ (fetched 2026-08-29T12:36:15.584503+00:00, sha 1cb3f7eabe84)
- Data as of 2026-08-30T08:39:29.467469+00:00.
