Developer

TOML to JSON Converter

Convert TOML into JSON in your browser with a complete parser covering tables, arrays of tables, inline tables, dotted keys, all four string forms and typed numbers and dates.

Last reviewed by the Radiatus Cloud team

Structure report appears here.

Need this built for your product?

We design, build & host secure software & APIs.

Talk to an engineer

TOML has more shape than it appears to

TOML looks like an INI file, which leads people to write regex converters that work on the first example and fail on the second. The format has four distinct string forms, integers in four bases with underscore separators, floats including infinity and not-a-number, four date and time types, inline tables, arrays that may span lines, dotted keys that create nested structure, and arrays of tables that append rather than replace. This converter implements all of them rather than the common subset, so what comes back is the document you wrote.

Dates are the part that does not survive the trip

TOML has first-class date and time types; JSON does not. Any converter has to make a decision, and the honest one is to emit dates as strings in their original form rather than silently reformatting them into something a consumer might reinterpret in another timezone. This tool does that and reports how many values it affected, so you know where the type information went rather than discovering it later in whatever reads the JSON.

Arrays of tables are where hand-written converters break

A double-bracketed heading appends a new table to an array each time it appears, which is why a product catalogue can be written as a repeated block rather than as bracketed JSON. A converter that treats it like a normal table silently keeps only the last entry, so a list of ten products becomes one and nothing errors. This parser builds the array properly and the structure report gives the element count for each one, which makes that class of bug visible immediately.

Related tools

  • JSON Formatter — Format and beautify JSON in your browser. Pinpoints syntax errors by line and column, flags unsafe integers, and never uploads your data to a server.
  • JSON Validator — Validate JSON syntax with precise line and column errors, and check documents against a JSON Schema. Runs locally in your browser, nothing uploaded.
  • Regex Tester — Test regular expressions against sample text with live match highlighting, capture groups and flag control. Runs entirely in your browser.
  • HTML Minifier — Minify HTML by removing comments and redundant whitespace, without breaking inline elements or pre blocks. Runs entirely in your browser.

Frequently Asked Questions

What happens to TOML dates in JSON?

They become strings in their original form. JSON has no date type, and reformatting them risks a consumer reinterpreting the timezone, so the original text is preserved and the count of affected values is reported.

Does this handle arrays of tables?

Yes. A double-bracketed heading appends a new table to an array each time it appears. Converters that treat it as a normal table silently keep only the last entry, which is why the structure report shows the element count for each array.

Which TOML string types are supported?

All four: basic strings in double quotes with escapes, literal strings in single quotes with none, and the triple-quoted multiline forms of both, including the line-ending backslash that joins lines in multiline basic strings.

Are underscores in numbers supported?

Yes, along with hexadecimal, octal and binary integer prefixes, exponents, and the special float values inf and nan. Underscores are digit separators and are removed before parsing.

What happens to very large integers?

An integer beyond 2^53 cannot be represented exactly in JavaScript, so the parser refuses it with an error naming the value rather than converting it to a number that is quietly wrong.

Is my TOML uploaded anywhere?

No. The parser runs entirely in your browser as JavaScript. Nothing is sent to a server, which matters because TOML files routinely hold connection strings and credentials.

Privacy & Security

Everything runs in your browser; nothing is uploaded.

Data: None
Client-side-Side
Active
v1.0

How to Use

Paste TOML and the JSON appears below.

Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.