TOML to JSON converter

Convert TOML to JSON: Cargo.toml, pyproject.toml or any TOML 1.0 file becomes JSON, with dates and times as ISO 8601 strings and errors reported with their line.

TOML

JSON

Waiting for input

What you get

How each result is checked

  1. Your TOML is parsed with a TOML 1.0 parser; errors show the line number.
  2. The JSON is parsed back and compared with the parsed TOML, value by value.

What can't convert exactly

  • JSON has no date type, so TOML dates become ISO strings.
  • Comments are not carried over.

Questions

Can I convert Cargo.toml or pyproject.toml?

Yes. Paste the file as it is.

How do I convert TOML to JSON online?

Paste your TOML or open a file on the left (or click Example). The JSON appears on the right as you type, already checked. Copy it, or download it as a file. Nothing is uploaded.

Can the JSON output be wrong?

Every result is checked before it is shown (the checks are listed on this page). If a check fails, the page says "Review needed" and why, instead of presenting the output as correct, and anything that cannot convert exactly is named in the notes.