SS Toolbox
SS Toolbox
All data is processed locally

TOML to JSON Converter for Cargo.toml, pyproject.toml & Rust Configs

Read Cargo.toml, pyproject.toml or any TOML config as JSON, and turn JSON objects back into TOML tables in your browser. Dates, arrays of tables and dotted tables are handled by the parser; comments, key order and null values are not.

How this TOML ↔ JSON converter behaves

  1. Built for manifest files

    Paste Cargo.toml or pyproject.toml and inspect nested tables plus [[bin]] / [[bench]]-style entries as JSON objects and arrays.

  2. Arrays of tables work in both directions

    [[products]] blocks become arrays of objects, and a JSON array of same-shaped objects is written back as [[table]] blocks. Arrays inside arrays stay inline.

  3. Dates and times are parsed as Date objects

    TOML date-times, dates and times become JavaScript Date values, so the JSON side shows ISO-like strings such as 1979-05-27T07:32:00.000Z. Converting that JSON back writes a quoted string, not a native TOML date.

  4. Nested and dotted tables are rebuilt

    [tool.poetry] and [a.b] input becomes nested objects. Scalar keys are emitted before sub-tables, so the original key order is not preserved.

  5. Local-only conversion with file input

    Pick .toml / .json files or paste text, then download the result. Nothing is uploaded, and there are no indentation or sorting options.

TOML ↔ JSON conversion FAQ

Does JSON → TOML support null?

No. TOML has no null type and the serializer silently drops keys whose value is null, including null items inside arrays. Remove or replace nulls with an empty string or a sentinel before converting, otherwise data disappears without an error.

How are dates and times handled?

TOML → JSON parses date-times, local dates and local times into Date objects and prints ISO-like strings: 1979-05-27T07:32:00.000Z, 1979-05-27, 07:32:00.000. JSON → TOML treats those strings as ordinary text and quotes them, so dates do not come back as native TOML dates. Only a real Date object (produced by parsing) prints unquoted. Short times such as 07:32 fail with 'Incomplete time' — seconds are required.

Are comments and key order preserved?

No. Comments and blank lines are discarded while parsing and never regenerated. Key order also changes: scalar keys are written first, then sub-tables. Duplicate keys are rejected with 'Can't redefine existing key'.

How are arrays of tables represented?

[[products]] blocks become JSON arrays of objects. Going back, a JSON array of objects is written as [[products]] blocks, while nested arrays stay inline arrays. The JSON root must be an object: an array root fails with 'Can only stringify objects, not array'.

Why does my JSON array fail with 'Array values can't have mixed types'?

This parser requires homogeneous TOML arrays (TOML 0.5 rules). An array mixing numbers and strings, or objects and scalars, throws. Split it into separate arrays or use a table instead.

What about big integers, NaN and empty values?

Integers beyond 2^53 lose precision and are printed with underscore separators, for example 12_345_678_901_234_567_000. NaN and Infinity become nan / inf. Empty arrays print as [ ], empty objects as { }, and undefined keys are silently skipped.

Is my config uploaded, and what happens on errors?

Everything runs in the browser; files are never uploaded. There is no configured size limit, but conversion is synchronous, so multi-megabyte manifests can block the page. Invalid TOML turns the left box red and shows a toast; invalid JSON turns the right box red. Neither direction emits partial output.

Related Tools
SponsorMindElixir