TOML and JSON configuration converter
Convert one configuration between TOML and JSON, retaining empty objects, arrays of tables and numeric types, with the original and report.
- 1Add input
- 2Adjust settings
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Convert one configuration between TOML and JSON, retaining empty objects, arrays of tables and numeric types, with the original and report.
How to use this tool
- Choose TOML → JSON or JSON → TOML.
- Paste the actual configuration or select the original UTF-8 file.
- Convert and review empty objects, number categories and the report counts.
- Download the converted payload, source-original and conversion-report.json, then validate the configuration in its receiving application.
Supported inputs and limits
Paste text or select one UTF-8 file, each up to 2 MiB. The file takes priority over stale pasted text; its name is limited to 512 UTF-8 bytes. Select the direction explicitly; extensions do not determine it.
Accept TOML 1.1 tables, arrays of tables, empty objects, nested or mixed arrays, scalar strings, booleans and the numbers below. JSON requires a root object; empty TOML represents an empty object.
Integers range from −9007199254740991 through 9007199254740991. TOML integers and JSON tokens without a decimal point or exponent are read as BigInt first; unsafe integers reject the whole conversion.
Decimal/exponent tokens use finite IEEE 754 binary64 and retain the float-versus-integer category. Decimal rounding and underflow can occur: 1.234567890123456789 becomes 1.2345678901234567, and 1e-400 becomes float 0.0. Original number spelling and arbitrary decimal precision are not retained.
JSON null, TOML date/time values, non-finite numbers, floating negative zero, raw JSON −0, duplicate keys, malformed grammar or Unicode reject the whole input. Values are never silently deleted, changed to strings or repaired. Date-looking strings remain strings.
At most 100,000 logical value nodes and 64 container levels; the root object is level 1 and scalar leaves add no container level. The serialization work score is limited to 16 MiB, a conservative logical score rather than exact memory or CPU use. Complete conversion is limited to 8 MiB and its report to 64 KiB; no partial files are returned.
One leading BOM is accepted and recorded; two are rejected. Original bytes and BOM stay intact. Comments, spacing, table layout, integer bases and number spelling normalize; TOML multiline newlines follow its data model.
Conversion runs in a browser Worker; a 10-second timeout or cancel terminates it. The screen previews at most 4,000 Unicode code points; copy and download retain the complete converted payload. Contents are not uploaded.
Worked example
Example input
title = "Demo"
ratio = 1.0
[service]
arguments = {}
[[rules]]
enabled = true
Example options
{"direction":"toml-to-json"}Example output
{"title":"Demo","ratio":1.0,"service":{"arguments":{}},"rules":[{"enabled":true}]}
When something does not work
Keep the original. Correct duplicate keys, unsupported values, encoding or grammar; split configurations above the limits. After cancelling, rerun with the same file and direction. Clear the file selection to use pasted input.
Frequently asked questions
Will empty arguments objects disappear?
No. An inline arguments = {} and its corresponding empty table header can represent the same empty object. Table placement and layout may change; compare the parsed structure.
Does this retain every numeric lexeme?
Safe integers remain exact. Floats use binary64 and can round. Integer 1 and float 1.0 retain different categories, while bases, exponent spelling and decimals normalize. The original download retains input bytes.