TOML to JSON Converter

Convert TOML to JSON in your browser. Paste Cargo.toml or pyproject.toml and get structured JSON with dates as ISO strings. Free and private.

TOML inputpaste, type, or drop a file
JSON 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

Parse any TOML document (Cargo.toml, pyproject.toml, netlify.toml) into pretty-printed JSON. TOML's first-class date/time values are converted to ISO 8601 strings, since JSON has no native date type.

Useful for scripting against config files: convert once, then query the JSON with jq or your language of choice.

Common uses

  • Inspect the resolved structure of a complex Cargo.toml or pyproject.toml.
  • Pipe TOML config into JSON-only tooling (jq, JavaScript, REST APIs).
  • Compare two TOML files by diffing their normalized JSON output.

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/toml-to-json \
  -H "Content-Type: text/plain" \
  -H "X-Api-Key: YOUR_API_KEY" \
  --data-binary @input.toml

API documentation · Get an API key

Worked examples

Real payloads from tools people use daily, with the exact output this converter produces. Every example runs in your browser, so you can load one and adapt it to your own data.

Convert Cargo.toml to JSON

Rust's Cargo.toml uses inline tables for dependencies; converting to JSON shows exactly how features and version specs are structured.

TOML input
[package]
name = "my-crate"
version = "0.1.0"
edition = "2021"

[dependencies]
serde = { version = "1.0", features = ["derive"] }
tokio = { version = "1", features = ["full"] }
JSON output
{
  "package": {
    "name": "my-crate",
    "version": "0.1.0",
    "edition": "2021"
  },
  "dependencies": {
    "serde": {
      "version": "1.0",
      "features": [
        "derive"
      ]
    },
    "tokio": {
      "version": "1",
      "features": [
        "full"
      ]
    }
  }
}

Convert pyproject.toml to JSON

pyproject.toml drives pip, poetry, and build tools; converting to JSON makes it easy to read the resolved config in a script.

TOML input
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "my-package"
version = "0.1.0"
dependencies = ["requests>=2.31", "click"]
JSON output
{
  "build-system": {
    "requires": [
      "setuptools>=61.0"
    ],
    "build-backend": "setuptools.build_meta"
  },
  "project": {
    "name": "my-package",
    "version": "0.1.0",
    "dependencies": [
      "requests>=2.31",
      "click"
    ]
  }
}

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.

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.

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 TOML to 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. JSON does not support comments; they are stripped or rejected by parsers. Trailing commas after the last element are invalid JSON.

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