Home

Awesome

<p align="center"> <img height="70" src="img/logo.png"/> </p> <p align="center"> <b>Awesome header-only C++ libraries</b> </p> <p align="center"> <a href="https://github.com/sindresorhus/awesome"> <img src="https://github.com/sindresorhus/awesome/blob/main/media/badge.svg"> </p>

Table of Contents

Argument Parsers

LibraryStarsDescriptionLicense
Argh!GitHub starsArgh! A minimalist argument handler.License
argparseGitHub starsArgument Parser for Modern C++.License: MIT
argsGitHub starsA simple header-only C++ argument parser library.License: MIT
cmd_line_parserGitHub starsCommand line parser for C++17.License: MIT
CLI11GitHub starsCLI11 is a command line parser for C++11 and beyond.License
clippGitHub starsPowerful & Expressive Argument Parsing for Modern C++.License: MIT
cxxoptsGitHub starsLightweight C++ GNU style option parser library.License: MIT
fire-hppGitHub starsCreate fully functional CLIs using function signatures.License
flagsGitHub starsSimple, extensible, header-only C++17 argument parser.License: Unlicense
structoptGitHub starsParse command line arguments by defining a struct.License: MIT

Audio

LibraryStarsDescriptionLicense
miniaudioGitHub starsAudio playback and capture library written in C, in a single source file.License: Unlicense
minimp3GitHub starsMinimalistic MP3 decoder single header library.License: CC0-1.0

Benchmarking

LibraryStarsDescriptionLicense
criterionGitHub starsMicrobenchmarking for Modern C++.License: MIT
nanobenchGitHub starsSimple, fast, accurate microbenchmarking for C++11.License: MIT
picobenchGitHub starsA small microbenchmarking library for C++11.License: MIT

Communication

LibraryStarsDescriptionLicense
commsGitHub starsImplement binary communication protocols in >=C++11.License: MPL 2.0

Compression

LibraryStarsDescriptionLicense
GzipGitHub starsGzip header-only C++ library.License
interpolative_codingGitHub starsBinary Interpolative Coding algorithm.License: MIT
zstrGitHub starsA C++ header-only ZLib wrapper.License: MIT

Concurrency

LibraryStarsDescriptionLicense
cs_libguardedGitHub starsMultithreaded programming.License
taskflowGitHub starsModern C++ Parallel Task Programming.License: MIT
task_systemGitHub starsBetter Code: Concurrency - Sean Parent.License: MIT
transwarpGitHub starsA header-only C++ library for task concurrency.License: MIT
taskpoolGitHub starsModern C++ taskpool.License: MIT
thread-poolGitHub starsModern C++20 thread-pool.License: MIT

Cryptography and Security

LibraryStarsDescriptionLicense
cppcodecGitHub starsEncode/decode base64, base64url, base32, etc.License: MIT
digestppGitHub stars    C++11 header-only message digest library.License: Unlicense
PicoSHA2GitHub starsHeader-file-only, SHA256 hash generator in C++.License: MIT
plusaesGitHub starsHeader only C++ AES cipher library.License
stduuidGitHub starsA C++17 cross-platform implementation for UUIDs.License: MIT

Databases

LibraryStarsDescriptionLicense
OTLOracle, ODBC and DB2-CLI Template Library.OpenBSD

Data Formats

