What is TOML?
Published: 2026-05-17
A plain-language introduction to TOML for config and metadata, how it differs from JSON and YAML, and how to validate it locally in your browser.
TOML (Tom’s Obvious, Minimal Language) is a text format for configuration and small documents. It maps cleanly to a hash table (keys and nested tables), avoids significant whitespace for nesting, and is designed to be obvious to humans and unambiguous to parsers.
What TOML looks like
Key-value pairs use key = value. Strings can be single- or multi-line; numbers, booleans, and dates are first-class. Tables group settings under a heading, and you can nest them with dotted keys or explicit [parent.child] sections.
title = "LocalTools"
private = true
tags = ["toml", "privacy"]
[server]
host = "127.0.0.1"
port = 8787
[[plugins]]
name = "formatter"
enabled = true
[[double brackets]] define arrays of tables—repeated groups (here, each [[plugins]] block is one entry in a list).
How TOML compares to JSON and YAML
- JSON uses braces, brackets, and quoted keys; it has no comments and is the default for APIs and browser interchange. TOML is rarely used as a wire format but is very readable for hand-edited files.
- YAML can be very compact and supports rich features (anchors, tags); indentation carries meaning, which some teams find error-prone. TOML uses explicit
=and table headers instead of indentation-based structure.
If you already think in INI-style section + key=value, TOML feels like a stricter, richer evolution with clear rules for types and nesting.
Where you see TOML
Rust (Cargo.toml), Python packaging (pyproject.toml), Hugo and other static-site configs, and various app settings files use TOML because diffs stay readable and parsers agree on edge cases more often than with loose INI dialects.
Try it locally in your browser
To format, validate, or pretty-print TOML without uploading it, use the TOML Formatter & Validator on LocalTools. Your content stays in your browser.
Related reading
- JSON vs YAML for config — choosing between common config-friendly formats.
- What is JSON? — when strict JSON is the right interchange shape.