What is TOML?
TOML (Tom's Obvious, Minimal Language) is a configuration file format designed to be easy to read due to obvious semantics. It maps unambiguously to a hash table and is used as the configuration format for Cargo (Rust's package manager), Hugo static site generator, pip (Python packaging), and many other modern tools.
TOML's key feature over JSON for configuration is its first-class support for comments and its more human-friendly syntax for nested data. Where JSON requires deeply nested curly braces, TOML uses section headers (called tables) to create a flat-but-organised structure. Arrays of objects become [[array-of-tables]] sections.
Type Mapping
JSON strings map to TOML quoted strings. JSON numbers map to TOML integers or floats. JSON booleans map directly to TOML true/false. JSON null has no direct equivalent in TOML โ null values are skipped in this converter as TOML does not support null scalars. JSON objects become TOML tables, and JSON arrays of objects become TOML arrays of tables.
Limitations
TOML does not support null values, mixed-type arrays, or arrays nested more than one level deep as array-of-tables. If your JSON contains these patterns, the converter handles them as best-effort TOML inline arrays. For production use, review the output carefully against the TOML v1.0 specification.