fmtlib/fmtPublic

A modern formatting library

AI summary: A fast, safe, and modern formatting library for C++ that serves as an alternative to C stdio and C++ iostreams

Stars
25.7K
+16 today
Forks
3.1K
Watchers
326
Open issues
7
Open PRs
7
Contributors
~626
Commits
8K
Branches
4

C++MITCreated Dec 7, 2012Last push 1d agoLatest release 12.2.0+688 stars this week+688 this month

Star history

since Jan 8, 2023
010K20KJan 2023Mar 2024Jun 2025Sep 2026
25.7K stars as of Sep 10, 2026, tracked back to Jan 8, 2023. Historical curve reconstructed from public GitHub event archives, calibrated to the current total.

Contribution activity

commits per day, last 52 weeks
SepOctNovDecJanFebMarAprMayJunJulAugMonWedFri2025-09-07: 6 commits2025-09-08: 1 commit2025-09-09: 0 commits2025-09-10: 3 commits2025-09-11: 0 commits2025-09-12: 0 commits2025-09-13: 8 commits2025-09-14: 0 commits2025-09-15: 0 commits2025-09-16: 0 commits2025-09-17: 6 commits2025-09-18: 0 commits2025-09-19: 1 commit2025-09-20: 0 commits2025-09-21: 4 commits2025-09-22: 2 commits2025-09-23: 0 commits2025-09-24: 0 commits2025-09-25: 1 commit2025-09-26: 2 commits2025-09-27: 0 commits2025-09-28: 1 commit2025-09-29: 0 commits2025-09-30: 0 commits2025-10-01: 1 commit2025-10-02: 4 commits2025-10-03: 1 commit2025-10-04: 0 commits2025-10-05: 0 commits2025-10-06: 1 commit2025-10-07: 2 commits2025-10-08: 1 commit2025-10-09: 0 commits2025-10-10: 2 commits2025-10-11: 1 commit2025-10-12: 6 commits2025-10-13: 1 commit2025-10-14: 0 commits2025-10-15: 0 commits2025-10-16: 2 commits2025-10-17: 1 commit2025-10-18: 1 commit2025-10-19: 4 commits2025-10-20: 1 commit2025-10-21: 0 commits2025-10-22: 4 commits2025-10-23: 0 commits2025-10-24: 0 commits2025-10-25: 9 commits2025-10-26: 0 commits2025-10-27: 0 commits2025-10-28: 0 commits2025-10-29: 1 commit2025-10-30: 1 commit2025-10-31: 0 commits2025-11-01: 2 commits2025-11-02: 1 commit2025-11-03: 7 commits2025-11-04: 3 commits2025-11-05: 1 commit2025-11-06: 1 commit2025-11-07: 1 commit2025-11-08: 0 commits2025-11-09: 0 commits2025-11-10: 0 commits2025-11-11: 0 commits2025-11-12: 1 commit2025-11-13: 0 commits2025-11-14: 0 commits2025-11-15: 0 commits2025-11-16: 0 commits2025-11-17: 0 commits2025-11-18: 0 commits2025-11-19: 1 commit2025-11-20: 0 commits2025-11-21: 0 commits2025-11-22: 8 commits2025-11-23: 2 commits2025-11-24: 0 commits2025-11-25: 0 commits2025-11-26: 0 commits2025-11-27: 0 commits2025-11-28: 1 commit2025-11-29: 1 commit2025-11-30: 2 commits2025-12-01: 1 commit2025-12-02: 0 commits2025-12-03: 0 commits2025-12-04: 1 commit2025-12-05: 0 commits2025-12-06: 0 commits2025-12-07: 3 commits2025-12-08: 0 commits2025-12-09: 3 commits2025-12-10: 0 commits2025-12-11: 0 commits2025-12-12: 0 commits2025-12-13: 0 commits2025-12-14: 0 commits2025-12-15: 1 commit2025-12-16: 0 commits2025-12-17: 2 commits2025-12-18: 0 commits2025-12-19: 0 commits2025-12-20: 0 commits2025-12-21: 0 commits2025-12-22: 0 commits2025-12-23: 0 commits2025-12-24: 0 commits2025-12-25: 0 commits2025-12-26: 1 commit2025-12-27: 0 commits2025-12-28: 0 commits2025-12-29: 0 commits2025-12-30: 1 commit2025-12-31: 1 commit2026-01-01: 1 commit2026-01-02: 0 commits2026-01-03: 2 commits2026-01-04: 1 commit2026-01-05: 1 commit2026-01-06: 1 commit2026-01-07: 0 commits2026-01-08: 0 commits2026-01-09: 0 commits2026-01-10: 0 commits2026-01-11: 0 commits2026-01-12: 0 commits2026-01-13: 0 commits2026-01-14: 0 commits2026-01-15: 0 commits2026-01-16: 0 commits2026-01-17: 1 commit2026-01-18: 0 commits2026-01-19: 0 commits2026-01-20: 1 commit2026-01-21: 1 commit2026-01-22: 2 commits2026-01-23: 0 commits2026-01-24: 0 commits2026-01-25: 3 commits2026-01-26: 1 commit2026-01-27: 0 commits2026-01-28: 2 commits2026-01-29: 11 commits2026-01-30: 4 commits2026-01-31: 4 commits2026-02-01: 6 commits2026-02-02: 7 commits2026-02-03: 2 commits2026-02-04: 0 commits2026-02-05: 1 commit2026-02-06: 0 commits2026-02-07: 1 commit2026-02-08: 1 commit2026-02-09: 0 commits2026-02-10: 0 commits2026-02-11: 0 commits2026-02-12: 1 commit2026-02-13: 0 commits2026-02-14: 0 commits2026-02-15: 0 commits2026-02-16: 1 commit2026-02-17: 0 commits2026-02-18: 0 commits2026-02-19: 0 commits2026-02-20: 0 commits2026-02-21: 3 commits2026-02-22: 0 commits2026-02-23: 1 commit2026-02-24: 1 commit2026-02-25: 0 commits2026-02-26: 0 commits2026-02-27: 0 commits2026-02-28: 1 commit2026-03-01: 2 commits2026-03-02: 1 commit2026-03-03: 8 commits2026-03-04: 2 commits2026-03-05: 4 commits2026-03-06: 0 commits2026-03-07: 1 commit2026-03-08: 1 commit2026-03-09: 0 commits2026-03-10: 1 commit2026-03-11: 2 commits2026-03-12: 0 commits2026-03-13: 1 commit2026-03-14: 2 commits2026-03-15: 1 commit2026-03-16: 1 commit2026-03-17: 0 commits2026-03-18: 0 commits2026-03-19: 0 commits2026-03-20: 0 commits2026-03-21: 0 commits2026-03-22: 1 commit2026-03-23: 1 commit2026-03-24: 0 commits2026-03-25: 1 commit2026-03-26: 0 commits2026-03-27: 0 commits2026-03-28: 2 commits2026-03-29: 0 commits2026-03-30: 0 commits2026-03-31: 0 commits2026-04-01: 0 commits2026-04-02: 3 commits2026-04-03: 1 commit2026-04-04: 0 commits2026-04-05: 0 commits2026-04-06: 1 commit2026-04-07: 0 commits2026-04-08: 0 commits2026-04-09: 0 commits2026-04-10: 3 commits2026-04-11: 0 commits2026-04-12: 2 commits2026-04-13: 0 commits2026-04-14: 1 commit2026-04-15: 0 commits2026-04-16: 1 commit2026-04-17: 0 commits2026-04-18: 0 commits2026-04-19: 0 commits2026-04-20: 1 commit2026-04-21: 0 commits2026-04-22: 0 commits2026-04-23: 0 commits2026-04-24: 1 commit2026-04-25: 0 commits2026-04-26: 0 commits2026-04-27: 0 commits2026-04-28: 0 commits2026-04-29: 1 commit2026-04-30: 3 commits2026-05-01: 1 commit2026-05-02: 0 commits2026-05-03: 2 commits2026-05-04: 0 commits2026-05-05: 1 commit2026-05-06: 0 commits2026-05-07: 0 commits2026-05-08: 0 commits2026-05-09: 0 commits2026-05-10: 0 commits2026-05-11: 0 commits2026-05-12: 0 commits2026-05-13: 0 commits2026-05-14: 0 commits2026-05-15: 0 commits2026-05-16: 0 commits2026-05-17: 0 commits2026-05-18: 0 commits2026-05-19: 0 commits2026-05-20: 0 commits2026-05-21: 1 commit2026-05-22: 1 commit2026-05-23: 0 commits2026-05-24: 0 commits2026-05-25: 1 commit2026-05-26: 0 commits2026-05-27: 0 commits2026-05-28: 0 commits2026-05-29: 0 commits2026-05-30: 0 commits2026-05-31: 15 commits2026-06-01: 9 commits2026-06-02: 18 commits2026-06-03: 0 commits2026-06-04: 0 commits2026-06-05: 2 commits2026-06-06: 0 commits2026-06-07: 0 commits2026-06-08: 4 commits2026-06-09: 3 commits2026-06-10: 2 commits2026-06-11: 0 commits2026-06-12: 1 commit2026-06-13: 0 commits2026-06-14: 0 commits2026-06-15: 0 commits2026-06-16: 2 commits2026-06-17: 2 commits2026-06-18: 1 commit2026-06-19: 0 commits2026-06-20: 0 commits2026-06-21: 0 commits2026-06-22: 0 commits2026-06-23: 0 commits2026-06-24: 0 commits2026-06-25: 0 commits2026-06-26: 5 commits2026-06-27: 0 commits2026-06-28: 1 commit2026-06-29: 0 commits2026-06-30: 0 commits2026-07-01: 1 commit2026-07-02: 0 commits2026-07-03: 1 commit2026-07-04: 1 commit2026-07-05: 1 commit2026-07-06: 0 commits2026-07-07: 0 commits2026-07-08: 0 commits2026-07-09: 0 commits2026-07-10: 0 commits2026-07-11: 2 commits2026-07-12: 3 commits2026-07-13: 0 commits2026-07-14: 0 commits2026-07-15: 0 commits2026-07-16: 0 commits2026-07-17: 3 commits2026-07-18: 0 commits2026-07-19: 1 commit2026-07-20: 2 commits2026-07-21: 0 commits2026-07-22: 1 commit2026-07-23: 3 commits2026-07-24: 0 commits2026-07-25: 1 commit2026-07-26: 1 commit2026-07-27: 0 commits2026-07-28: 1 commit2026-07-29: 4 commits2026-07-30: 0 commits2026-07-31: 1 commit2026-08-01: 0 commits2026-08-02: 0 commits2026-08-03: 1 commit2026-08-04: 0 commits2026-08-05: 2 commits2026-08-06: 0 commits2026-08-07: 0 commits2026-08-08: 0 commits2026-08-09: 1 commit2026-08-10: 1 commit2026-08-11: 1 commit2026-08-12: 1 commit2026-08-13: 1 commit2026-08-14: 0 commits2026-08-15: 0 commits2026-08-16: 1 commit2026-08-17: 0 commits2026-08-18: 0 commits2026-08-19: 0 commits2026-08-20: 0 commits2026-08-21: 0 commits2026-08-22: 0 commits2026-08-23: 2 commits2026-08-24: 0 commits2026-08-25: 0 commits2026-08-26: 0 commits2026-08-27: 1 commit2026-08-28: 0 commits2026-08-29: 3 commits2026-08-30: 5 commits2026-08-31: 0 commits2026-09-01: 1 commit2026-09-02: 3 commits2026-09-03: 0 commits2026-09-04: 0 commits2026-09-05: 0 commits
360 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Widely adopted

    25,719 stars

  • Battle-tested

    13 years of history

  • Actively maintained

    Pushed within 48 hours

  • Community-driven

    ~626 contributors

  • Permissive license

    MIT

  • Repeat trending

    9 trending appearances

