Skip to main content
DevConverter
Home/Format Conversion/TOML ↔ JSON Converter

TOML ↔ JSON Converter

Convert between TOML and JSON formats. Supports tables, arrays of tables, inline tables, and all TOML data types.

About this tool

TOML (Tom's Obvious Minimal Language) is a configuration file format designed to be easy for humans to read and write while mapping unambiguously to a hash table (dictionary or object). It was created by Tom Preston-Werner (co-founder of GitHub) as a more explicit alternative to YAML and a more readable alternative to JSON for configuration use cases. TOML uses .ini-style [section] headers with typed values.

TOML supports explicit data types: strings (single-line and multi-line), integers, floats, booleans, datetime, date, time, arrays, and tables (objects). The [[array-of-tables]] syntax is one of TOML's distinguishing features — it provides a clean way to express arrays of objects, which is clunky in INI files and ambiguous in some YAML representations. TOML is used as the package configuration format in Rust (Cargo.toml) and Python (pyproject.toml), and as the default configuration format in Hugo.

Compared to YAML, TOML is more predictable: it has no implicit type coercions and no indentation-sensitive parsing. YAML's implicit type system caused the 'Norway problem' (where country code 'NO' was parsed as boolean false in YAML 1.1) and similar bugs with yes/no, on/off, and numeric-looking strings. TOML requires all types to be declared explicitly, eliminating this class of bugs. For configuration files, TOML's predictability often outweighs YAML's flexibility.