JSON to TOML
Convert between JSON and TOML (the config format of Cargo, pyproject, Hugo…): proper tables and arrays of tables, long integers kept exact, null fields named.
How to convert between JSON and TOML
- Pick a direction: JSON → TOML or TOML → JSON.
- Paste your content or open a .json/.toml file; the result appears on the right.
- Copy it or download the file. Open several files at once and download them all as a ZIP.
Frequently asked questions
TOML has no null, so that field cannot be written. Remove it or give it a value, or turn on "Skip null values" to leave such fields out (the skipped ones are listed under the result).
In TOML a table's plain values must come before its sub-tables, or they would belong to the sub-table. So fields holding an object or a list of objects move down as [name] and [[name]] sections. The data is the same.
Integers up to 19 digits (TOML's limit) keep every digit both ways. Larger ones do not fit in TOML, so the tool names the field. TOML dates and times become strings written exactly as in the file, time zone included.
No. A TOML file is always a table of names and values, so the JSON must be an object. Wrap the array in a field, such as items.
It is completely free and needs no sign-up.
Related tools
JSON to YAMLConvert between JSON and YAMLJSON to XMLConvert JSON to indented XMLJSON FormatterFormat, minify and validate JSONJSON to CSVConvert between JSON and CSV tablesJSON to TypeScriptGenerate TypeScript interfaces from sample JSONJSON to JSON SchemaGenerate a JSON Schema from a JSON sampleJSON Schema validatorCheck whether JSON data matches a JSON SchemaJSON to ZodGenerate a Zod schema from a JSON sampleJSON to Go structGenerate Go structs from a JSON sample