TOML ⇄ JSON Converter

Paste TOML to see it as JSON, or paste JSON to write it as TOML. Date and time values are kept as text in the JSON. JSON null has no TOML form, so the tool stops and names the path that holds it.

TOML ⇄ JSON Converter runs entirely in your browser: the text you paste is never sent to a server. It is free and needs no sign-up.

How to use it

  1. Convert TOML to JSON or back Under Direction, choose TOML to JSON or JSON to TOML, then paste the text into the Input box. The result updates as you type. Errors show a line and column, or the JSON path that TOML cannot write.
  2. Know what the JSON keeps Dates and times stay as their original text, because JSON has no date type. Infinity and NaN become the strings inf, -inf and nan, and integers beyond 9007199254740991 are refused.
  3. Copy the result or fix a null Press Copy under Result. TOML has no null value, so a null in the JSON stops the conversion. Remove that key or give it a value, then convert again.

Questions

Why do dates come out as text in the JSON?

JSON has no date or time type, so the TOML tool keeps offset date-times, local dates and local times exactly as written and stores them in JSON strings. If you need Date objects, convert them with your own code after checking the format.

Why is a null value refused when writing TOML?

TOML 1.0 has no null, so the value cannot be written. The message shows the path, such as $.server.timeout. Remove the key or give it a value before converting again. The tool never guesses a replacement.

Which TOML 1.0 features are supported?

The tool follows those rules for tables, arrays of tables, dotted keys, inline tables and the four string forms. Duplicate keys and tables are reported with their line number. Integers outside the safe range stop the conversion, so keep very large IDs as strings.