html69// dev utilities

TOML tool

TOML to JSON Converter / JSON to TOML Converter

A TOML to JSON converter that also turns JSON into TOML. Arrays of tables, dates, and large integers stay in this tab.

Like the tool? Find a bug?Share with us

Converter

Paste TOML. Arrays of tables, dates, and integers bigger than JavaScript can count stay intact. Files stay on your device.

Supported files: .toml
0 / 50,000
JSON will appear here.

Guide

How this TOML to JSON converter works

01

TOML becomes JSON

Tables become objects. [[bin]] arrays of tables become JSON arrays. Dates stay in TOML form as strings. Integers bigger than JavaScript can count become JSON strings so no digit is lost.

02

JSON becomes TOML

A JSON object becomes a TOML document. Arrays of objects write as [[table]]. Digit strings past 2^53 - 1 write as TOML integers. ISO date strings write as TOML dates.

03

Related data formats

Config that is YAML instead of TOML can use the YAML to JSON Converter. Sample, Tables, Dates, Integers, and JSON are starting points.

Use it

What converts well

pyproject.toml, Cargo.toml, nested tables, arrays of tables, offset and local dates, and integers that would overflow JSON numbers. JSON comments and trailing commas are accepted. The 50,000 character cap still applies.

FAQ

Questions

Does this upload my TOML?

No. Conversion, copy, and download run in this tab. There is no account and no API call.

What happens to large integers?

JavaScript JSON numbers lose digits past 9,007,199,254,740,991. This converter writes those TOML integers as JSON strings, and reads them back as TOML integers, so the value does not silently change.

How are dates stored in JSON?

Offset date-times, local date-times, local dates, and local times become JSON strings in TOML form, for example 1979-05-27T07:32:00-08:00. JSON to TOML parses those strings back into TOML dates.

Is there a size limit?

Paste is capped at 50,000 characters so a huge dump cannot freeze the tab.