What fmt does

The {fmt} library is an open-source formatting solution for C++ that provides a type-safe, high-performance alternative to traditional C `stdio` and C++ `iostreams`. It implements the formatting syntax adopted by C++20's `std::format` and C++23's `std::print`, allowing developers to write Python-like format strings using positional arguments. Designed for extreme performance and minimal code bloat, it uses advanced algorithms like Dragonbox for fast, accurate floating-point formatting. It is highly extensible, allowing users to define custom formatters for their own types while ensuring compile-time safety and preventing common memory errors like buffer overflows.

The {fmt} library is a foundational tool for C++ developers looking to improve the safety, readability, and performance of string formatting in their applications. It is widely used across the C++ ecosystem, from embedded systems to massive AAA game engines.

  • Modern format API: implements C++20 std::format and C++23 std::print functionality with Python-like syntax.
  • Compile-time safety: validates format strings during compilation, preventing runtime crashes and buffer overflows.
  • Dragonbox algorithm: formats IEEE 754 floating-point numbers with unmatched speed, perfect rounding, and guaranteed round-tripping.
  • Type extensibility: provides a straightforward API for developers to register custom formatting rules for user-defined types.
  • Minimal code bloat: designed as a lightweight dependency with a core implementation contained in just three header files.
  • High performance: consistently benchmarks faster than standard library implementations of printf, iostreams, and to_string.

