Skip to content
ToolsMinify logo
Converter Tools

TOML to JSON Converter

Paste TOML and convert to JSON online - or go the other way on the same page.

About TOML to JSON Converter

Paste TOML and convert to JSON online - or go the other way on the same page. This free TOML to JSON Converter runs entirely in your browser, so Cargo.toml, pyproject.toml, and app configs with real paths and dependency pins never leave your device. Tables become nested objects, [[array-of-tables]] become JSON arrays, and Swap feeds the output back as input. Pair it with the YAML to JSON Converter or the XML to JSON Converter.

How to Use TOML to JSON Converter

  1. Choose TOML → JSON or JSON → TOML (or Swap direction after a conversion).
  2. Paste your document, drop a local .toml / .json file (max 10 MB - read in the browser only), or load a Cargo.toml, pyproject.toml, or app-config sample.
  3. For TOML → JSON, set indent 2/4. Review top-level key and nested table counts.
  4. Copy or download the result. Comments are stripped on TOML → JSON because JSON has none. Nothing is uploaded.

TOML to JSON Converter Examples

Cargo.toml package + deps

A [package] table and [dependencies] with inline tables become nested JSON. serde = { version = "1", features = ["derive"] } turns into an object with version and features.

Array of tables ([[bin]])

Repeated [[bin]] sections become a JSON array under "bin". Swap back to JSON → TOML to re-emit [[bin]] tables.

pyproject.toml project block

Convert [project] name, version, requires-python, and dependencies lists to JSON for tooling that only speaks JSON.

App config tables

[server], [database], and [features] become nested objects so you can inspect host, port, and flags as JSON.

JSON back to TOML

Start from a JSON object (not an array root). Nested objects become [tables]; arrays of objects become [[array-of-tables]]. JSON null is rejected - TOML has no null.

Common Use Cases

  • Turn Cargo.toml into JSON for scripts or CI checks
  • Convert pyproject.toml for Python tooling that expects JSON
  • Inspect nested TOML tables as JSON before editing
  • Round-trip app configs with Swap direction
  • Produce TOML from JSON fixtures in the browser

Frequently Asked Questions about TOML to JSON Converter

How do I convert TOML to JSON online?
Choose TOML → JSON, paste your TOML (or drop a .toml file), and copy or download the JSON. Conversion runs in your browser - nothing is uploaded.
Can I convert JSON to TOML on the same page?
Yes. Switch to JSON → TOML or use Swap direction. The JSON root must be an object because a TOML document is a table, not an array.
Does this work for Cargo.toml and pyproject.toml?
Yes. Those are the main use cases. Load the built-in samples, or paste your own package / project / dependency tables. Private pins stay on your machine.
How are tables and array-of-tables represented?
[table] sections become nested JSON objects. [[array-of-tables]] become JSON arrays of objects. On the way back, arrays of objects re-emit as [[...]] sections.
Why is JSON null rejected?
TOML has no null type. Remove null values or omit those keys before converting to TOML.
Are TOML comments preserved in JSON?
No. JSON has no comment syntax, so # comments are stripped. The UI shows a badge when comments were detected.
Is my TOML uploaded to a server?
No. Parsing and conversion run only in your browser. Safe for manifests with real dependency versions and local paths.
How is this different from YAML to JSON?
Same bidirectional Swap pattern, but for TOML 1.0 (Cargo, pyproject, many Rust/Python configs). Use YAML for Compose / K8s; use this for .toml files.