TOML to JSON

Converts TOML configuration into JSON, so it can be consumed in code or over an API.

Parse and convert TOML to JSON.

Steps and notes

What is TOML to JSON?

TOML is a favourite for application config because it is human-editable and maps onto a clean data structure, but most code and APIs speak JSON. This tool parses TOML into its data model and serialises the result as JSON: tables become objects, dotted keys become nested objects, and arrays of tables become JSON arrays. The companion JSON-to-TOML tool handles the other direction, so config can flow from a TOML file into a JSON-based pipeline without manual editing.

  1. Paste the TOML
  2. Get the JSON result
  3. Copy and use it

Frequently asked questions

Are TOML tables the same as JSON objects?
Effectively yes. A [server] table with port = 8080 becomes { "server": { "port": 8080 } }, and a dotted key server.port = 8080 produces the same structure. Arrays of tables ([[items]]) become JSON arrays of objects.
What about TOML types JSON lacks?
TOML has datetimes (local, zoned and offset) that JSON cannot represent natively. They are serialised as ISO-8601 strings so the value survives the conversion; if you need them as real dates on the other side, parse the string explicitly.
Is the conversion lossless?
For the data model, yes — nothing is dropped. The only loss is TOML-specific niceties like comments and key ordering in some serialisers; the values themselves come through unchanged.

Read the full step-by-step guide for this tool

Category: Converter

JSON format conversion workflow

JSON to YAML converter → YAML to JSON converter → JSON to XML → XML to JSON → JSON to TOML → TOML to JSON