JSON to TOML

Convert a JSON object into TOML — the config format used by Cargo, Poetry, Hugo, and more.

Input (JSON)
Output (TOML)

About this tool

TOML (Tom's Obvious, Minimal Language) is a config-file format designed to be easy for humans to read and unambiguous to parse — used by tools like Cargo (Rust), Poetry (Python), and Hugo. This tool converts a JSON object into TOML, turning nested objects into [section] tables and arrays of objects into [[array-of-tables]] blocks.

This covers the common subset of TOML most config files actually use — strings, numbers, booleans, inline arrays, nested tables, and arrays of tables — but doesn't produce some of TOML's more advanced/rare features (multi-line strings, inline tables, dates). It also can't represent JSON's null, since TOML has no null value; any null fields are simply omitted.

Version 1.0.0