JSON ↔ TOML Converter

Convert JSON objects and TOML with exact signed 64-bit integers. Reject null, unsupported dates and unsafe numeric conversions.

How to use

Start with a JSON object, then convert nested objects to TOML tables and arrays to TOML arrays. In reverse mode the TOML document becomes one JSON object. Use this when moving configuration between applications.

Integer tokens use BigInt and must fit TOML’s signed 64-bit range. Decimal values use finite IEEE-754 numbers; notation and trailing zeroes may normalize. Null has no TOML equivalent and is rejected.

Behavior and limits

TOML date/time values are rejected because JSON has no equivalent type; quote them as strings when that is your intended model. Comments and original layout are not retained. Limits: 64 levels and 200,000 characters.

Questions & answers

Can a top-level JSON array be converted?

TOML documents have a root table. Wrap the array in an object, such as {"items":[1,2]}.

Is my input sent to a server?

No. Processing runs in your browser and input is not submitted to an API. Original files and remote databases are not modified.

Other Languages

JSON ↔ TOML Converter — Base64.sh

JSON ↔ TOML Converter

Convert JSON objects and TOML with exact signed 64-bit integers. Reject null, unsupported dates and unsafe numeric conversions.

Share:

References

How we make sure

We check this tool with the automated test suites linked below. Example checks are shown in their original language.

Verification method
Check 64-bit integer precision and reject non-equivalent null, date and overflowing values.
Comparison reference
Explicit JSON/TOML structures, numeric tokens and rejection fixtures.
Verification scope
These samples and boundaries do not prove correctness for every input.
Test source and cases (select a file to read it)
  • data-tools.test.js
    • JSON/TOML preserves 64-bit integers and rejects non-equivalent null, dates and overflowing values

These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.