LibraryStarsDescriptionLicense
bencodeGitHub starsC++20 bencode library.License
Boost.JSONGitHub starsJSON parsing, serialization, inspection and modification.License
cpptomlGitHub starsHeader-only library for parsing TOML.License: MIT
csv2GitHub starsFast CSV parser and writer for Modern C++.License: MIT
CSV ParserGitHub starsReading, writing, and analyzing CSV files.License: MIT
daw_json_linkGitHub starsStatic JSON parsing in C++.License
Fast C++ CSV ParserGitHub starsFast library for reading CSV files.License
FlatJSONGitHub starsExtremely fast just one allocation and zero copy JSON parser.License
GlazeGitHub starsExtremely fast, in memory, JSON and interface library for modern C++.License: MIT
inihGitHub starsThis is a header only C++ version of inih.License
nlohmann/jsonGitHub starsJSON for Modern C++.License: MIT
json_structGitHub starsHigh performance, single header only to serialize and deserialize JSON to C++ structs.License: MIT
jsonconsGitHub starsConstruct JSON and JSON-like data formats.License
minicsvGitHub starsBare minimal CSV stream based on C++ file streams.License: MIT
picojsonGitHub starsa header-file-only, JSON parser serializer in C++.License
pugixmlGitHub stars          A C++ XML processing library with a DOM-like interface and XPath 1.0 support.License: MIT
rapidcsvGitHub starsC++ CSV parser library.License
rapidjsonGitHub starsA fast JSON parser/generator for C++.License: MIT
rapidxmlGitHub stars          RapidXML fork; XML namespacing, per-element parsing, etc.License
simdjsonGitHub starsParsing gigabytes of JSON per second.License
simpleiniGitHub starsRead and write INI-style configuration files.License: MIT
taocpp JSONGitHub starsC++ header-only JSON library.License: MIT
toml11GitHub starsTOML for Modern C++.License: MIT
tomlplusplusGitHub starsTOML config file parser and serializer for >=C++17.License: MIT
tortelliniGitHub starsA really stupid INI file format for C++11.License: Unlicense License: MIT
valijsonGitHub starsJSON Schema validation.License
xml2jsonGitHub starsA header-only C++ library converts XML to JSON.License: MIT

Data Mining, Machine Learning, and Deep Learning

LibraryStarsDescriptionLicense
dlibGitHub starsA toolkit for real-world machine learning and data analysis.License
frugally deepGitHub starsUse Keras models in C++.License: MIT
gaenariGitHub starsIncremental decision tree in C++17.License
hnswlibGitHub starsFast approximate nearest neighbors.License
MiniDNNGitHub starsA header-only C++ library for deep neural networks.License: MPL 2.0
mlpackGitHub starsmlpack: a fast, header-only C++ machine learning library.License
nanoflannGitHub starsNearest Neighbor (NN) search with KD-trees.License
tiny-dnnGitHub starsDependency-free deep learning framework in C++14.License

Data Formatting and Presentation

LibraryStarsDescriptionLicense
asapGitHub starsCreating, displaying, iterating and manipulating dates.License: MIT
cxx prettyprintGitHub starsPretty-printing of any container in C++(0x).License
emioGitHub starsA safe and fast high-level and low-level character input/output C++20 library.License: MIT
fmtGitHub starsA modern formatting library.License: MIT
pprintGitHub starsPretty Printer for Modern C++.License: MIT
strfGitHub starsA fast formatting library for C++14.License
tabulateGitHub starsTable Maker for Modern C++.License: MIT

Data Querying

LibraryStarsDescriptionLicense
boolinqGitHub starsSimplest C++ header-only LINQ template library.License: MIT

Data Structures and Algorithms

LibraryStarsDescriptionLicense
BitMagicGitHub starsCompressed bit-vectors, logical operations, memory compact containers.License
concurrent queueGitHub starsFast multi-producer, multi-consumer lock-free concurrent queue.License License
dynamic bitsetGitHub starsThe C++17 header-only dynamic bitset.License: MIT
frozenGitHub starsConstexpr alternative to gperf for C++14 users.License
hopscotch mapGitHub stars          Fast hash map and hash set using hopscotch hashing.License: MIT
immerGitHub starsPostmodern immutable and persistent data structures.License
MPMCQueueGitHub starsA bounded multi-producer multi-consumer concurrent queue.License: MIT
outcomeGitHub starsLightweight outcome<T> and result<T>.License
parallel hashmapGitHub starsVery fast and memory-friendly hashmap and btree containers.License
PGM-indexGitHub stars                Blazing fast queries and updates over billions of items using orders of magnitude less memory than other containers.License
robin-hood hashingGitHub starsFast & memory efficient hashtable based on robin hood hashing.License: MIT
robin-mapGitHub starsFast hash map and hash set using robin hood hashing.License: MIT
sfl-libraryGitHub starsSmall vector. Small flat map/multimap/set/multiset (ordered and unordered). C++11.License: Zlib
smallGitHub starsImplementations of the main STL containers optimized for the case when they are small.License: BSL
triesGitHub starsFast and highly customisable C++20 trie implementation.License: GPL-2.0

