Topics / #header-only
Header-only projects on GitHub
C++ libraries distributed as headers only, requiring no separate compilation step.
As of , the most-starred Header-only projects on GitHub are json (50.9K stars), stb (35K stars) and spdlog (29.8K stars). GitHub.Locker tracks 16 Header-only repositories with 285.8K stars combined. The fastest-growing on November 30 was json, with +9 stars in a day.
Hot right now
Most stars gained in a day · Nov 30
json
nlohmann/json · ★ 50.9KA JSON library for Modern C++ (nlohmann/json) that lets you read, create, and manipulate JSON values with intuitive, STL-like syntax directly in C++ code.
+9stb
nothings/stb · ★ 35KA collection of 21 single-file libraries for C/C++ covering image loading, writing and resizing, font rasterizing, audio decoding, containers and more — all released into the public domain, with an MIT option if you need a regular license.
+9spdlog
gabime/spdlog · ★ 29.8Kspdlog is a very fast C++ logging library. It ships header-only or as a compiled library, and its message formatting is powered by the fmt library.
clay
nicbarker/clay · ★ 18.4KClay (short for C Layout) is a high performance 2D UI layout library in C. You describe your UI with React-like declarative macros, it computes element positions and sizes in microseconds, and hands you back render commands.
The all-time top
16 projects · by stars
- 50.9K
#1 · nlohmann/json
json
A JSON library for Modern C++ (nlohmann/json) that lets you read, create, and manipulate JSON values with intuitive, STL-like syntax directly in C++ code.
- 35K
#2 · nothings/stbstb
A collection of 21 single-file libraries for C/C++ covering image loading, writing and resizing, font rasterizing, audio decoding, containers and more — all released into the public domain, with an MIT option if you need a regular license.
- 29.8K
#3 · gabime/spdlogspdlog
spdlog is a very fast C++ logging library. It ships header-only or as a compiled library, and its message formatting is powered by the fmt library.
- 4

fmt
25.9Kfmtlib/fmt · C++{fmt} is an open-source C++ formatting library — a fast, safe alternative to C stdio and C++ iostreams, with a format string syntax similar to Python's.
- 5
clay
18.4Knicbarker/clay · CClay (short for C Layout) is a high performance 2D UI layout library in C. You describe your UI with React-like declarative macros, it computes element positions and sizes in microseconds, and hands you back render commands.
- 6

pybind11
18Kpybind/pybind11 · C++pybind11 is a lightweight header-only C++ library that exposes C++ types in Python and vice versa — mainly to create Python bindings for existing C++ code.
- 7

cpp-httplib
17Kyhirose/cpp-httplib · C++A C++11 single-file header-only HTTP/HTTPS server and client library — you add networking to a C++ program by including one header, httplib.h.
- 8

rapidjson
15.2KTencent/rapidjson · C++RapidJSON is a fast, header-only JSON parser and generator library for C++, supporting both SAX and DOM style APIs.
- 9

entt
13.3Kskypjack/entt · C++EnTT is a fast, header-only entity component system (ECS) for modern C++ game programming, plus a bunch of related utilities like reflection, event dispatching, and resource management.
- 10

concurrentqueue
12.5Kcameron314/concurrentqueue · C++moodycamel::ConcurrentQueue is an industrial-strength, lock-free multi-producer multi-consumer queue for C++11.
- 11

taskflow
12.2Ktaskflow/taskflow · C++Taskflow is a C++ library that helps you write high-performance task-parallel programs with high programming productivity, letting you build and run graphs of dependent tasks across CPU threads and GPUs.
- 12

Nuklear
11.5KImmediate-Mode-UI/Nuklear · CNuklear is a minimal-state, immediate-mode graphical user interface toolkit written in ANSI C, designed as a simple embeddable UI that you build into your own application.
- 13

DeepEP
10.5Kdeepseek-ai/DeepEP · CudaDeepEP is a high-performance communication library for MoE (mixture-of-experts) models, providing fast all-to-all GPU kernels for expert-parallel dispatch and combine operations used in ML training and inference.
- 14

sokol
10.4Kfloooh/sokol · CSokol is a collection of minimal, cross-platform, standalone C header libraries for building apps and games: 3D graphics, windowing and input, audio, time, async file loading and argument parsing.
- 15

matplotlib-cpp
4.8Klava/matplotlib-cpp · C++A header-only C++ plotting library that wraps Python's matplotlib, so you can make plots from C++ using an API that resembles Matlab and matplotlib.
- 16

umium
324hotline1337/umium · C++Umium is a security-focused anti-debugging and anti-reverse-engineering library for high-resilience Windows 10/11 x64 applications. It uses undocumented Windows NT system functions and runtime modifications to detect and neutralize debugging, memory tampering, or sandboxing attempts.
Related topics
Often tagged together