| | |

TOML 10 ๐Ÿ“„ Cheatsheet

โฑ๏ธ Estimated read: 2 min | |

Syntax Quick Reference

ElementSyntaxExample
Key-valuekey = valuename = "app"
Bare keyLetters, digits, _, -api-key = "secret"
Quoted key"..." or '...'"key with spaces" = 1
Dotted keya.b.c = valueserver.port = 8080
Table[table][database]
Nested table[parent.child][server.tls]
Inline table{ key = value }point = { x = 1, y = 2 }
Array[val1, val2]tags = ["a", "b"]
Array of tables[[table]][[services]]
Comment# text# http port

Data Types

TypeSyntaxExample
String (basic)"..." with escapes"Line\nBreak"
String (literal)'...' no escapes'C:\Users\app'
Multi-line basic"""...""""""Line one\nLine two"""
Multi-line literal'''...''''''No \escaping'''
Integerdecimal, 0x, 0o, 0b42, 0xFF, 0o755, 0b1010
Floatdecimal point or exponent3.14, 5e+22
Special floatinf, -inf, nantimeout = inf
Booleantrue / falseenabled = true
Offset date-timedate + time + offset2026-05-05T10:00:00Z
Local date-timedate + time2026-05-05T10:00:00
Local datedate only2026-05-05
Local timetime only10:00:00

Escape Sequences

EscapeMeaningValid in
\nNewlineBasic, multi-line basic
\tTabBasic, multi-line basic
\"Double quoteBasic, multi-line basic
\\BackslashBasic, multi-line basic
\uXXXXUnicode (4 hex)Basic, multi-line basic
\UXXXXXXXXUnicode (8 hex)Basic, multi-line basic

Table Rules

RuleDetail
Root tableUnnamed, ends at first header
Table redefinitionInvalid (error)
Dotted-key tablesCannot reopen with [table] header
Sub-table of dotted-key tableValid if new
Inline tableSingle line (v1.0.0), no trailing comma
Array of tables[[name]] appends, index in path

Common Patterns

PatternExample
Group related settings[server] header
Nested sections[server.tls]
Reusable compact objectpoint = { x = 1, y = 2 }
Repeated services[[services]]
Environment override[tool.pytest.ini_options]

Cargo.toml Cheatsheet

TablePurpose
[package]Name, version, edition
[dependencies]Runtime crates
[dev-dependencies]Test crates
[features]Compile flags
[package.metadata]Tool-specific data

pyproject.toml Cheatsheet

TablePurpose
[project]Name, version, deps
[build-system]Backend
[project.optional-dependencies]Extras
[project.scripts]CLI entry points
[tool.*]Tool config

Hugo config.toml Cheatsheet

Key/TablePurpose
baseURL, titleSite settings
[params]Template data
[permalinks]URL patterns
[[menus.main]]Menu entries

Type Comparison

FormatSyntaxExample
String"...""hello"
Integerbare42
Float3.143.14
Booleantrue/falsetrue
Date-timeRFC 33392026-05-05T10:00:00Z

Version Differences (v1.0.0 vs v1.1.0)

Featurev1.0.0v1.1.0
Inline table newlinesNoYes
Inline trailing commaNoYes
\xHH escapeNoYes
\e escapeNoYes

Was this helpful?


Stop using slow, ad-bloated tool sites! ๐Ÿคฎ

๐Ÿ”Ž Search “KandZ Tools” on Google to use many professional utilities for free.

KandZ.me is the ultimate minimalist hub for:
โœ… Finance (Mortgage, Interest, Inflation)
โœ… Tech (Base64, JSON, Dev Suite, IP)
โœ… Health (BMI, BMR, TDEE)
โœ… Productivity (Timer, Workspace, QR)

โšก๏ธ Fast & Private
๐Ÿ”’ No data leaves your device
๐Ÿ’Ž 100% Free

๐Ÿ”— Use it now: https://tools.kandz.me
๐Ÿ”– Bookmark itโ€”youโ€™ll need it later!