Debugging

LibraryStarsDescriptionLicense
backward-cppGitHub starsA beautiful stack trace pretty printer for C++.License: MIT

Deep Learning

LibraryStarsDescriptionLicense
cerasGitHub starsA deep learning engine in C++20.License

Dependency Injection

LibraryStarsDescriptionLicense
inversify-cppGitHub starsC++17 inversion of control and dependency injection container library.License: MIT

Event Handling Mechanisms

LibraryStarsDescriptionLicense
eventbusGitHub starsMediator pattern event bus for C++.License
eventppGitHub starsEvent Dispatcher and callback list for C++.License
periodic-functionGithub StartsCallbacks at a specified time interval.License: MIT

File System

LibraryStarsDescriptionLicense
simplebinstreamGitHub starsC++ Simplistic Binary Stream.License: MIT
filesystemGitHub starsCross-platform implementation of std::filesystem for C++11/14/17.License: MIT
globGitHub starsGlob for C++17.License: MIT
llfioGitHub starsP1031 low-Level file i/o and filesystem library.License
mioGitHub starsCross-platform C++11 memory mapped file IO.License: MIT
mm_fileGitHub starsMemory-mapped files for C++.License: MIT
tinydirGitHub stars      Lightweight, portable C directory and file reader.License

Functional Programming

LibraryStarsDescriptionLicense
FunctionalPlusGitHub starsFunctional Programming Library for C++.License
immerGitHub starsPersistent functional data structures in C++.License
lagerGitHub starsRedux-like unidirectional data-flow for C++.License: MIT
schmutzGitHub starsEasy Guile Scheme C++ bindings.License
zugGitHub starsTransducers (from Clojure) in C++.License

Geometry, Graphics Processing, and Game Development

LibraryStarsDescriptionLicense
arcball_cameraGitHub starsImmediate-mode camera for your graphics demos.License: Unlicense
BrutusGitHub starsMarching cubes implementation.License: Unlicense
cinolibGitHub starsProcess polygonal and polyhedral meshes.License: MIT
crGitHub starsA Simple C Hot Reload Header-only Library.License: MIT
CxxSwizzleGitHub starsModern C++ swizzling header-only library.License: MIT
earcut.hppGitHub starsFast Polygon triangulation.License: ISC
enttGitHub starsEntity component system (ECS) and much more.License: MIT
glmGitHub starsOpenGL Mathematics (GLM).License: MIT
librgGitHub stars🚀 Making multi-player gamedev simpler since 2017.License                  
micro-glGitHub stars👾 CPU Vector Graphics Engine (No FPU or std-lib needed).License: Unlicense
nanortGitHub starsModern ray tracing kernel.License: MIT
pxGitHub starsThread Scheduling, Rendering, and so on.License: MIT
Simple OpenGL LoaderGitHub starsExtensible, cross-platform OpenGL loader.License: MIT
SokolGitHub starsCross-platform libraries for C and C++.License: Zlib
stbGitHub starsSingle-file public domain libraries.License: MIT
SwarmzGitHub starsSwarming (flocking) library for real-time applications.License: Unlicense
tiny-differentiable-simulatorGitHub stars              Tiny Differentiable Simulator is a header-only C++ physics library with zero dependencies.License
tinygltfGitHub starsC++11 tiny glTF 2.0 library.License: MIT
tweenyGitHub starsA modern C++ tweening library.License: MIT
VookooGitHub starsTake the pain out of Vulkan.License: MIT
voxelizerGitHub starsHeader only mesh voxelizer in c99.

GPU

LibraryStarsDescriptionLicense
thrustGitHub starsParallel programming library.License                      
vudaGitHub stars                      Vulkan-based library that provides a CUDA Runtime API interface for writing GPU-accelerated applications.License: MIT
mudaGitHub starsElegant kernel launch, debug-friendly memory accessor, automatic CudaGraph generation & updating for CUDA.License

