Loona Automation logoLoona Developer Tools
Home › Data Converters

JSON to TOML Converter

In short: paste a JSON object and get TOML — top-level values first, nested objects as [table] sections, arrays of objects as [[array tables]], the layout TOML requires.
🔒 Private by design: everything runs in your browser on this device. Your input is never uploaded to a server.

Example

Input:

{"title": "Demo", "owner": {"name": "Ali"}}

Output:

title = "Demo"

[owner]
name = "Ali"

About this converter

TOML (pyproject.toml, Cargo.toml, Hugo configs) is INI grown up: typed values, tables and arrays with an unambiguous grammar. The mapping from JSON has one structural demand — TOML requires plain key/value pairs to appear before any [table] header, so the converter emits scalars first, then tables, then array tables, recursively. Strings are written as TOML basic strings with proper escaping; numbers keep their integer/float distinction; arrays of scalars stay inline while arrays of objects become [[tables]]. JSON null has no TOML equivalent — TOML simply omits absent keys; a null in the input is reported rather than silently dropped or faked.

Frequently Asked Questions

What happens to JSON null?

TOML has no null. The converter errors on it rather than guessing — remove the key or replace it with a sentinel your application understands.

Why are my keys reordered?

TOML syntax requires bare key/values before table headers; the converter groups them (scalars, then tables) while preserving order within each group.

Related Developer Tools

Embed this tool on your website — free

Add this tool to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the tool to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.