Where teams use it

High-performance Logging

Used by latency-sensitive applications like game engines and trading systems to format log messages with minimal CPU overhead.

Modernizing Legacy Code

Allows C++ teams to refactor unsafe C-style printf statements into type-safe, readable, and faster {fmt} calls.

Cross-platform Development

Provides a consistent, portable formatting API with robust Unicode support across different compilers and operating systems.

Custom Data Serialization

Enables developers to easily define formatting rules for complex math vectors or game entities for debug output.

Getting started: https://fmt.dev/latest/usage.html

README

main branch

{fmt}

image image image fmt is continuously fuzzed at oss-fuzz OpenSSF Best Practices image Ask questions at StackOverflow with the tag fmt Support Ukraine

{fmt} is an open-source formatting library providing a fast and safe alternative to C stdio and C++ iostreams.

Documentation

Cheat Sheets

Q&A: ask questions on StackOverflow with the tag fmt.

Try {fmt} in Compiler Explorer.

Features

  • Simple format API with positional arguments for localization
  • Implementation of C++20 std::format and C++23 std::print
  • Format string syntax similar to Python's format
  • Fast IEEE 754 floating-point formatter with correct rounding, shortness and round-trip guarantees using the Dragonbox algorithm
  • Portable Unicode support
  • Safe printf implementation including the POSIX extension for positional arguments
  • Extensibility: support for user-defined types
  • High performance: faster than common standard library implementations of (s)printf, iostreams, to_string and to_chars, see Speed tests and Converting a hundred million integers to strings per second
  • Small code size both in terms of source code with the minimum configuration consisting of just three files, base.h, format.h and format-inl.h, and compiled code; see Compile time and code bloat
  • Reliability: the library has an extensive set of tests and is continuously fuzzed
  • Safety: the library is fully type-safe, errors in format strings can be reported at compile time, automatic memory management prevents buffer overflow errors
  • Ease of use: small self-contained code base, no external dependencies, permissive MIT license
  • Portability with consistent output across platforms and support for older compilers
  • Clean warning-free codebase even on high warning levels such as -Wall -Wextra -pedantic
  • Locale independence by default
  • Optional header-only configuration enabled with the FMT_HEADER_ONLY macro

See the documentation for more details.

Examples

Print to stdout (run)

#include <fmt/base.h>

int main() {
  fmt::print("Hello, world!\n");
}

Format a string (run)

std::string s = fmt::format("The answer is {}.", 42);
// s == "The answer is 42."

Format a string using positional arguments (run)

std::string s = fmt::format("I'd rather be {1} than {0}.", "right", "happy");
// s == "I'd rather be happy than right."

Print dates and times (run)

#include <fmt/chrono.h>

int main() {
  auto now = std::chrono::system_clock::now();
  fmt::print("Date and time: {}\n", now);
  fmt::print("Time: {:%H:%M}\n", now);
}

