Converter Tools
JSON to TOML Converter
Convert JSON to TOML in your browser. Section tables, inline tables, arrays of tables, ISO date-times, and configurable null handling.
Output options
Tables
Arrays of objects
Indent
ISO date strings
JSON null
Parsing and conversion run entirely in your browser. The JSON pasted here never leaves your device.
How values map
- JSON objects become TOML [section] tables by default, or { inline } tables when you pick that style.
- Arrays of objects become [[arrays of tables]] in auto mode, or inline arrays when forced.
- Strings that look like ISO-8601 date-times print as TOML date-time literals when the option is on.
- Integers stay as integers; non-integer numbers (and integers outside JavaScript's safe range) emit as floats. NaN and Infinity become nan, inf, and -inf.
- Keys with characters outside [A-Za-z0-9_-] are quoted as TOML basic strings.
- JSON null has no TOML equivalent. The default policy drops the key and adds a comment; the strict policy errors out instead.
How to use
- Paste your JSON into the input area on the left. Click Load sample for a worked TOML-style example, or start with your own object.
- Pick a Tables style: Section tables for [a.b] headers (the standard TOML look) or Inline tables to keep nested objects on one line.
- Pick how Arrays of objects render: [[arrays of tables]] for a clean per-record block, or Inline arrays to keep them as one [ { ... }, { ... } ] list.
- Pick whether ISO-8601 date strings should print as native TOML date-time literals (unquoted) or as quoted strings. Pick a JSON null policy: skip and annotate, or error.
- Copy the TOML output or download it as a .toml file. Use the JSON-to-X siblings (YAML, XML, CSV) if you need a different target format.
About this tool
JSON to TOML Converter turns any JSON value into a TOML v1.0 document right in your browser. The serializer covers every part of the spec that has a clean mapping from JSON: section tables for nested objects ([a.b]), inline tables for compact one-line objects ({ a = 1, b = "x" }), arrays of tables for arrays of objects ([[products]]), inline arrays for arrays of scalars or mixed types, basic strings with the standard \b \t \n \f \r \" \\ \uXXXX escapes, multi-line basic strings for any value containing a newline, integers (with safe-integer detection that promotes very large integers to floats so no precision is lost), floats (including NaN, +Infinity, and -Infinity, which TOML writes as nan, inf, and -inf), and booleans. Keys made of letters, digits, underscores, and hyphens are emitted bare; everything else is automatically quoted using TOML's basic-string rules. ISO-8601 / RFC 3339 date-time strings (offset date-times like 1979-05-27T07:32:00-08:00, local date-times, local dates, and local times) can optionally be unquoted so they print as TOML date-time literals, matching how Cargo, pyproject, Hugo, and Netlify configs prefer to express timestamps. The output offers two table styles. Section tables put every nested object under its own [a.b] header, which is the readable default for hand-edited configs. Inline tables keep nesting on one line, which is closer to the structure of the source JSON and is easier to grep. Arrays of objects can either become [[arrays of tables]] blocks (auto mode) or stay as inline arrays ([{ ... }, { ... }]). JSON has a null literal that TOML does not, so the converter offers two policies for handling them: skip drops the entry and writes a # comment in its place noting that TOML has no null type; error fails the conversion so you can change the source instead of silently losing data. A summary panel above the output shows the line count, key count, table count, byte size, and how many null values were skipped during the run, with a copy and a download button so you can drop the result straight into a Cargo.toml, pyproject.toml, hugo.toml, netlify.toml, or any custom configuration file. Conversion runs entirely in your browser using JSON.parse and a small dependency-free emitter; the JSON you paste here is never uploaded, logged, or sent to any server.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
TOML to JSON Converter
Two-way TOML and JSON converter for Cargo, pyproject, Hugo, and Netlify configs.
Open tool
ConverterJSON to YAML Converter
Convert JSON into YAML with block or flow style and smart quoting.
Open tool
ConverterYAML to JSON Converter
Two-way YAML and JSON converter with anchors, flow, and block scalars.
Open tool
DeveloperJSON Formatter
Format, minify, and validate JSON in your browser.
Open tool
ConverterJSON to XML Converter
Convert JSON to XML with attribute keys, text nodes, indent, and array options.
Open tool
ConverterJSON to CSV Converter
Convert JSON arrays to CSV with nested flattening and Excel-friendly options.
Open tool