Graph

LibraryStarsDescriptionLicense
CXXGraphGitHub stars      Graph Representation and Algorithms Library >= C++17                              License          
GraafGitHub starsA general-purpose lightweight C++20 graph library.License: MIT

GUI

LibraryStarsDescriptionLicense
CenturionGitHub starsA modern C++17/20 wrapper library for SDL2.License: MIT
GuiLiteGitHub starsThe smallest header-only GUI library(5 KLOC) for all platforms.License
NuklearGitHub starsImmediate mode cross-platform GUI library.License: MIT License: Unlicense
WinLambGitHub starsC++11 native Win32 GUI library.License: MIT

High-performance Computing

LibraryStarsDescriptionLicense
MPLGitHub starsA C++11 message passing library based on the Message Passing Interface standard.License

HTTP and the Web

LibraryStarsDescriptionLicense
cinatraGitHub starsModern (c++17), Cross-platform Http Framework.License: MIT
cpp-httplibGitHub starsA C++11 Cross platform HTTP/HTTPS library.License: MIT
jwt-cppGitHub starsCreate and validate JSON web tokens.License: MIT
RESTinioGitHub starsAsynchronous HTTP/WebSocket server C++14 libraryLicense
cuehttpGitHub starsModern c++ middleware framework for http(http/https)/websocket(ws/wss).License
libfvGitHub starslibfv is C++20 header-only network library, support TCP/SSL/Http/websocket server and clientLicense: MIT
NetIFGitHub starsCross-platform network interface addresses without name lookups in C++14.License

Image Processing

LibraryStarsDescriptionLicense
BitmapPlusPlusGitHub starsSimple and Fast header only Bitmap (BMP) library.License: MIT
CImgGitHub starsCool Image, one file: full featured image processing.License: MIT
color-utilGitHub starsColors, Color space converters for RGB, HSL, XYZ, Lab, etc.License: MIT
colorGitHub starsColor manipulation/conversion for different types and formats.License: MIT
nanopmGitHub starsNanoPM, single header only PatchMatch.

Language Bindings

LibraryStarsDescriptionLicense
jni.hppGitHub starsA modern, type-safe, C++14 wrapper for JNI.License: MIT
pybind11GitHub starsSeamless operability between C++11 and Python.License
SeleneGitHub starsSimple C++11 friendly bindings to Lua.License: Zlib
SolGitHub starsSol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance.License
v8ppGitHub starsBind C++ functions and classes into V8 JavaScript engine.License

Language Development

LibraryStarsDescriptionLicense
Command InterpreterGitHub starsAdd a command interpreter (eg., REPL) to any C++ program.License

Logging

LibraryStarsDescriptionLicense
easyloggingppGitHub starsSingle header C++ logging library.License: MIT
plogGitHub starsPortable, simple and extensible C++ logging library.License: MPL 2.0
spdlogGitHub starsFast C++ logging library.License: MIT

Mathematics

LibraryStarsDescriptionLicense
amgclGitHub starsSolve large sparse linear systems with algebraic multigrid method.License: MIT
dj_fftGitHub starsFFT library.License: MIT License: Unlicense
eigenTemplate library for linear algebra.License                  
exprtkGitHub starsC++ Mathematical Expression Toolkit.License: MIT
fpmGitHub starsFixed-point math library.License: MIT
kfrGitHub starsFast DSP framework, FFT, Sample Rate Conversion, etc.License: GPL v2
libmortonGitHub stars                  Methods to efficiently encode/decode Morton codes in/from 2D/3D coordinates.License: MIT
linalgGitHub starsShort vector math library for C++.License: Unlicense
matplotlib-cppGitHub starsC++ plotting library built on the popular matplotlib.License: MIT
matrixGitHub starsA 2D matrix lib in C++20.License
NumCppGitHub starsC++ implementation of the Python Numpy library.License: MIT
randomGitHub starsRandom for modern C++ with convenient API.License: MIT
spectraGitHub starsA header-only C++ library for large scale eigenvalue problems.License: MPL 2.0
universalGitHub starsUniversal Number Arithmetic.License: MIT

