📤

JSON to TOML

POST /v1/convert/json-to-toml
curl -X POST "https://convert.toolkitapi.io/v1/convert/json-to-toml" \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"json": {"project": {"name": "myapp", "version": "1.0.0"}, "dependencies": {"requests": "^2.31"}}}'
# See curl example
// See curl example
Response 200 OK
{
  "toml": "[project]\nname = \"myapp\"\nversion = \"1.0.0\"\n\n[dependencies]\nrequests = \"^2.31\"\n",
  "size": 72
}

How to Use

1

Send a POST request to /v1/convert/json-to-toml with a json object.

About This Tool

Convert a JSON object to TOML configuration format. Preserves tables, arrays of tables, and all primitive types.

Ideal for generating Rust Cargo.toml, Python pyproject.toml, or any TOML-based configuration from structured data.

Why Use This Tool

Frequently Asked Questions

Are all JSON types supported?
Yes — strings, numbers, booleans, arrays, and nested objects all map to their TOML equivalents.
What about null values?
TOML does not support null. Keys with null values are omitted from the output.

Start using JSON to TOML now

Get your free API key and make your first request in under a minute.