JSON tools

JSON to TOMLinspect the configuration before exporting

Use the sample to compare tables with inline objects. Only strict JSON objects can become a TOML document.

JSON to TOML

TOML to JSON

JSON input

Processed in this browser. Your input is not uploaded or stored.

TOML result

Output options

Type preview

Result is out of date; export is disabled.

JSON to TOML helps when configuration data arrives as a JSON object but the receiving program reads TOML. Nesting becomes named sections, while lists of objects become repeated table sections.

A string containing a date stays text. A dotted key stays one key. The converter checks these distinctions instead of assuming that a readable result is also the same data.

Why use JSON to TOML here?

Make nesting explicit

JSON to TOML turns nested objects into named tables and object lists into arrays of tables. Each table path quotes its individual keys when needed, so "api.version" is not confused with an api object containing version.

A nested data tree becomes distinct table sections and two repeated object cards.

Stop at unsupported values

A null inside a list stops conversion at its JSON Pointer. No list item is removed and no empty string is substituted. The same rule blocks integers outside the supported range; a previous result cannot be exported after failure.

A highlighted missing value stops a conversion arrow before it reaches the result document.

Choose a representation and inspect it

01

Compare the two layouts

Tables mode moves scalar assignments before nested sections so that their scope stays correct. Inline mode puts each root member on one assignment line. Mixed arrays use inline objects in either mode.

02

Control when the result updates

Auto-convert waits 350 milliseconds after a change. Turn it off to use Convert or Ctrl/Cmd+Enter. Editing input or changing layout immediately disables export until the new result is checked.

03

Read paths before fixing values

The preview shows 50 entries at a time, up to 500; counters include all nodes. JSON Pointer writes / as ~1 and ~ as ~0. An error adds its input line and column so you can change the intended value.

Configuration data, represented deliberately

Tables with the right parent

Nested arrays of objects attach to the current parent table entry. Empty objects remain tables or inline objects; an empty list remains []. Array order is retained even when sibling tables need a different layout order.

Integer tokens stay exact

Signed 64-bit integers are emitted without a JavaScript Number conversion, including identifiers above 2⁵³. Decimal and exponent tokens retain their spelling. Integer-shaped -0 becomes -0.0 to retain its sign as a float.

Keys and strings keep their roles

Spaces, dots, empty names and Unicode keys are quoted as needed. Quotes, backslashes, newlines and control characters are escaped. Text such as "true", "007" or a date is never inferred as a boolean, number or timestamp.

An independent reader checks the output

The generated TOML is parsed and compared with the input tree, using BigInt for integers. Shapes, array lengths, string values and numeric types must agree before download. The emitter uses syntax compatible with TOML 1.0.

What this conversion cannot decide

A root object is required
Top-level arrays, strings, numbers, booleans and null are rejected. Choose your own property name if a root array needs wrapping. An empty object produces an empty, valid TOML document and a zero-byte download.
No silent repair or deletion
Comments, trailing commas, JSON5 and decoded duplicate keys fail validation. Null is rejected at any depth. The converter does not sort, trim, omit values, guess defaults or repair source text.
Numeric and Unicode boundaries
Integers must be between -9223372036854775808 and 9223372036854775807. Floats that become infinity or nonzero values that become zero are rejected. Ordinary decimal rounding by a 64-bit float reader remains possible. Unpaired surrogates are rejected.
A bounded single conversion
Limits are 500,000 input characters, depth 100, 50,000 nodes and 2,000,000 output characters. The preview cap does not truncate export. There is no file import, URL fetch, batch archive or saved history.
Syntax does not migrate an application
Converting package.json does not create a valid Cargo manifest or pyproject.toml schema. Field names and application requirements remain your responsibility. Source whitespace and global key order are not preserved.

JSON to TOML questions

What is a convenient way to convert JSON into TOML?

Paste an object into this JSON to TOML converter, choose tables or inline tables, and inspect the checked output. JSON to TOML online works for one text document; this page offers neither a command-line interface nor automatic file loading.

Does TOML support nested arrays of objects or tables?

Yes. A nonempty list consisting entirely of objects becomes repeated [[table]] sections in the default layout. Child tables are emitted within the correct parent entry. Mixed arrays instead contain inline objects.

Why must the JSON be an object?

TOML documents describe a root table of named values. An anonymous array or scalar has no root key to write. Add a meaningful wrapper yourself; the converter will not invent a name such as items.

Why does TOML have no null?

Null is absent from TOML’s value types. Removing a property, using an empty string and choosing an application default mean different things. This tool reports the first null and leaves that decision to you.

Is the round trip lossless?

Not universally. Accepted integers retain their exact values, and strings and array structure are checked. Decimal tokens survive in the text, but consuming readers can round floats. Whitespace, escape spelling and table layout change; no reverse conversion is performed here.

Have a configuration that exposes an edge case?

Check your next configuration

Use JSON to TOML to inspect the example’s literal dotted key and repeated server tables, then try your own configuration.