Overview / Developer & Code / TOML ↔ JSON Converter
Developer & Code 100% In-Browser & Offline

TOML ↔ JSON Converter

Convert TOML to JSON and JSON to TOML in your browser. Tables, arrays of tables, inline tables and dates are handled, and errors show the line and column.

Paste or type your input; results appear instantly and errors are shown below the input. Fields start with an example: click one and just type to replace it.

Your files and input never leave your browser – nothing is uploaded.

Dates and times are written as text in JSON. The TOML converter loads only when this page is opened.

Read a TOML file as JSON, or write JSON as TOML

TOML is the format of Cargo.toml, pyproject.toml and many other configuration files: easy to read, strict about types. JSON is what most tools and APIs expect. Paste either one and the other appears, so you can inspect a configuration as data, feed it to a script or draft a TOML file from a JSON example.

Convert in four steps

  1. Choose TOML → JSON or JSON → TOML.
  2. Paste your text into the left box. A small project file is there as an example.
  3. Pick the JSON indentation if you are converting to JSON.
  4. Read, copy or download the result. A syntax error shows the line and column and a short explanation.

How TOML maps to JSON

  • Tables such as [server] become nested objects, and dotted keys like a.b = 1 do too.
  • An array of tables, written [[plugins]], becomes an array of objects.
  • Inline tables and arrays map one to one. Strings, integers, floats and booleans keep their type.
  • Dates and times, which JSON does not have, become text such as "2026-10-18".
  • Integers too large for JSON to hold exactly are written as text, and the status line tells you.

Limits of the other direction

A TOML document is always a table, so the JSON needs an object at the top level. TOML has no null, which means null values are left out and the tool reports how many. Comments cannot be kept in either direction, because JSON has none and the JSON-to-TOML result is generated from data, not from your original file.

Typical uses

  • Reading a Cargo.toml or pyproject.toml as data in a script.
  • Comparing a TOML configuration with its JSON or YAML twin.
  • Checking a TOML file for typos before committing it.
  • Turning a JSON example from documentation into a starting TOML file.

Config files stay on your machine

Parsing runs in your browser. A configuration file may hold hostnames or tokens, and nothing you paste is uploaded.

Frequently asked questions (FAQ)

Choose TOML → JSON and paste the TOML. Tables become objects, arrays of tables become arrays and the JSON appears on the right.