Skip to content
Emojar – free online tools

JSON to TOML Converter

Convert JSON to TOML for config files such as pyproject.toml, Cargo.toml or Hugo settings. Objects become [tables], arrays of objects become [[arrays of tables]], keys are quoted when needed and strings are escaped. Values TOML can’t represent, like null, are reported — never silently dropped.

This tool runs entirely in your browser.

Loading tool…

How to use the JSON to TOML Converter

  1. 1Paste a JSON object — TOML files are tables, so the top level must be an object.
  2. 2If the JSON contains null, either replace those values or tick “Leave out null values”; the omitted keys are listed.
  3. 3Copy or download the TOML and check the notes under the output.

What is the JSON to TOML Converter?

TOML is a configuration format designed to be easy to read: key = value pairs grouped under [table] headers. A JSON object maps neatly onto it — nested objects become [parent.child] tables, arrays of objects become repeated [[array]] tables, and arrays of plain values are written inline like tags = ["a", "b"].

Not everything converts losslessly. TOML has no null, so the converter stops and lists every null unless you choose to leave them out — and nulls inside arrays can’t be left out without shifting the other items. A JSON number such as 1.0 is already a whole number once parsed, so it is written as 1. This converter supports that conservative, documented subset of TOML 1.0 rather than guessing.

In-depth guide

Convert JSON to TOML: Tables, Arrays of Tables and Null Values →

Frequently asked questions

Why does the converter refuse null values?

TOML has no null or “empty” value. Dropping keys silently could change how your program behaves, so the converter lists them. Tick “Leave out null values” if leaving them out is what you want.

Why must the top level be an object?

A TOML document is always a table of key/value pairs. Wrap a JSON array in an object first, for example {"items": [...]}.

Are dates converted to TOML dates?

No. JSON has no date type, so date-like strings stay quoted strings. Remove the quotes by hand if your program expects a TOML datetime.

Is the JSON to TOML Converter free and private?

Yes. The JSON to TOML Converter is free, needs no account, and runs entirely in your browser. What you type is never sent to a server or stored.