BYTETOOLS

JSON to TOML Converter

Convert JSON to TOML online. Emits scalar keys first, then [table] headers and [[array]] blocks in the order TOML requires — 100% in-browser.

Drop a .json file here or click to browse

What is the JSON to TOML Converter?

The ByteTools JSON to TOML Converter writes any JSON object as a valid TOML document. It emits scalar keys first, then a [table] header for each nested object using dotted paths for deep nesting, then a [[table]] block for every object inside an array — the ordering TOML requires if the file is going to parse.

  • Scalar keys first, then [table] and [[table]] blocks in valid order
  • Dotted paths for deeply nested objects
  • Automatic key quoting and TOML basic-string escaping
  • Lists every null key it had to skip, with its full path
  • Counts tables, array-of-table blocks and output lines
  • Runs entirely in your browser — nothing is uploaded

How to use the JSON to TOML Converter

  1. 1

    Paste a JSON object into the input box, or drop a .json file onto the drop zone.

  2. 2

    Click Convert to TOML.

  3. 3

    Check the warning strip if any null keys were skipped — TOML has no null value.

  4. 4

    Copy the TOML or Download it as a .toml file.

About the JSON to TOML Converter

The ByteTools JSON to TOML Converter writes any JSON object as a valid TOML document. It emits scalar keys first, then a [table] header for each nested object using dotted paths for deep nesting, then a [[table]] block for every object inside an array — the ordering TOML requires if the file is going to parse.

Keys outside A-Z, a-z, 0-9, underscore and hyphen are quoted automatically, and string values are escaped with the TOML basic-string rules so quotes, backslashes, newlines and control characters all survive. Arrays of plain values stay inline.

The conversion runs 100% locally in your browser. Your JSON is never uploaded or stored, so you can build Cargo, Netlify or Hugo configuration from an API response without sending any of it to a server.

Frequently asked questions

How do I convert JSON to TOML?

Paste a JSON object and click Convert to TOML. Scalars are written first, nested objects become [table] sections and arrays of objects become [[table]] blocks, all in the order a TOML parser expects.

What happens to null values?

TOML has no null type, so keys whose value is null are skipped and listed in a warning strip above the output with their full path. Replace them with an empty string or drop them from the JSON if that matters.

Why must the top level be an object?

A TOML document is a table, so it always starts from key-value pairs. A JSON array or a bare string has no key to attach to, and the tool tells you so instead of producing a file that will not parse.

How are arrays of objects converted?

Each object becomes its own [[name]] block, which is TOML's array-of-tables syntax. Arrays of plain values such as numbers or strings stay inline on one line inside square brackets.

Is my JSON sent anywhere?

No. The conversion is pure JavaScript running in your browser, so nothing is uploaded, logged or stored — safe for configuration built from private API responses.

Related tools