Convert JSON configuration and data structures directly into valid TOML format.
Loading tool
About JSON to TOML
Convert a JSON object into a TOML v1.0 document. Nested objects become [tables] and arrays of objects become [[arrays of tables]], with an option to sort keys alphabetically. Because TOML has no null type, null values are omitted and the tool tells you how many were dropped; a root that is not an object is wrapped under a key, since a TOML document must be a table.
Common uses
- Turn a JSON config into a TOML file for a Rust (Cargo) or Python (pyproject) project
- Draft a TOML config for tools like Hugo or Netlify from existing JSON
- See how a nested JSON structure maps to TOML tables
FAQ
- Why are my null values missing in the TOML output?
- TOML has no null type, so there is no way to write a key with a null value. The converter omits those keys and shows a note with the count.
- What is an array of tables in TOML?
- It is TOML's way of writing a list of objects. Each [[name]] header starts a new table appended to the array called name.
- Can the top level of a TOML file be an array?
- No. A TOML document is always a table of key/value pairs, so a JSON array at the root has to be placed under a key.