TOML v1.0 essentials
A compact map of TOML v1.0 for people who write Cargo.toml and pyproject.toml.
Documents and tables
A TOML file is one document whose root is a table. Use [table] for nested maps and [[array]] for lists of tables. Keys may be bare, quoted, or dotted.
Strings and numbers
Basic strings use escapes; literal strings keep backslashes. Integers may be large; floats include inf and nan. Prefer clear types over clever encoding.
Dates and comments
Offset datetimes, local dates, and local times are first-class. Comments start with # and do not survive a parse→stringify format pass — our formatter says so up front.
Paste a sample and validate it locally with line-level errors.
Open the formatter