TOML ↔ JSON Converter
Free online TOML to JSON converter and JSON to TOML converter. Live conversion with error line/column hints, configurable indent. Runs entirely in your browser, no upload.
What is TOML and why is it used?
TOML (Tom's Obvious, Minimal Language) is a configuration file format designed to be easy to read and write. It is widely used in Rust (Cargo.toml), Python (pyproject.toml) and many other modern projects.
How do I convert TOML to JSON?
Paste your TOML into the TOML → JSON tab. The JSON result appears instantly as you type, with your chosen indentation. Copy or download it when you are done.
Can I convert JSON back to TOML?
Yes. Switch to the JSON → TOML tab and paste valid JSON. Flat objects, arrays and nested tables are written as TOML tables and inline tables.
Does the tool show where TOML errors are?
Yes. Invalid TOML shows a localized error with the exact line and column of the problem, so you can fix typos quickly.
Is my configuration data sent to a server?
No. The conversion runs entirely in your browser using the smol-toml library bundled locally. Nothing is uploaded anywhere.
Which TOML features are supported?
The tool supports the TOML 1.0 specification including tables, arrays, inline tables, strings, integers, floats, booleans, dates and times.
How are TOML dates converted to JSON?
TOML date and datetime values are converted to ISO-8601 strings in JSON, since JSON has no native date type. Converting back yields quoted strings.
Can I choose the JSON indentation?
Yes. Pick 2 spaces, 4 spaces, a tab or compact (no whitespace) output from the indent selector.
How to Use TOML ↔ JSON Converter
TOML ↔ JSON Converter translates between TOML configuration files and JSON in both directions, live as you type, using the smol-toml parser bundled locally in the page. Nothing you paste is uploaded — every conversion runs inside your browser.
- Stay on the TOML → JSON tab, paste your TOML (for example a Cargo.toml or pyproject.toml section) into the left input box. The JSON result appears on the right as you type.
- Pick the JSON indent — 2 spaces, 4 spaces, tab, or compact — and the output reformats instantly. Invalid TOML produces an error showing the exact line and column.
- Switch to the JSON → TOML tab and paste valid JSON to get a TOML document with tables and inline tables.
- Use Copy on the output panel, Download to save output.json or output.toml, or Move output to input to chain a round-trip conversion.
- Press Example to load a ready-made snippet demonstrating tables, arrays and inline tables.
Round-tripping TOML dates: they become ISO-8601 strings in JSON, so strip the quotes before sending the value back into a strict TOML validator.
Related Tools
- YAML to JSON Instantly convert YAML to JSON format online. Paste YAML, get clean JSON output with validation and formatting.
- JSON to YAML Convert JSON to YAML format instantly. Paste JSON and get clean, properly indented YAML output.
- XML to JSON Free online XML to JSON converter. Paste XML and get properly formatted JSON output instantly with validation and structure preservation.
- JSON Validator Validate JSON syntax instantly with detailed error messages and line numbers. Free online tool that runs 100% in your browser.
- JSON Prettify Format and beautify JSON with customizable indentation. Instantly prettify compressed JSON online in your browser.
- TSV to JSON Convert TSV to JSON online free. Supports headers, auto type detection, and minification. All processing in browser.
- JSON to CSV Free online JSON to CSV converter. Flatten nested objects with dot notation, choose custom delimiters, and download instantly. 100% browser-based, no upload needed.
- CSV to JSON Converter Convert CSV to JSON online free. Supports custom delimiters, header-based objects, auto type detection. All processing in browser.