.toml · application/toml
TOML: Tom's Obvious, Minimal Language
TOML v1.0 maps unambiguously to hash tables using INI-style [section] headers, explicit quotes for strings, native datetimes, and # comments.
Quick Answer: TOML v1.0 maps unambiguously to hash tables using INI-style [section] headers, explicit quotes for strings, native datetimes, and # comments. Rust Cargo.toml, Python pyproject.toml, Hugo/Netlify configs, and typed app settings.
| Structure type | Hierarchical |
|---|---|
| Human readability | High |
| Nesting support | Yes |
| LLM token efficiency | Medium |
| File extension | .toml |
| MIME type | application/toml |
| Best for | Rust Cargo.toml, Python pyproject.toml, Hugo/Netlify configs, and typed app settings. |
Strengths
- Eliminates YAML's indentation fragility and implicit boolean traps
- Supports comments, native RFC 3339 timestamps, and clean dotted keys
- Standard configuration format across Rust, Python packaging, and CLI tools
Trade-offs
- Deeply nested arrays of objects become verbose compared to JSON or YAML
- Requires explicit root tables when converting arrays at the top level
- Less native parser support in standard libraries than JSON
References
Convert & clean TOML locally
Related engineering guides
- JSON vs YAML vs TOML vs .env: Config Format Field GuideCompare JSON, YAML, TOML, and .env configuration formats across comments, nesting, secret safety, and tool ecosystems—and convert locally.
- Offline JWT Decoding, Base64URL & Semantic JSON DiffingInspect JWT headers and claims, encode Base64URL without padding, run key-order-agnostic semantic JSON diffs, and scrub Bearer tokens offline.
Related Formats
All 24 formatsTOML frequently asked questions
Why do Cargo and pyproject.toml use TOML instead of YAML?
TOML forbids unquoted strings and indentation magic, ensuring package manifests parse identically everywhere with comments intact.
Can TOML represent a top-level JSON array directly?
No. A TOML root document must be a key-value table, so top-level JSON arrays are typically wrapped under an items or root key.
Is TOML compatible with INI files?
TOML borrows [section] syntax from INI but adds a formal v1.0 spec with typed integers, floats, booleans, arrays, and inline tables.