Introduction to Tabulate
Tabulate is a header-only C++ library for creating beautiful, formatted tables in your terminal applications. With a simple and intuitive API, you can create professional-looking tables with full control over styling, colors, alignment, and formatting.What is Tabulate?
Tabulate is a modern C++ library (C++11 and above) that makes it easy to format tabular data for console output. Whether you’re building CLI tools, debugging applications, or generating reports, Tabulate helps you present data in a clear and visually appealing way.
Key Features
Header-Only Library
Simple integration - just add the include directory to your project. No compilation or linking required.
Rich Formatting
Full control over fonts, colors, alignment, borders, and styling with a fluent interface.
Style Inheritance
Flexible style inheritance model: format tables, rows, columns, or individual cells.
UTF-8 Support
Built-in support for multi-byte characters and international text.
Nested Tables
Create complex layouts by nesting tables within table cells.
Export Options
Export tables to Markdown and AsciiDoc formats.
Style Inheritance Model
Tabulate follows a simple and intuitive style inheritance model. When rendering each cell:
This enables you to override formatting for specific cells even when row or table formatting is applied, giving you maximum flexibility.
Use Cases
Tabulate is perfect for:- CLI Applications: Display structured data in command-line tools
- Logging & Debugging: Pretty-print complex data structures during development
- Reports: Generate formatted reports in terminal applications
- Data Visualization: Present data analysis results in an organized format
- Documentation: Create examples and demonstrations with formatted output
Tabulate requires C++11 or later. The library automatically detects C++17 support and uses standard library features when available, falling back to lightweight alternatives for C++11/14.
Terminal Color Support
Thanks to termcolor, Tabulate supports 8 colors:- Grey
- Red
- Green
- Yellow
- Blue
- Magenta
- Cyan
- White
The appearance of colors varies depending on your terminal settings and theme.
Next Steps
Installation
Learn how to install and integrate Tabulate into your project
Quick Start
Create your first table in minutes with our quickstart guide