What Is TOML and Why Is It Used for Configuration?
Learn about TOML — the minimal configuration format designed to be obvious and easy to read.
Filelume Editorial
Published 2026-07-24
TOML is a configuration file format that prioritizes readability and simplicity. Its name stands for Tom's Obvious, Minimal Language, and its design philosophy is straightforward: a TOML file should be obvious to read and unambiguous to parse.
What is TOML?
TOML uses a structure similar to INI files but with a formal specification and support for nested data. It uses square brackets for section headers, equals signs for key-value pairs, and indentation for readability.
# Application configuration
name = "my-application"
version = "2.1.0"
[database]
host = "localhost"
port = 5432
[server]
bind = "0.0.0.0"
port = 8080
[features]
logging = true
caching = true
[[products]]
name = "Widget A"
price = 19.99
[[products]]
name = "Widget B"
price = 29.99
Where is TOML used?
TOML has gained significant adoption in the Rust ecosystem and beyond:
- Rust:
Cargo.tomlis the package manifest for every Rust project. - Python:
pyproject.tomlis the modern standard for Python project configuration. - Static site generators: Zola uses TOML for configuration and frontmatter.
- Hugo: Supports TOML alongside YAML and JSON for site configuration.
Why TOML over other formats?
TOML offers a unique combination of features:
- Obvious syntax: Key-value pairs use
=, sections use[headers]. The intent is clear. - Formal specification: Unlike INI files, TOML has a well-defined grammar.
- Type-aware: TOML distinguishes between strings, integers, floats, booleans, and dates.
- Nested structures: Tables and arrays of tables support hierarchical configuration.
- Less error-prone: No indentation sensitivity like YAML, no strict quoting like JSON.
TOML data types
TOML supports a rich set of types:
- Strings:
"hello"or multi-line""" - Integers:
42,-17 - Floats:
3.14,-0.01 - Booleans:
true,false - Dates:
2026-07-24T12:30:00Z - Arrays:
[1, 2, 3] - Tables:
[section]headers - Inline tables:
{key = "value"} - Arrays of tables:
[[section]]headers
How Filelume renders TOML
Filelume provides three views for TOML files:
- Tree: An expandable hierarchy showing tables, arrays, and key-value pairs.
- Table: When arrays of tables exist, they appear as a searchable grid.
- Formatted: Pretty-printed TOML with consistent formatting.
The Tree view handles dotted keys, inline tables, and arrays of tables. Each structure is clearly labeled with its type.
Security considerations
TOML is generally safe to parse because it has no mechanism for executing code or instantiating objects. Filelume uses a strict TOML parser that rejects malformed input with clear error messages including line and column numbers.
Exporting TOML data
When a TOML file contains arrays of tables (tabular data), Filelume enables:
- CSV export for spreadsheet compatibility
- XLSX export as a genuine Excel workbook
Non-tabular TOML files remain fully viewable through the Tree and Formatted views.
Start viewing TOML files
Open the TOML Viewer and load any .toml file. The content stays in your browser, and you can navigate the structure using the Tree view.
All processing happens locally in your browser. Your files never leave your device.
Try the related tool
Open in Filelume