JSON to TOML Converter

Convert JSON to TOML in your browser. Perfect for generating pyproject.toml or Cargo.toml fragments. Free, private, client-side.

JSON inputpaste, type, or drop a file
TOML output
Runs 100% in your browser. Nothing is uploaded, logged, or stored, and there are no ads. Verify it yourself: open your browser's Network tab while you convert and watch that no requests leave this page.

About this tool

Convert JSON into TOML, the config format used by pyproject.toml (Python), Cargo.toml (Rust), and a growing set of modern CLIs. Objects become tables, arrays of objects become [[array-of-table]] sections.

TOML is stricter than JSON in one important way: the top level must be a table (object), and null values do not exist. This tool tells you exactly when your input cannot be represented and why, instead of producing invalid output.

Common uses

  • Generate pyproject.toml or Cargo.toml sections from JSON tooling output.
  • Migrate a JSON config file to TOML for apps that switched formats.
  • Produce TOML fixtures for testing config parsers.

Automate via API

The same conversion is available as a REST endpoint for scripts, pipelines, and backends:

curl -X POST https://payloadly.com/api/v1/tools/json-to-toml \
  -H "Content-Type: text/plain" \
  -H "X-Api-Key: YOUR_API_KEY" \
  --data-binary @input.json

API documentation · Get an API key

JSON notes

JSON (JavaScript Object Notation) is the standard interchange format for web APIs, config files, and log pipelines. It is strict: keys must be double-quoted, trailing commas are invalid, and comments are not allowed.

  • JSON does not support comments; they are stripped or rejected by parsers.
  • Trailing commas after the last element are invalid JSON.
  • Integers beyond 2^53 lose precision in JavaScript-based parsers.

TOML notes

TOML (Tom's Obvious, Minimal Language) is the config format of choice for Rust (Cargo.toml), Python (pyproject.toml), and many modern CLIs. It maps cleanly to a hash table and supports first-class dates and comments.

  • TOML documents must have a table (object) at the top level, never an array.
  • TOML has first-class date/time types that JSON must represent as strings.
  • TOML values cannot be null; null fields are omitted when converting into TOML.

Frequently asked questions

Is my data uploaded to a server?

No. This tool runs entirely in your browser using JavaScript, and there are no ads on the page. Nothing you paste or drop here is uploaded, logged, or stored, and you can verify that yourself: open your browser's developer tools and watch the Network tab while you convert (no requests leave the page), or disconnect from the internet after the page loads and keep working.

What should I watch out for when converting JSON to TOML?

JSON does not support comments; they are stripped or rejected by parsers. Trailing commas after the last element are invalid JSON. TOML documents must have a table (object) at the top level, never an array. TOML has first-class date/time types that JSON must represent as strings.

Why does my JSON array fail to convert?

TOML requires a table (object) at the top level: a bare array like [1,2,3] has no valid TOML representation. Wrap it in an object first, e.g. {"items": [1,2,3]}. Null values are also omitted, because TOML has no null type.

Is there a size limit or a fee?

The browser tool is free with no signup and comfortably handles files up to tens of megabytes (limited by your device's memory). For automated or bulk processing inside your own scripts and pipelines, use the paid REST API.

Related tools