TOML to JSON Converter

Convert TOML configuration files to JSON instantly. Supports all TOML types: tables, arrays, inline tables, dates and multi-line strings. Free online TOML converter.

TOML Input
JSON Output

About the TOML to JSON Converter

The TOML to JSON Converter parses TOML configuration files and outputs equivalent, pretty-printed JSON in real time. It supports the full TOML specification including nested tables, arrays of tables, inline tables, multi-line strings, and date-time values. All conversion runs client-side via the j-toml library, so your configuration data stays private.

Common use cases

Frequently Asked Questions

What is TOML and how is it different from JSON or YAML?

TOML (Tom's Obvious Minimal Language) is a configuration file format designed to be easy to read and write. Compared to JSON, TOML is more human-friendly - it supports comments, multiline strings, and date/time types natively, and does not require quoting all keys. Compared to YAML, TOML is more explicit and less indentation-sensitive, reducing ambiguity in complex structures. TOML is the default format for Rust's Cargo package manager, Python's pyproject.toml, and Hugo and Zola static site generators.

How do I convert a TOML file to JSON online?

Paste your TOML content into the left panel above and the JSON equivalent is generated instantly in the right panel. Click "Copy JSON" to copy the output to your clipboard. The converter supports the full TOML specification including nested tables, arrays of tables, inline tables, multi-line strings, and date-time values. The output is formatted as pretty-printed JSON with 2-space indentation. Any syntax errors in the TOML are displayed immediately below the input panel.

How are TOML tables and arrays of tables converted to JSON?

A TOML table ([section]) maps directly to a nested JSON object. An array of tables ([[items]]) maps to a JSON array of objects - each [[items]] block becomes one element in the array. Inline tables like point = {x = 1, y = 2} become nested JSON objects. TOML date-time values (e.g. 1979-05-27T07:32:00Z) are converted to ISO 8601 strings in the JSON output, since JSON has no native date type.

Can I convert a Cargo.toml or pyproject.toml file to JSON?

Yes - paste the full contents of any Cargo.toml, pyproject.toml, .cargo/config.toml, or any other TOML configuration file and the converter will produce the equivalent JSON. This is useful for processing TOML config data with JSON-only tools, migrating configuration formats, or debugging the structure of complex TOML files by viewing them in a more familiar JSON representation. Arrays of dependencies in Cargo.toml will convert to JSON arrays as expected.

Is my TOML configuration data sent to a server when I use this tool?

No. This TOML to JSON converter runs entirely in your browser using the open-source j-toml JavaScript library loaded from a CDN. Your configuration data - including any API keys, database credentials, or internal service names that may appear in config files - is never transmitted to any server, stored, or logged. It is safe to paste sensitive configuration content for format conversion.