fmt
by fmtlib
{fmt} is a C++ library for formatting text, numbers, dates and containers for printing or building strings. It is a fast, type-safe alternative to C printf and C++ iostreams, and it underpins the C++20 std::format feature.
- Stars
- 25.9k
- Licence
- MIT
- Runs on
- Your computer
- Setup
- Moderate
- Language
- C++
- Age
- 5076 days
What you can do with it
- Format strings and numbers with simple placeholders instead of printf or iostreams
- Print dates, times, containers and coloured terminal text from C++ programs
- Catch format string mistakes at compile time and write files faster than fprintf
Make money with it
A freelance C++ developer could offer to modernise and speed up legacy code that uses printf or iostreams by moving it to this library.
An idea, not financial advice. Check the licence before charging for anything built on it.
Ways a business could use it
- Build faster, safer logging and reporting in C++ products, which cuts debugging time
- Reduce output overhead in performance-sensitive C++ software, lowering server or hardware needs
Can you use it commercially?
Free to use, change and sell, including in paid products. Keep the copyright notice.
Not legal advice. Read the project's licence file before building a product on it.
Getting it running
You add it to a C++ project through CMake or a package manager, or use it header-only by defining FMT_HEADER_ONLY.
Follow the official instructions in the project README.
Things to check
- Only useful to people who write C++ code, not a standalone app
Who's talking about it
Checked 01 Nov 2026. Summary drafted by AI from the project's README.