SaaSHub helps you find the best software and product alternatives Learn more →
Top 23 C++ header-only Projects
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
ulog – logger inspired by spdlog build on top of uvent. Instead of using own thread spawns flushing coroutine.
-
-
-
-
FTXUI
Features: - Functional style. Inspired by [1] and React - Simple and elegant syntax (in my opinion). - Support for UTF8 and fullwidth chars (→ 测试). - No dependencies. - Cross platform. Linux/mac (main target), Windows (experimental thanks to contributors), - WebAssembly. - Keyboard & mouse navigation. Operating systems: - linux emscripten - linux gcc - linux clang - windows msvc - mac clang
Project mention: Why I Built a C++ Linux System Monitor (And Why You Should Too) | dev.to | 2025-10-17Built with FTXUI for the terminal interface
-
-
-
-
Magic Enum C++
Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate code
Project mention: Magic Enum C++: Header-only C++17 library provides static reflection for enums | news.ycombinator.com | 2026-06-04 -
Project mention: How I deployed my first project for my devops portfolio: Project Architecture | dev.to | 2025-07-19
This project (Github branch main) I built this app entirely in CPP and I used the CrowCpp framework to run it.
-
Other examples are CTRE (https://github.com/hanickadot/compile-time-regular-expressio...) and format string compilation (https://fmt.dev/12.0/api/#compile-api). The closest C counterpart is re2c which also requires external tooling.
-
Regarding other ports, I've also been pretty happy with https://github.com/nodeca/argparse, which works nicely from Typescript. Looks like it hasn't been updated for a while, but it's not like there's a great deal wrong with it.
https://github.com/p-ranav/argparse is a single-file argparse for Modern C++, which means it's typically straightforward, if baffling in places and a bit annoying to step through in the debugger.
The nice thing about the argparse ports is that provided they take their job seriously, your programs will all end up with a vaguely consistent command line UX in terms of longopt syntax, and, importantly, a --help page.
-
-
glaze
Extremely fast, in memory, serialization, reflection, and RPC library for C++. JSON, BEVE, BSON, CBOR, CSV, JSONB, MessagePack, TOML, YAML, EETF
Project mention: Glaze: Fast JSON with built-in HTTP Server for modern C++ | news.ycombinator.com | 2025-09-09 -
-
Nameof C++
Nameof operator for modern C++, simply obtain the name of a variable, type, function, macro, and enum
-
-
-
-
-
I found that this repository had no pull request yet so I contacted the owner to get permission to work on it after filing an issue, then I got to work researching how to approach this using C++. My C++ is rusty, so it took me some time to work my way through the code. Finally, with a little research, I worked out that I could use the existing CMake file in this project to set up the tomlplusplus implementation which would allow me to parse a config.toml file and load default options into the tool. I added a new function, loadFromConfig, that reads the TOML file and populates the CLI options struct with values like output, include, exclude, and recent. This way, users can define their preferences once and avoid repeating long command-line arguments.
-
uvw
Header-only, event based, tiny and easy to use libuv wrapper in modern C++ - now available as also shared/static library!
C++ header-only discussion
C++ header-only related posts
-
ConjureEnum: lightweight header-only C++20 enum and typename reflection
-
Rewriting a FIX Engine in C++23: What Got Simpler (and What Didn't)
-
EnTT
-
Rewriting a FIX Engine in C++23: What Got Simpler (and What Didn't)
-
What Happens When You Port a 2001 C++ Library to C++20
-
NexusFix: Zero-alloc compile-time hardened FIX engine for sub-100ns execution
-
Show HN: Woid – 3x Faster Runtime Polymorphism. C++23
-
A note from our sponsor - SaaSHub
www.saashub.com | 13 Jun 2026
Index
What are some of the best open-source header-only projects in C++? This list will help you:
| # | Project | Stars |
|---|---|---|
| 1 | json | 49,920 |
| 2 | spdlog | 28,906 |
| 3 | cpp-httplib | 16,557 |
| 4 | entt | 12,789 |
| 5 | GLM | 11,007 |
| 6 | FTXUI | 10,251 |
| 7 | GuiLite | 7,746 |
| 8 | Crow | 7,629 |
| 9 | doctest | 6,760 |
| 10 | Magic Enum C++ | 6,103 |
| 11 | Crow | 4,878 |
| 12 | compile-time-regular-expressions | 3,811 |
| 13 | argparse | 3,441 |
| 14 | indicators | 3,391 |
| 15 | glaze | 2,835 |
| 16 | plog | 2,544 |
| 17 | Nameof C++ | 2,320 |
| 18 | cppzmq | 2,306 |
| 19 | FunctionalPlus | 2,288 |
| 20 | palanteer | 2,210 |
| 21 | PEGTL | 2,135 |
| 22 | tomlplusplus | 2,074 |
| 23 | uvw | 2,044 |