The format YAML and JSON kept failing to be
TOML — Tom's Obvious, Minimal Language — was created by Tom Preston-Werner (GitHub co-founder) in 2013. The design goal: a config file format that is obvious at first read, minimal in syntax, and unambiguous in parsing. Current spec: TOML 1.0.0 (2021).
What TOML gets right that YAML and JSON don't
- No indentation rules — keys and tables don't depend on whitespace. Copy-paste a section across files; nothing breaks.
- One way to write each value — strings are quoted, numbers are unquoted, booleans are
true/false. No Norway problem. - Native dates and times — RFC 3339 datetimes are first-class values, not strings.
- Comments —
#works everywhere YAML does. - Verbose-but-clear table syntax —
[server.database]beats deeply nested YAML once you have 4+ levels.
Where TOML quietly took over
- Rust — every
Cargo.tomlin the ecosystem. - Python —
pyproject.toml(PEP 518/621) replacedsetup.py+setup.cfg+requirements.txtfor modern packaging. - Hugo —
config.toml/hugo.tomldrives the static site generator. - Poetry, ruff, black, hatch — Python tools all read their config from
pyproject.toml's[tool.*]tables. - Vector, Tilt, GoReleaser — operations tools that picked TOML for human-friendly config.
Principle: TOML wins where the config is read by humans more often than by machines. YAML wins where deep nesting is unavoidable. JSON wins on the wire. Pick by the audience, not by tradition.