TOML to JSON converter

Paste TOML and select the syntax version your reader supports. Get JSON, a type report and diagnostics for supported TOML 1.1 features.

Choose TOML 1.0 or 1.1 and convert a configuration locally. JavaScript is required.

How it works

The parser checks keys, values, tables and arrays against the selected TOML syntax. In 1.0 mode it rejects the 1.1 additions: escape sequences \e and \xHH, omitted seconds, and multiline inline tables or inline trailing commas. In 1.1 mode it lists these features as diagnostics.

Integer arithmetic is exact. Accepted integers range from −9223372036854775808 to 9223372036854775807. Values outside JSON’s commonly interoperable integer range become strings by default. Dates, times, Infinity and NaN become strings and appear in the type report. Local date/time values are never assigned a timezone.

No decimal rounding occurs: finite numeric text retains its digits. Downstream binary floating-point readers can round it. Date/time fractions and original text are retained, including omitted seconds; TOML 1.1 interprets omitted seconds as zero. Comments and formatting do not survive conversion.

Worked examples

Exact integer conversion

id = 9007199254740993 produces a JSON string containing 9007199254740993 by default. port = 8080 remains the JSON number 8080.

Optional seconds in TOML 1.1

start = 07:32 is accepted in 1.1 and rejected in 1.0. It means 07:32:00 in TOML; the JSON result preserves "07:32" as a string and reports the original local-time type.

New escape syntax

letter = "\x41" becomes "A" in 1.1, Unicode code point 65. Version 1.0 rejects this escape.

Scope and limits

Supports basic and literal strings, multiline strings, numeric bases, booleans, arrays, inline tables, quoted and dotted keys, normal tables and arrays of tables. Duplicate definitions and extensions of closed inline tables are rejected. Leap-second values are outside scope and are rejected; this is not a certification of all TOML conformance cases.

Application limits: 256 KiB, 10,000 lines, 64 levels and 10,000 parsed values. The report displays at most 200 rows. This tool does not generate TOML from JSON.

Frequently asked questions

Why does TOML 1.0 reject my configuration?
It may use a 1.1 addition. Select 1.1 and inspect the feature list. A successful parse without listed 1.1 features falls within this converter’s shared 1.0 syntax.
Can JSON preserve a TOML date type?
No. JSON has no native date or time type. This converter retains the original date/time text as a string and records the source type.
Are NaN and infinity valid JSON numbers?
No. TOML permits these floats, but this converter writes their original spelling as a JSON string and reports the type change.
Can I preserve a large integer as a number?
Choose exact numeric text. The emitted digits are exact, but consumers using JavaScript Number can round them. The default string policy avoids that rounding.
Is my configuration uploaded?
No. Parsing, file opening and downloads run locally. Inputs are not stored in browser history or a saved-content service.

Sources

Last reviewed 2026-11-14; next review due by 2027-02-12. The method is written out above so you can check our math.