What is TOML?

TOML (.toml) stands for "Tom's Obvious Minimal Language" - a configuration file format that emphasizes readability and simplicity. Created by GitHub co-founder Tom Preston-Werner, TOML maps unambiguously to hash tables using key-value pairs organized into sections. Unlike YAML's whitespace sensitivity or JSON's lack of comments, TOML provides a sweet spot: human-friendly and machine-parseable.

TOML is the configuration format for Cargo (Rust), Poetry (Python), and many other modern development tools. It supports strings, integers, floats, booleans, dates, arrays, and nested tables. Comments start with #, and the syntax is straightforward without complex indentation rules.

Did you know? Cargo.toml is the package manifest for every Rust project!

History

TOML was created by Tom Preston-Werner in 2013 as a reaction to frustrations with existing config formats. It quickly gained adoption in the developer community.

Key Milestones

  • 2013: TOML v0.1.0 released
  • 2015: Rust's Cargo adopts TOML
  • 2018: Python Poetry uses TOML
  • 2021: TOML v1.0.0 stable release
  • Present: Growing adoption in DevOps and development

Key Features

Core Capabilities

  • Readable: Clear, INI-like syntax
  • Comments: # for documentation
  • Data Types: Strings, numbers, dates, arrays
  • Tables: Nested configuration sections
  • No Ambiguity: Unambiguous mapping to types
  • Unicode: Full UTF-8 support

Common Use Cases

Package Management

Cargo.toml, pyproject.toml

App Configuration

Settings and preferences

DevOps

Infrastructure as code

Build Systems

Build configuration files

Advantages

  • Easy to read and write
  • Clear data types
  • Comments supported
  • No whitespace issues
  • Unambiguous parsing
  • Growing ecosystem

Disadvantages

  • Less widely adopted than JSON/YAML
  • Verbose for deeply nested data
  • Not ideal for large data structures
  • Fewer tools than competitors
  • Learning curve for non-developers

Technical Information

Format Specifications

Specification Details
File Extension .toml
MIME Type application/toml
Format Type Configuration
Encoding UTF-8
Current Version 1.0.0
Specification github.com/toml-lang/toml

Common Tools

  • Parsers: Libraries for most languages
  • Editors: VS Code, Sublime with plugins
  • Validators: TOML linters online