DevMate
Back to Toolverse

Converters

JSON ↔ TOML Converter

Turn JSON configuration objects into TOML tables or TOML into JSON. Check object roots, null handling, number limits, and a nested service example.

Local processing
Loading tool workspace...

About this tool

When to use it

Turn JSON configuration objects into TOML tables or TOML into JSON. Check object roots, null handling, number limits, and a nested service example.

How to use it

Choose JSON to TOML for a generated configuration object that must be saved as a TOML file. Choose TOML to JSON to inspect settings in a JSON-based API or comparison tool. Switching direction resets the workspace to an example. Convert, review the table structure, and use Copy, Share, or Download to transfer the result.

Guide updated . Examples checked against this implementation.

Worked examples

JSON to TOML: nested settings

Input

{"service":{"port":3010}}

Expected output

[service]
port = 3_010

The service object becomes a table. Numeric separators are serializer formatting, not a change to the port number.

TOML to JSON: inspect a table

Input

[service]
port = 3010

Expected output

{
  "service": {
    "port": 3010
  }
}

The table becomes a nested object. The JSON output uses two-space indentation and contains values rather than TOML comments.

Errors and unsupported input

{"service":{"token":null}}

Decide whether your application expects an omitted field or a replacement value. TOML cannot represent null; conversion rejects the document instead of dropping that property.

value = inf

JSON cannot represent infinity or NaN. Change the TOML value to a finite number or a quoted string if your receiving system accepts it.

Continue this workflow

  • JSON Diff: Compare the converted object with your expected configuration.
  • YAML ↔ TOML Converter: Convert directly between TOML and YAML for a YAML-based deployment configuration.

Format references

Questions

Frequently asked questions

Why must JSON start with an object?

A TOML document starts with a table of named keys. Wrap an array in a meaningful property only when the receiving application expects that shape.

Will TOML comments appear in JSON?

No. JSON output contains parsed values. Store explanatory comments separately or retain the original TOML file.