Memory Management

LibraryStarsDescriptionLicense
ugcGitHub starsIncremental garbage collector.License

Mocking

LibraryStarsDescriptionLicense
FakeItGitHub starsC++ mocking made easy.License: MIT
trompeloeilGitHub starsC++14 mocking framework.License

Networking

LibraryStarsDescriptionLicense
asioGitHub starsAsio C++ Library.
asio-grpcGitHub starsAsynchronous gRPC with Asio/unified executors.License
brynetGitHub starsCross-platform C++ TCP network library.License: MIT
cppzmqGitHub starsHeader-only C++ binding for libzmq.License: MIT
nygmaGitHub starsNetwork packet processing and indexing.License: BlueOak
uvwGitHub starslibuv wrapper in modern C++.License: MIT

Optimization

LibraryStarsDescriptionLicense
ensmallenGitHub starsC++ library for numerical optimization.License

Parsing

LibraryStarsDescriptionLicense
lexertl14GitHub starsThe Modular Lexical Analyser Generator.License
Matcheroni & ParseroniGitHub starsC++20 libraries for doing pattern matching using Parsing Expression GrammarsLicense: MIT
parsertl14GitHub starsThe Modular Parser Generator.License

Parsing Expression Grammars

LibraryStarsDescriptionLicense
cpp-peglibGitHub starsPEG (Parsing Expression Grammars) library.License: MIT
lugGitHub starsA C++17 embedded domain specific language for expressing parsers as extended PEG.License: MIT
PEGTLGitHub starsParsing Expression Grammar Template Library.License: MIT

Portability Definitions

LibraryStarsDescriptionLicense
hedleyGitHub starsMove #ifdefs out of your code.License: CC0-1.0

Reflection

LibraryStarsDescriptionLicense
better-enumsGitHub starsC++ compile-time enum to string, iteration.License
magic_enumGitHub starsStatic reflection for enums.License: MIT
metaGitHub starsMacro-free runtime reflection system.License: MIT
nameofGitHub starsNameof operator for modern C++.License: MIT
refl-cppGitHub starsCompile-time reflection library.License: MIT
visit_structGitHub starsA miniature library for struct-field reflection.License

Regular Expression

LibraryStarsDescriptionLicense
compile-time regular expressionsGitHub stars        A Compile time regular expression matcher.License
SRELLGitHub stars        A ECMAScript (JavaScript) compatible regular expression engine.License

Robotics

LibraryStarsDescriptionLicense
manifGitHub starsSmall library for Lie theory.License: MIT

Serialization

LibraryStarsDescriptionLicense
alpacaGitHub starsSerialization library written in C++17.License: MIT
cerealGitHub starsA C++11 library for serialization.License
essentialsGitHub starsTransparent serialization/deserialization.License: MIT
fuserGitHub starsAutomatic (de)serialization of C++ types to/from JSON.License: MIT
YASGitHub starsA C++11 (de)serialization library with support for binary/text/json archives.License: MIT
cistaGitHub starssimple, high-performance, zero-copy C++ serialization & reflection library.License: MIT

SIMD

LibraryStarsDescriptionLicense
libsimdppGitHub starsLow-level SIMD library.License
simdeGitHub starsImplementations of SIMD instruction sets.License: MIT
tsimdGitHub starsFundamental C++ SIMD types for Intel CPUs.License: MIT

Standard/Support Libraries

