TOML to JSON converter

Paste TOML, such as a Cargo.toml or a pyproject.toml, and see it as JSON below, as you type. Dates become text, and 64-bit integers stay exact.

Tables in full

Dotted keys, [tables], inline tables and [[arrays of tables]] all become nested JSON objects and lists.

Dates and special numbers

JSON has no date type, so TOML dates and times (1979-05-27T07:32:00Z, 1979-05-27, 07:32:00) become strings, written as in the TOML. JSON has no infinity either: inf and nan become null.

64-bit integers

TOML integers go up to 9,223,372,036,854,775,807, and every digit is kept, even where JavaScript itself would round.

Why convert

Many tools, scripts and APIs read JSON rather than TOML. Convert a Cargo.toml, a pyproject.toml or a Hugo or Netlify config to query it with jq, feed it to a script, check it against a JSON Schema, or compare it with a config kept in JSON.

Copy, download or keep editing

The JSON follows your typing, and a mistake in what you paste is pointed out first, with its line and column. Copy or Download take the JSON as it is; Use as text puts it in the editor in place of what you pasted (Ctrl+Z goes back).

Private: nothing is uploaded

Formatting, checking and comparing all happen in your browser. Your documents are saved in the browser's own storage on this computer, not on a server, so they never leave your device.

With your permission, we count anonymous visits (which pages and tools are used), never what you type. See Privacy.

Questions

How do I convert TOML to JSON?

Paste or open the TOML: the JSON appears below it straight away, ready to copy or download.

What happens to my comments?

JSON has no comments, so they are left out. Keep the TOML file if you need them.

Is my data uploaded anywhere?

Your documents aren't: everything runs in your browser, and they are saved on your computer, in the browser's storage for this site. With your permission we count anonymous visits, never their content.

More tools