Input TOML

Converted JSON

What Is TOML to JSON?

You've got a Cargo.toml or a pyproject.toml and you need the data in JSON — maybe to feed an API, run a script, or inspect it in a JSON viewer. TOML (Tom's Obvious Minimal Language) is a typed config format. TOML tables map to JSON objects, TOML arrays to JSON arrays, and TOML dates become ISO strings. The TOML 1.0 spec defines the source; RFC 8259 defines the JSON output.

This tool runs entirely in your browser. Nothing is sent to a server. Paste TOML or upload a file; get JSON output. For the reverse, use JSON to TOML. For TOML to YAML, use TOML to YAML. For formatting TOML first, use TOML Formatter.

TOML to JSON Examples

Convert TOML to JSON. Telecom-themed example:

Example: Subscriber config

TOML Input

JSON output:

JSON Output

Click the Sample button above to load more examples into the editor.

How to Use This Tool

1

Paste or Upload

Paste TOML into the left panel or upload a .toml file. Use Sample to load example config. Use Clear to reset.

2

View JSON Output

The right panel shows converted JSON. TOML tables become JSON objects. Invalid TOML will show an error.

3

Copy or Download

Use Copy or Download to get the JSON. For formatting JSON, use the JSON Formatter. For validation, use JSON Validator.

When TOML to JSON Helps

When migrating config, feeding JSON APIs, or using tools that only accept JSON, convert TOML here. Great for Cargo.toml, pyproject.toml, and other config files. For YAML output, use TOML to YAML. For XML, use TOML to XML.

Frequently Asked Questions

Is my TOML data sent to a server?

No. Conversion runs entirely in your browser using JavaScript. Nothing is sent to any server — you can verify this by opening your browser's Network tab.

Are TOML comments included in the JSON output?

No. JSON does not support comments per the JSON spec. TOML comments are dropped during conversion. The data values are fully preserved.

How are TOML dates converted?

TOML dates (Offset Date-Time, Local Date-Time, Local Date, Local Time) become ISO 8601 strings in JSON. Check the output to make sure the format matches what your system expects.

What's the difference between TOML to JSON and JSON to TOML?

TOML to JSON converts a TOML config file into JSON format — useful when APIs or tools only accept JSON. JSON to TOML does the reverse. Use whichever matches your source data.

Can I convert nested TOML tables to JSON?

Yes. TOML nested tables and arrays of tables both convert to nested JSON objects and arrays. The full structure is preserved.

Related Tools

TOML. JSON spec. TOML spec. RFC 8259. MDN. YAML. Postman.