Glossary

TOML

TOML (Tom's Obvious, Minimal Language) is a configuration file format designed to be easy for humans to read and unambiguous for machines to parse, using key = value pairs grouped into [section] tables. It was created by GitHub co-founder Tom Preston-Werner in 2013, with the spec maintained at toml.io.

How it works

TOML pairs look like assignment statements, and every value has an explicit, unambiguous type — string, integer, float, boolean, date/time, array, or table — with no implicit type coercion:

[package]
name = "example"
version = "1.2.0"
edition = "2021"

[dependencies]
serde = { version = "1.0", features = ["derive"] }

[[bin]]
name = "cli"
path = "src/main.rs"

[package] and [dependencies] are tables (equivalent to nested JSON objects); [[bin]] with double brackets defines an array of tables — useful when a config needs a repeated block, like multiple binaries or build targets. Dates and times use ISO 8601 literals natively, without quotes, so they parse as real datetime values rather than strings.

Common pitfalls

  • TOML's strict typing is a feature, but it means a value like "true" (quoted) and true (bare) are different types — a common source of config bugs when copy-pasting between formats.
  • Deeply nested structures get verbose fast, since every nesting level needs its own [section.subsection] header — TOML is best for flat-ish configs, not deep trees.
  • Unlike JSON, TOML has no official way to express null; omitting a key is the usual workaround, which changes how "unset" is distinguished from "empty."
  • Files are commonly named after their purpose (Cargo.toml, pyproject.toml) rather than .toml alone, which can make them easy to overlook when auditing a repo for config files.

Related terms

  • JSON — TOML's data model maps closely to JSON's, minus JSON's ambiguity around comments and trailing commas.
  • YAML — a more nesting-friendly config alternative that trades TOML's explicit typing for whitespace sensitivity.
  • XML — a far more verbose, older config format TOML was explicitly designed to avoid resembling.

See also

  • Tool: JSON to TOML Converter — convert JSON objects (including nested structures and arrays) to TOML format instantly.