Paste a Cargo.toml, pyproject.toml or Hugo config and get JSON, which is what most scripting environments can read without a dependency.
Dates are the one lossy part
TOML has first-class date and time types — offset date-times, local date-times, local dates and local times, all distinct. JSON has none of them; it has strings. Each is written out as an ISO 8601 string, which is unambiguous for offset date-times but loses the distinction between "a local time with no zone" and "a string that looks like one". If you convert back, they will come out as strings.
Tables and arrays of tables
[server.http] becomes a nested object under server then http. [[dependencies]], repeated, becomes an array of objects. Both mappings are exact and round-trip cleanly.Integers TOML holds that JSON cannot
TOML specifies signed 64-bit integers. JSON numbers are IEEE doubles in every practical implementation, which means integers stop being exact above 2^53 — about 9.007 quadrillion. Snowflake IDs, some database primary keys and nanosecond timestamps all live past that line, and they come back subtly wrong rather than failing. If your file has one, the fix is to quote it in the TOML so it crosses as a string; there is no way to carry it as a JSON number and keep every digit.
Questions
- What happens to TOML dates?
- They become ISO 8601 strings, because JSON has no date type. Offset date-times survive unambiguously; local dates and times lose their type distinction.
- Can I convert a Cargo.toml?
- Yes. Cargo, pyproject and Hugo configs all convert cleanly — they are plain TOML with no unusual constructs.
- Is my data uploaded anywhere?
- No. The conversion runs as JavaScript inside this tab. Open your browser's Network panel and convert something — you will see no request carrying your data, because there is no server to send it to. You can also turn your Wi-Fi off and convert anyway.