LibraryStarsDescriptionLicense
bitflagsGitHub starsEasily managing set of flags.License: MIT
cpp-typelistGitHub starsModern typelist for C++20License
expectedGitHub starsC++11/14/17 std::expected.License
expected-liteGitHub starsExpected objects in C++11 and later.License
fluxGitHub starsA C++20 library for sequence-orientated programming.License
gslGitHub starsISO C++ Guidelines Support Library (GSL) by Microsoft.License: MIT
gsl-liteGitHub starsISO C++ Guidelines Support Library (GSL).License: MIT
hanaGitHub starsYour standard library for metaprogramming.License
itlibGitHub starsStandard-library-like containers and extensions.License: MIT
leafGitHub starsLightweight Error Augmentation Framework.License
libunifexGitHub starsUnified ExecutorsLicense
match(it)GitHub starsA lightweight pattern-matching library for C++17 with macro-free APIs.License
mp11GitHub starsC++11 metaprogramming library.License
NanoRangeGitHub starsRange-based goodness for C++17.License
numeric_rangesGitHub starsNumeric algorithms for C++20 Ranges.License
optionalGitHub starsC++11/14/17 std::optional.License: CC0-1.0
optional-liteGitHub starsA C++17-like optional for C++98/11 and later.License
range-v3GitHub starsRange library for C++14/17/20.License
rangesnextGitHub starsTanges features for c+23 ported to C++20.License
span-liteGitHub starsA C++20-like span for C++98/11 and later.License
string-view-liteGitHub starsA C++17-like string_view for C++98/11 and later.License
uberswitchGitHub starsAlternative to the C++ switch statement.License: Unlicense
variant-liteGitHub starsA C++17-like variant for C++98/11 and later.License
Windows Implementation Libraries (WIL)GitHub stars                Readable type-safe C++ interfaces for common Windows coding patterns.License: MIT                

State Machine

LibraryStarsDescriptionLicense
hfsm2GitHub starsHigh-performance hierarchical finite state machine framework.License: MIT
hsmGitHub starsFinite state machine library based on the boost hana.License: MIT
tinyfsmGitHub starsA simple C++ finite state machine library.License: MIT
SMLiteGitHub starsState machine library for C, C++, C#, Java, JavaScript, Python, VB.Net.License: MIT
cuestateGitHub starsC++ template metaprogramming FSM.License

Statistics

LibraryStarsDescriptionLicense
histogramGitHub starsMulti-dimensional generalized histograms.License
kalmanGitHub starsKalman Filtering Library (EKF, UKF) based on Eigen3.License: MIT
statsGitHub starsStatistical distribution functions.License

String Utilities

LibraryStarsDescriptionLicense
utf-cppGitHub starsUTF-8/16/32 for Windows/Linux/MacOs.License: MIT
wildcardsGitHub starsString matching using wildcards.License

Templating Engines

LibraryStarsDescriptionLicense
injaGitHub starsA Template Engine for Modern C++.License: MIT

Terminal Utilities

LibraryStarsDescriptionLicense
indicatorsGitHub starsActivity Indicators for Modern C++.License: MIT
rangGitHub starsA Minimal library for terminal goodies 💄✨.License: Unlicense
termcolorGitHub starsPrint colored messages to the terminal.License

Testing Frameworks

LibraryStarsDescriptionLicense
ApprovalTests.cppGitHub starsNative ApprovalTests for C++.License
Catch2GitHub starsTest framework for unit-tests, TDD and BDD.License
doctestGitHub starsThe fastest feature-rich C++11/14/17/20 testing framework.License: MIT
iutestGitHub starsTest framework for unit-tests.License
lestGitHub starsTiny framework for unit-tests, TDD and BDD.License
snitchGitHub starsLightweight C++20 testing framework.License
utGitHub starsUT: C++20 μ(micro)/Unit Testing Framework.License

Unicode

LibraryStarsDescriptionLicense
cpp-unicodelibGitHub starsC++17 Unicode library.License: MIT
uni-algoGitHub starsUnicode algorithms for C++17.License: CC0-1.0

Units

LibraryStarsDescriptionLicense
LLNL/unitsGitHub starsRun-time unit representation and conversion.License
mpusz/unitsGitHub starsCompile-time dimensional analysis and unit/quantity manipulation.License: MIT
nholthaus/unitsGitHub starsDimensional analysis and unit conversion library.License: MIT
SIGitHub starsType safety and user defined literals for physical units.License: MIT

Validation

LibraryStarsDescriptionLicense
cpp-validatorGitHub starsC++ library for data validation.License

Web Frameworks

LibraryStarsDescriptionLicense
crowGitHub starsMicro web framework inspired by Python Flask.License