Skip to content
XUtilHub

JSON to TOML Converter Online

Convert JSON to TOML configuration format online. Objects become tables. Free, instant and private.

  • Free, no sign-up
  • Runs in your browser, nothing uploaded
Input
Output

About the JSON to TOML

Convert JSON objects to TOML. Nested objects become [tables] and arrays of objects become [[arrays of tables]].

Key features

  • Converts JSON objects to valid TOML 1.0
  • Nested objects become [tables]
  • Arrays of objects become [[arrays of tables]]
  • Null values are omitted (TOML has no null)
  • Keys quoted automatically when needed
  • Download as config.toml

Convert JSON to TOML

TOML is a favourite for configuration files because it's easy to read and has comments, unlike JSON. If you're moving a project's settings into pyproject.toml, Cargo.toml, a Hugo site config or a CLI tool's config file, this converter turns JSON into clean, valid TOML.

Example

{
  "title": "Example",
  "owner": { "name": "Ada", "dob": "1815-12-10" },
  "database": { "ports": [8000, 8001], "enabled": true },
  "servers": [
    { "name": "alpha", "ip": "10.0.0.1" },
    { "name": "beta", "ip": "10.0.0.2" }
  ]
}
title = "Example"

[owner]
name = "Ada"
dob = "1815-12-10"

[database]
ports = [ 8000, 8001 ]
enabled = true

[[servers]]
name = "alpha"
ip = "10.0.0.1"

[[servers]]
name = "beta"
ip = "10.0.0.2"

JSON vs. TOML for configuration

JSONTOML
Comments❌✅
Trailing commas❌✅ in arrays
Native dates❌✅
Deep nesting✅ easy⚠️ gets verbose
Null✅❌
Typical useAPIs, dataApp/tool configuration

Limitations to know

  • Root must be an object. Arrays or plain values at the top level can't be TOML documents.
  • No null. Keys with null values are dropped.
  • Deeply nested data produces long dotted table headers; consider YAML for very deep structures.

Convert TOML back with TOML to JSON and check files with the TOML Validator. Prefer YAML? Use JSON to YAML.

How to use the JSON to TOML

  1. Paste your data into the input box, upload a file, or click Sample to try it out.
  2. Adjust the options above the editor if you need to (indentation, delimiter, and so on).
  3. The TOML appears instantly in the output panel. Any errors are shown with their line and column.
  4. Click Copy to copy the result, or Download to save it as a file.

Frequently asked questions

Why does my JSON fail to convert?

TOML documents must be a table (an object) at the top level. A JSON array or single value at the root can't be represented, so wrap it in an object first, e.g. {"items": [...]}.

What happens to null values?

TOML has no null type, so keys with null values are omitted from the output.

Can arrays mix types?

TOML 1.0 allows mixed-type arrays, so [1, "a"] converts fine, though many style guides discourage it.

Are comments added?

No. Add # comments to the TOML afterwards to document your configuration.

Is my JSON uploaded to a server?

No. All JSON tools run entirely in your browser, so your data never leaves your device.

Is there a size limit?

There is no fixed limit. Files of several megabytes work fine; very large files depend on your device's memory.

Do I need an account?

No. Every JSON tool is free and works without signing up.

Last updated:

Related JSON tools