Output:

Date and time: 2023-12-26 19:10:31.557195597
Time: 19:10

Print a container (run)

#include <vector>
#include <fmt/ranges.h>

int main() {
  std::vector<int> v = {1, 2, 3};
  fmt::print("{}\n", v);
}

Output:

[1, 2, 3]

Check a format string at compile time

std::string s = fmt::format("{:d}", "I am not a number");

This gives a compile-time error in C++20 because d is an invalid format specifier for a string.

Write a file from a single thread

#include <fmt/os.h>

int main() {
  auto out = fmt::output_file("guide.txt");
  out.print("Don't {}", "Panic");
}

This can be up to 9 times faster than fprintf.

Print with colors and text styles

#include <fmt/color.h>

int main() {
  fmt::print(fg(fmt::color::crimson) | fmt::emphasis::bold,
             "Hello, {}!\n", "world");
  fmt::print(fg(fmt::color::floral_white) | bg(fmt::color::slate_gray) |
             fmt::emphasis::underline, "Olá, {}!\n", "Mundo");
  fmt::print(fg(fmt::color::steel_blue) | fmt::emphasis::italic,
             "你好{}!\n", "世界");
}

Output on a modern terminal with Unicode support:

image

Benchmarks

Speed tests

Library Method Run Time, s
libc printf 0.66
libc++ std::ostream 1.63
{fmt} 12.1 fmt::print 0.44
Boost Format 1.88 boost::format 3.89
Folly Format folly::format 1.28

{fmt} is the fastest of the benchmarked methods, ~50% faster than printf.

The above results were generated by building tinyformat_test.cpp on macOS 15.6.1 with clang++ -O3 -DNDEBUG -DSPEED_TEST -DHAVE_FORMAT, and taking the best of three runs. In the test, the format string "%0.10f:%04d:%+g:%s:%p:%c:%%\n" or equivalent is filled 2,000,000 times with output sent to /dev/null; for further details refer to the source.

{fmt} is up to 20-30x faster than std::ostringstream and sprintf on IEEE754 float and double formatting (dtoa-benchmark) and faster than double-conversion and ryu:

image

Compile time and code bloat

The script bloat-test.py from format-benchmark tests compile time and code bloat for nontrivial projects. It generates 100 translation units and uses printf() or its alternative five times in each to simulate a medium-sized project. The resulting executable size and compile time (Apple clang version 15.0.0 (clang-1500.1.0.2.5), macOS Sonoma, best of three) is shown in the following tables.

Optimized build (-O3)

Method Compile Time, s Executable size, KiB Stripped size, KiB
printf 1.6 54 50
IOStreams 28.4 98 84
{fmt} 1122268 5.0 54 50
tinyformat 32.6 164 136
Boost Format 55.0 530 317

{fmt} is fast to compile and is comparable to printf in terms of per-call binary size (within a rounding error on this system).

Non-optimized build

Method Compile Time, s Executable size, KiB Stripped size, KiB
printf 1.4 54 50
IOStreams 27.0 88 68
{fmt} 1122268 4.7 87 84
tinyformat 28.1 185 145
Boost Format 38.9 678 381

libc, lib(std)c++, and libfmt are all linked as shared libraries to compare formatting function overhead only. Boost Format is a header-only library so it doesn't provide any linkage options.

Running the tests

Please refer to Building the library for instructions on how to build the library and run the unit tests.

Benchmarks reside in a separate repository, format-benchmark, so to run the benchmarks you first need to clone this repository and generate Makefiles with CMake:

$ git clone --recursive https://github.com/fmtlib/format-benchmark.git
$ cd format-benchmark
$ cmake .

Then you can run the speed test:

$ make speed-test

or the bloat test:

$ make bloat-test

Migrating code

clang-tidy v18 provides the modernize-use-std-print check that is capable of converting occurrences of printf and fprintf to fmt::print if configured to do so. (By default it converts to std::print.)

Notable projects using this library

  • 0 A.D.: a free, open-source, cross-platform real-time strategy game
  • AMPL/MP: an open-source library for mathematical programming
  • Apple's FoundationDB: an open-source, distributed, transactional key-value store
  • Aseprite: animated sprite editor & pixel art tool
  • AvioBook: a comprehensive aircraft operations suite
  • Blizzard Battle.net: an online gaming platform
  • Celestia: real-time 3D visualization of space
  • Ceph: a scalable distributed storage system
  • ccache: a compiler cache
  • ClickHouse: an analytical database management system
  • ContextVision: medical imaging software
  • Contour: a modern terminal emulator
  • CUAUV: Cornell University's autonomous underwater vehicle
  • Drake: a planning, control, and analysis toolbox for nonlinear dynamical systems (MIT)
  • Envoy: C++ L7 proxy and communication bus (Lyft)
  • FiveM: a modification framework for GTA V
  • fmtlog: a performant fmtlib-style logging library with latency in nanoseconds
  • Folly: Facebook open-source library
  • GemRB: a portable open-source implementation of Bioware's Infinity Engine
  • Grand Mountain Adventure: a beautiful open-world ski & snowboarding game
  • HarpyWar/pvpgn: Player vs Player Gaming Network with tweaks
  • KBEngine: an open-source MMOG server engine
  • Keypirinha: a semantic launcher for Windows
  • Kodi (formerly xbmc): home theater software
  • Knuth: high-performance Bitcoin full-node
  • libunicode: a modern C++17 Unicode library
  • MariaDB: relational database management system
  • Microsoft Verona: research programming language for concurrent ownership
  • MongoDB: distributed document database
  • MongoDB Smasher: a small tool to generate randomized datasets
  • OpenSpace: an open-source astrovisualization framework
  • PenUltima Online (POL): an MMO server, compatible with most Ultima Online clients
  • PyTorch: an open-source machine learning library
  • quasardb: a distributed, high-performance, associative database
  • Quill: asynchronous low-latency logging library
  • QKW: generalizing aliasing to simplify navigation, and execute complex multi-line terminal command sequences
  • redis-cerberus: a Redis cluster proxy
  • redpanda: a 10x faster Kafka® replacement for mission-critical systems written in C++
  • rpclib: a modern C++ msgpack-RPC server and client library
  • Salesforce Analytics Cloud: business intelligence software
  • Scylla: a Cassandra-compatible NoSQL data store that can handle 1 million transactions per second on a single server
  • Seastar: an advanced, open-source C++ framework for high-performance server applications on modern hardware
  • spdlog: super fast C++ logging library
  • Stellar: financial platform
  • Touch Surgery: surgery simulator
  • TrinityCore: open-source MMORPG framework
  • 🐙 userver framework: open-source asynchronous framework with a rich set of abstractions and database drivers
  • Windows Terminal: the new Windows terminal

