Question:

What is TOML?

TOML stands for Tom’s Obvious Minimal Language.

TOML was created by Tom Preston-Werner (co-founder of GitHub) in 2013. He wanted a config format that was easier to work with than the existing options. The format caught on, especially in the Rust ecosystem where it’s the standard for package configuration.

You’ll see it used for project configuration files like pyproject.toml (Python), Cargo.toml (Rust), and various DevOps tools. It’s similar to YAML and JSON, but it’s designed to be less error-prone than YAML and more human-friendly than JSON.

Here’s what the same config looks like in TOML versus YAML:

[package]
name = "my-app"
version = "1.0.0"
authors = ["Jane Developer"]

[dependencies]
http = "2.0"
json = "1.5"
package:
  name: my-app
  version: 1.0.0
  authors:
    - Jane Developer

dependencies:
  http: 2.0
  json: 1.5

Unlike YAML, indentation doesn’t matter in TOML, which means you won’t accidentally break your config by mixing tabs and spaces. I’ve spent way too much time in my career fixing indentation in YAML files, so not needing indentation is a real time saver.

See also What is YAML?, What is JSON?, and What is XML?

You might also like