Convert JSON to TOML

Paste JSON and get TOML back. Free, no signup, and nothing you paste is stored. The same conversion is available as an API call and to AI agents over MCP.

Input

A JSON object to convert.

Result

Fill in the input and press Run.

Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.

How to convert JSON to TOML

  1. Paste your JSON into the input box.
  2. Press Run.
  3. Copy the TOML or download it as a file.

This page runs the json to toml tool. Open the tool itself for every option.

What happens in this conversion

What changes
Nested objects become [sections], and lists of objects become [[repeated sections]].
Limits
TOML has no null, so a null value cannot be written and is reported. The top level must be an object, not a list.

JSON and TOML compared

FormatWhat it isBest forWatch out for
JSON
JSON data
JSON is the data format of web APIs: nested objects, lists, text, numbers, true, false and null.Apis and data exchanged between programs.It has no comments and is tiring to write by hand.
TOML
TOML data
TOML is a configuration format with named sections and typed values. Python (pyproject.toml) and Rust (Cargo.toml) use it.Project configuration files.Deeply nested data becomes awkward, and it has no null value.

Use it from code or an agent

curl -s https://setget.net/v1/tools/json-to-toml \
  -H 'Content-Type: application/json' \
  -d '{"input":{"text":"{\"title\":\"x\",\"owner\":{\"name\":\"Sam\",\"admin\":true}}"}}'
import json, urllib.request

body = {'input': {'text': '{"title":"x","owner":{"name":"Sam","admin":true}}'}}
request = urllib.request.Request("https://setget.net/v1/tools/json-to-toml", json.dumps(body).encode(),
                                 {"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/json-to-toml", {
  method: "POST",
  headers: {"Content-Type": "application/json"},
  body: JSON.stringify({"input":{"text":"{\"title\":\"x\",\"owner\":{\"name\":\"Sam\",\"admin\":true}}"}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
  "slug": "json-to-toml",
  "input": {
    "text": "{\"title\":\"x\",\"owner\":{\"name\":\"Sam\",\"admin\":true}}"
  }
}
{
  "input": {
    "text": "{\"title\":\"x\",\"owner\":{\"name\":\"Sam\",\"admin\":true}}"
  }
}

Endpoint: POST /v1/tools/json-to-toml. Over MCP: run_tool with slug: "json-to-toml". Machine-readable: input schema, Markdown. Connect an agent.

Inputs

NameTypeRequiredWhat it does
text string yes A JSON object to convert.

Questions

Is my JSON stored anywhere?
No. It is converted in memory and discarded. It is not saved or logged.
How much JSON can I convert at once?
Up to 1 MiB in a single request.
Can a script or an AI agent convert JSON to TOML?
Yes. Call POST https://setget.net/v1/tools/json-to-toml with JSON, or use the run_tool tool of the SetGet MCP server with slug "json-to-toml". The code samples on this page are ready to copy.

More conversions