More...

If you are aware of other projects using this library, please let me know by email or by submitting an issue.

Maintainers

The {fmt} library is maintained by Victor Zverovich (vitaut) with contributions from many other people. See Contributors and Releases for some of the names. Let us know if your contribution is not listed or mentioned incorrectly and we'll make it right.

View on GitHub

Recent activity

commits and pull requests

Recent open issues

view all

Releases and announcements

58 total
  1. 12.2.012.2.0Jun 16, 2026174.5K downloads

    - Added a C11 API that brings fast, type-safe formatting to C. The new `fmt-c` library and `fmt/fmt-c.h` header use `_Generic` to dispatch on argument types and outperform `printf`/`sprintf`. For example: ```c++ #include <fmt/fmt-c.h> fmt_print(stdout, "The answer is {}.\n", 42); ``` (https://github.com/fmtlib/fmt/issues/4663, https://github.com/fmtlib/fmt/pull/4671, https://github.com/fmtlib/fmt/pull/4696, https://github.com/fmtlib/fmt/issues/4693, https://github.com/fmtlib/fmt/pull/4694, https://github.com/fmtlib/fmt/pull/4712, https://github.com/fmtlib/fmt/pull/4789). Thanks @Soumik15630m, @Ferdi265 and @localspook. - Added a separate `fmt::fmt-module` CMake target for C++20 modules and a CI workflow that exercises module-based builds (https://github.com/fmtlib/fmt/issues/4684, https://github.com/fmtlib/fmt/pull/4685, https://github.com/fmtlib/fmt/issues/4707, https://github.com/fmtlib/fmt/pull/4708, https://github.com/fmtlib/fmt/pull/4702, https://github.com/fmtlib/fmt/pull/4709). Thanks @MathewBensonCode. - Enabled the full Dragonbox lookup cache by default for floating-point formatting unless optimizing for binary size (`__OPTIMIZE_SIZE__`), giving

  2. 12.1.012.1.0Oct 29, 20252M downloads

    - Optimized `buffer::append`, resulting in up to ~16% improvement on spdlog benchmarks (https://github.com/fmtlib/fmt/pull/4541). Thanks @fyrsta7. - Worked around an ABI incompatibility in `std::locale_ref` between clang and gcc (https://github.com/fmtlib/fmt/issues/4573). - Made `std::variant` and `std::expected` formatters work with `format_as` (https://github.com/fmtlib/fmt/issues/4574, https://github.com/fmtlib/fmt/pull/4575). Thanks @phprus. - Made `fmt::join<string_view>` work with C++ modules (https://github.com/fmtlib/fmt/issues/4379, https://github.com/fmtlib/fmt/pull/4577). Thanks @Arghnews. - Exported `fmt::is_compiled_string` and `operator""_cf` from the module (https://github.com/fmtlib/fmt/pull/4544). Thanks @CrackedMatter. - Fixed a compatibility issue with C++ modules in clang (https://github.com/fmtlib/fmt/pull/4548). Thanks @tsarn. - Added support for cv-qualified types to the `std::optional` formatter (https://github.com/fmtlib/fmt/issues/4561, https://github.com/fmtlib/fmt/pull/4562). Thanks @OleksandrKvl. - Added demangling support (used in exception and `std::type_info` formatters) for libc++ and clang-cl (https://github.com/fmtlib/fmt/iss

  3. 12.0.012.0.0Sep 17, 2025404.9K downloads

    - Optimized the default floating point formatting (https://github.com/fmtlib/fmt/issues/3675, https://github.com/fmtlib/fmt/issues/4516). In particular, formatting a `double` with format string compilation into a stack allocated buffer is more than 60% faster in version 12.0 compared to 11.2 according to [dtoa-benchmark](https://github.com/fmtlib/dtoa-benchmark): ``` Function Time (ns) Speedup fmt11 34.471 1.00x fmt12 21.000 1.64x ``` <img width="766" height="609" src="https://github.com/user-attachments/assets/d7d768ad-7543-468c-b0bb-449abf73b31b" /> - Added `constexpr` support to `fmt::format`. For example: ```c++ #include <fmt/compile.h> using namespace fmt::literals; std::string s = fmt::format(""_cf, 42); ``` now works at compile time provided that `std::string` supports `constexpr` (https://github.com/fmtlib/fmt/issues/3403, https://github.com/fmtlib/fmt/pull/4456). Thanks @msvetkin. - Added `FMT_STATIC_FORMAT` that allows formatting into a string of the exact required size at compile time. For example: ```c++ #include <fmt/compile.h> constexpr auto s = FMT_STATIC_FORMAT("{}", 42);

  4. 11.2.011.2.0May 3, 2025609.2K downloads

    - Added the `s` specifier for `std::error_code`. It allows formatting an error message as a string. For example: ```c++ #include <fmt/std.h> int main() { auto ec = std::make_error_code(std::errc::no_such_file_or_directory); fmt::print("{:s}\n", ec); } ``` prints ``` No such file or directory ``` (The actual message is platform-specific.) - Fixed formatting of `std::chrono::local_time` and `tm` (https://github.com/fmtlib/fmt/issues/3815, https://github.com/fmtlib/fmt/issues/4350). For example ([godbolt](https://www.godbolt.org/z/8o4b1PPn5)): ```c++ #include <fmt/chrono.h> int main() { std::chrono::zoned_time zt( std::chrono::current_zone(), std::chrono::system_clock::now()); fmt::print("{}", zt.get_local_time()); } ``` is now formatted consistenly across platforms. - Added diagnostics for cases when timezone information is not available. For example: ```c++ fmt::print("{:Z}", std::chrono::local_seconds()); ``` now gives a compile-time error. - Deprecated `fmt::localtime` in favor of `std::localtime`. - Fixed compilation with GCC 15 and C++20 modules enabled (ht

  5. 11.1.411.1.4Feb 26, 2025438.5K downloads

    - Fixed ABI compatibility with earlier 11.x versions on Windows (https://github.com/fmtlib/fmt/issues/4359). - Improved the logic of switching between fixed and exponential format for `float` (https://github.com/fmtlib/fmt/issues/3649). - Moved `is_compiled_string` to the public API (https://github.com/fmtlib/fmt/issues/4342). Thanks @SwooshyCueb. - Simplified implementation of `operator""_cf` (https://github.com/fmtlib/fmt/pull/4349). Thanks @LocalSpook. - Fixed `__builtin_strlen` detection (https://github.com/fmtlib/fmt/pull/4329). Thanks @LocalSpook. - Fixed handling of BMI paths with the Ninja generator (https://github.com/fmtlib/fmt/pull/4344). Thanks @tkhyn. - Fixed gcc 8.3 compile errors (https://github.com/fmtlib/fmt/issues/4331, https://github.com/fmtlib/fmt/pull/4336). Thanks @sergiud. - Fixed a bogus MSVC warning (https://github.com/fmtlib/fmt/pull/4356). Thanks @dinomight.

Code frequency

additions and deletions
+1.6K-1.6KWeek of 2025-09-07: +294 linesWeek of 2025-09-07: -303 linesWeek of 2025-09-14: +23 linesWeek of 2025-09-14: -9 linesWeek of 2025-09-21: +56 linesWeek of 2025-09-21: -37 linesWeek of 2025-09-28: +55 linesWeek of 2025-09-28: -5 linesWeek of 2025-10-05: +86 linesWeek of 2025-10-05: -57 linesWeek of 2025-10-12: +106 linesWeek of 2025-10-12: -91 linesWeek of 2025-10-19: +168 linesWeek of 2025-10-19: -49 linesWeek of 2025-10-26: +8 linesWeek of 2025-10-26: -8 linesWeek of 2025-11-02: +104 linesWeek of 2025-11-02: -75 linesWeek of 2025-11-09: +0 linesWeek of 2025-11-09: -8 linesWeek of 2025-11-16: +55 linesWeek of 2025-11-16: -103 linesWeek of 2025-11-23: +681 linesWeek of 2025-11-23: -678 linesWeek of 2025-11-30: +10 linesWeek of 2025-11-30: -9 linesWeek of 2025-12-07: +23 linesWeek of 2025-12-07: -23 linesWeek of 2025-12-14: +292 linesWeek of 2025-12-14: -159 linesWeek of 2025-12-21: +38 linesWeek of 2025-12-21: -5 linesWeek of 2025-12-28: +55 linesWeek of 2025-12-28: -24 linesWeek of 2026-01-04: +62 linesWeek of 2026-01-04: -8 linesWeek of 2026-01-11: +1 linesWeek of 2026-01-11: -1 linesWeek of 2026-01-18: +90 linesWeek of 2026-01-18: -77 linesWeek of 2026-01-25: +408 linesWeek of 2026-01-25: -423 linesWeek of 2026-02-01: +264 linesWeek of 2026-02-01: -284 linesWeek of 2026-02-08: +30 linesWeek of 2026-02-08: -1 linesWeek of 2026-02-15: +738 linesWeek of 2026-02-15: -412 linesWeek of 2026-02-22: +6 linesWeek of 2026-02-22: -6 linesWeek of 2026-03-01: +839 linesWeek of 2026-03-01: -691 linesWeek of 2026-03-08: +58 linesWeek of 2026-03-08: -34 linesWeek of 2026-03-15: +21 linesWeek of 2026-03-15: -19 linesWeek of 2026-03-22: +173 linesWeek of 2026-03-22: -124 linesWeek of 2026-03-29: +37 linesWeek of 2026-03-29: -30 linesWeek of 2026-04-05: +41 linesWeek of 2026-04-05: -27 linesWeek of 2026-04-12: +57 linesWeek of 2026-04-12: -223 linesWeek of 2026-04-19: +15 linesWeek of 2026-04-19: -5 linesWeek of 2026-04-26: +37 linesWeek of 2026-04-26: -27 linesWeek of 2026-05-03: +34 linesWeek of 2026-05-03: -4 linesWeek of 2026-05-10: +0 linesWeek of 2026-05-10: -0 linesWeek of 2026-05-17: +34 linesWeek of 2026-05-17: -17 linesWeek of 2026-05-24: +48 linesWeek of 2026-05-24: -0 linesWeek of 2026-05-31: +1,620 linesWeek of 2026-05-31: -1,220 linesWeek of 2026-06-07: +147 linesWeek of 2026-06-07: -27 linesWeek of 2026-06-14: +47 linesWeek of 2026-06-14: -10 linesWeek of 2026-06-21: +75 linesWeek of 2026-06-21: -33 linesWeek of 2026-06-28: +62 linesWeek of 2026-06-28: -51 linesWeek of 2026-07-05: +44 linesWeek of 2026-07-05: -9 linesWeek of 2026-07-12: +115 linesWeek of 2026-07-12: -29 linesWeek of 2026-07-19: +95 linesWeek of 2026-07-19: -55 linesWeek of 2026-07-26: +111 linesWeek of 2026-07-26: -10 linesWeek of 2026-08-02: +21 linesWeek of 2026-08-02: -31 linesWeek of 2026-08-09: +97 linesWeek of 2026-08-09: -26 linesWeek of 2026-08-16: +18 linesWeek of 2026-08-16: -24 linesWeek of 2026-08-23: +692 linesWeek of 2026-08-23: -117 linesWeek of 2026-08-30: +330 linesWeek of 2026-08-30: -85 linesSep 7, 2025Aug 30, 2026
+8.5K lines added, -5.8K removed over the last year.

Commits per week

last 52 weeks
440Week of 2025-09-07: 18 commitsWeek of 2025-09-14: 7 commitsWeek of 2025-09-21: 9 commitsWeek of 2025-09-28: 7 commitsWeek of 2025-10-05: 7 commitsWeek of 2025-10-12: 11 commitsWeek of 2025-10-19: 18 commitsWeek of 2025-10-26: 4 commitsWeek of 2025-11-02: 14 commitsWeek of 2025-11-09: 1 commitsWeek of 2025-11-16: 9 commitsWeek of 2025-11-23: 4 commitsWeek of 2025-11-30: 4 commitsWeek of 2025-12-07: 6 commitsWeek of 2025-12-14: 3 commitsWeek of 2025-12-21: 1 commitsWeek of 2025-12-28: 5 commitsWeek of 2026-01-04: 3 commitsWeek of 2026-01-11: 1 commitsWeek of 2026-01-18: 4 commitsWeek of 2026-01-25: 25 commitsWeek of 2026-02-01: 17 commitsWeek of 2026-02-08: 2 commitsWeek of 2026-02-15: 4 commitsWeek of 2026-02-22: 3 commitsWeek of 2026-03-01: 18 commitsWeek of 2026-03-08: 7 commitsWeek of 2026-03-15: 2 commitsWeek of 2026-03-22: 5 commitsWeek of 2026-03-29: 4 commitsWeek of 2026-04-05: 4 commitsWeek of 2026-04-12: 4 commitsWeek of 2026-04-19: 2 commitsWeek of 2026-04-26: 5 commitsWeek of 2026-05-03: 3 commitsWeek of 2026-05-10: 0 commitsWeek of 2026-05-17: 2 commitsWeek of 2026-05-24: 1 commitsWeek of 2026-05-31: 44 commitsWeek of 2026-06-07: 10 commitsWeek of 2026-06-14: 5 commitsWeek of 2026-06-21: 5 commitsWeek of 2026-06-28: 4 commitsWeek of 2026-07-05: 3 commitsWeek of 2026-07-12: 6 commitsWeek of 2026-07-19: 8 commitsWeek of 2026-07-26: 7 commitsWeek of 2026-08-02: 3 commitsWeek of 2026-08-09: 5 commitsWeek of 2026-08-16: 1 commitsWeek of 2026-08-23: 6 commitsWeek of 2026-08-30: 9 commitsSep 7, 2025Aug 30, 2026
360 commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 7 commitsSun 1:00 — 8 commitsSun 2:00 — 3 commitsSun 3:00 — 11 commitsSun 4:00 — 4 commitsSun 5:00 — 10 commitsSun 6:00 — 86 commitsSun 7:00 — 159 commitsSun 8:00 — 210 commitsSun 9:00 — 193 commitsSun 10:00 — 125 commitsSun 11:00 — 75 commitsSun 12:00 — 56 commitsSun 13:00 — 46 commitsSun 14:00 — 54 commitsSun 15:00 — 63 commitsSun 16:00 — 67 commitsSun 17:00 — 59 commitsSun 18:00 — 49 commitsSun 19:00 — 50 commitsSun 20:00 — 39 commitsSun 21:00 — 27 commitsSun 22:00 — 13 commitsSun 23:00 — 12 commitsMon 0:00 — 8 commitsMon 1:00 — 5 commitsMon 2:00 — 5 commitsMon 3:00 — 2 commitsMon 4:00 — 3 commitsMon 5:00 — 8 commitsMon 6:00 — 59 commitsMon 7:00 — 96 commitsMon 8:00 — 111 commitsMon 9:00 — 72 commitsMon 10:00 — 60 commitsMon 11:00 — 59 commitsMon 12:00 — 31 commitsMon 13:00 — 34 commitsMon 14:00 — 36 commitsMon 15:00 — 39 commitsMon 16:00 — 36 commitsMon 17:00 — 38 commitsMon 18:00 — 42 commitsMon 19:00 — 35 commitsMon 20:00 — 43 commitsMon 21:00 — 23 commitsMon 22:00 — 8 commitsMon 23:00 — 14 commitsTue 0:00 — 10 commitsTue 1:00 — 4 commitsTue 2:00 — 7 commitsTue 3:00 — 4 commitsTue 4:00 — 3 commitsTue 5:00 — 5 commitsTue 6:00 — 77 commitsTue 7:00 — 112 commitsTue 8:00 — 113 commitsTue 9:00 — 55 commitsTue 10:00 — 43 commitsTue 11:00 — 43 commitsTue 12:00 — 37 commitsTue 13:00 — 30 commitsTue 14:00 — 37 commitsTue 15:00 — 47 commitsTue 16:00 — 49 commitsTue 17:00 — 47 commitsTue 18:00 — 43 commitsTue 19:00 — 53 commitsTue 20:00 — 37 commitsTue 21:00 — 37 commitsTue 22:00 — 19 commitsTue 23:00 — 8 commitsWed 0:00 — 10 commitsWed 1:00 — 8 commitsWed 2:00 — 4 commitsWed 3:00 — 3 commitsWed 4:00 — 6 commitsWed 5:00 — 11 commitsWed 6:00 — 104 commitsWed 7:00 — 181 commitsWed 8:00 — 162 commitsWed 9:00 — 106 commitsWed 10:00 — 70 commitsWed 11:00 — 53 commitsWed 12:00 — 53 commitsWed 13:00 — 43 commitsWed 14:00 — 44 commitsWed 15:00 — 45 commitsWed 16:00 — 57 commitsWed 17:00 — 51 commitsWed 18:00 — 54 commitsWed 19:00 — 41 commitsWed 20:00 — 33 commitsWed 21:00 — 28 commitsWed 22:00 — 21 commitsWed 23:00 — 19 commitsThu 0:00 — 10 commitsThu 1:00 — 10 commitsThu 2:00 — 10 commitsThu 3:00 — 7 commitsThu 4:00 — 6 commitsThu 5:00 — 7 commitsThu 6:00 — 85 commitsThu 7:00 — 157 commitsThu 8:00 — 123 commitsThu 9:00 — 63 commitsThu 10:00 — 39 commitsThu 11:00 — 41 commitsThu 12:00 — 31 commitsThu 13:00 — 27 commitsThu 14:00 — 25 commitsThu 15:00 — 53 commitsThu 16:00 — 38 commitsThu 17:00 — 50 commitsThu 18:00 — 39 commitsThu 19:00 — 37 commitsThu 20:00 — 43 commitsThu 21:00 — 35 commitsThu 22:00 — 16 commitsThu 23:00 — 14 commitsFri 0:00 — 16 commitsFri 1:00 — 8 commitsFri 2:00 — 7 commitsFri 3:00 — 9 commitsFri 4:00 — 2 commitsFri 5:00 — 6 commitsFri 6:00 — 78 commitsFri 7:00 — 174 commitsFri 8:00 — 151 commitsFri 9:00 — 77 commitsFri 10:00 — 50 commitsFri 11:00 — 48 commitsFri 12:00 — 43 commitsFri 13:00 — 42 commitsFri 14:00 — 39 commitsFri 15:00 — 62 commitsFri 16:00 — 63 commitsFri 17:00 — 49 commitsFri 18:00 — 43 commitsFri 19:00 — 32 commitsFri 20:00 — 29 commitsFri 21:00 — 14 commitsFri 22:00 — 15 commitsFri 23:00 — 6 commitsSat 0:00 — 9 commitsSat 1:00 — 6 commitsSat 2:00 — 9 commitsSat 3:00 — 8 commitsSat 4:00 — 4 commitsSat 5:00 — 11 commitsSat 6:00 — 103 commitsSat 7:00 — 196 commitsSat 8:00 — 217 commitsSat 9:00 — 185 commitsSat 10:00 — 96 commitsSat 11:00 — 54 commitsSat 12:00 — 57 commitsSat 13:00 — 40 commitsSat 14:00 — 43 commitsSat 15:00 — 43 commitsSat 16:00 — 61 commitsSat 17:00 — 47 commitsSat 18:00 — 32 commitsSat 19:00 — 34 commitsSat 20:00 — 36 commitsSat 21:00 — 31 commitsSat 22:00 — 17 commitsSat 23:00 — 9 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.
DateListRankStars gained
Sep 10, 2026weekly#3+1,847
Sep 9, 2026weekly#1+1,935
Sep 8, 2026weekly#1+1,909
Sep 7, 2026daily#2+134
Sep 7, 2026weekly#9+1,885
Sep 6, 2026daily#2+134
Sep 5, 2026daily#1+688
Sep 4, 2026daily#1+963
Sep 3, 2026daily#1+14