🔒 Runs in your browser — nothing is uploaded✓ Free, no signup

TOML ⇄ JSON & YAML Converter

Convert TOML config files to JSON or YAML, or turn JSON and YAML into TOML. Tables, arrays of tables, dates and comments in the source are all handled.

0 characters

JSON

When should you use the TOML to JSON Converter?

  • Reading a Cargo.toml or pyproject.toml file as JSON in a script
  • Moving configuration between TOML, YAML and JSON-based tools
  • Checking that a TOML file parses correctly

How to use the TOML to JSON Converter

  1. 1

    Choose the direction

    TOML → JSON, JSON → TOML, TOML → YAML or YAML → TOML.

  2. 2

    Paste your config

    Paste the file contents, or click Load sample.

  3. 3

    Check the result

    Errors show where the input couldn't be parsed.

  4. 4

    Copy or download

    Copy the result or download it with the right file extension.

Examples

TOML table to JSON

TOML

[server]
host = "0.0.0.0"
port = 8080

JSON

{
  "server": {
    "host": "0.0.0.0",
    "port": 8080
  }
}

Common errors and how to fix them

null values were removed
TOML has no null. Null values are left out when converting to TOML — use an empty string or remove the key instead.
TOML needs an object at the top level
A TOML document is always a table of keys. Wrap a top-level array in an object, e.g. { "items": [...] }.
Related tools: YAML to JSON Converter · JSON Formatter · JSON to XML Converter

More from JSON Tools

Free tools that run in your browser — no signup, nothing uploaded.

TOML to JSON Converter FAQ

TOML (Tom's Obvious Minimal Language) is a config file format used by Rust (Cargo.toml), Python (pyproject.toml), Hugo and many other tools. It's designed to be easy to read and maps directly to a dictionary.

Comments are read but not carried over — JSON has no comments, and converted TOML or YAML output starts fresh.

TOML dates and times become ISO 8601 strings in JSON and YAML, such as 1979-05-27T07:32:00.000-08:00.

[[products]] sections in TOML. Each one adds an object to an array, so they convert to a JSON array of objects.

TOML has no null type, so null values can't be represented. The tool tells you how many were left out.

No. Conversion happens in your browser.