Skip to content
Latchkey

What Is TOML? Toms Obvious Minimal Language Explained

TOML is a minimal configuration file format designed to be easy to read and unambiguous to parse, widely used by Rust, Python, and Go tooling.

TOML ("Toms Obvious Minimal Language") aims to be the config format that is obvious to a human and unambiguous to a machine. It looks like an old INI file but with a real specification and proper types. If you have opened a Cargo.toml or a pyproject.toml, you have read TOML.

What TOML is

TOML organizes configuration into tables (sections) of key-value pairs. It has clear, typed values: strings, integers, floats, booleans, dates, arrays, and nested tables. The design goal is that there is exactly one obvious way to write a given value, which makes TOML files easy to read and hard to misparse.

TOML versus INI

TOML looks like INI - bracketed section headers and key = value lines - but unlike INI it has a formal spec, real data types, nested tables, and arrays. INI behavior varies between parsers, while TOML behaves the same everywhere, which is why modern tools chose TOML over plain INI.

TOML versus YAML and JSON

Compared to YAML, TOML avoids whitespace-significant indentation and the type-guessing gotchas, at the cost of being noisier for deeply nested data. Compared to JSON, it allows comments and is friendlier to hand-edit. It hits a sweet spot for flat-to-moderately-nested tool configuration.

TOML in CI and tooling

TOML is the home of build and dependency config for several ecosystems: Cargo.toml for Rust, pyproject.toml for Python packaging and tools like ruff, and many Go and linter configs. In CI you usually read TOML indirectly - the tools parse it - but you may template values into it during a release job.

A pyproject.toml config
# pyproject.toml read by a CI build step
[project]
name = "myapp"
version = "1.4.0"

[tool.ruff]
line-length = 100

Why pipelines like TOML

Because TOML is unambiguous and comment-friendly, it reduces the "it parsed differently than I meant" failures that plague YAML. For tool configuration that lives next to your code and is read on every CI run, that predictability is worth the slightly more verbose syntax.

Key takeaways

  • TOML is a minimal, typed config format with bracketed tables and key = value pairs.
  • It is like INI but with a real spec, data types, and nested tables, so it behaves consistently.
  • It is the config home for Cargo.toml, pyproject.toml, and many modern CLI tools.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →