TOML ↔ JSON Converter
Convert TOML config and JSON data bidirectionally in the browser.
Category: Converters
When to use?
Use it to make Cargo.toml, config files, or doc examples readable in JSON-based tools, or the reverse.
How to use
- Choose the direction.
- Enter TOML or JSON.
- Copy the result.
Input Explanation
Enter a TOML document or a JSON object.
Calculation Basis
It parses TOML with smol-toml, or serializes a JSON object into a TOML string.
Usage Examples
- Convert config files - Check TOML config as JSON, or save JSON as TOML.
- Inspect Cargo.toml - Expand a Rust project's TOML config into a JSON structure.
- Tidy doc examples - Prepare config examples for docs in both TOML and JSON.
Examples
- name = "Bling" → {"name":"Bling"}
- A Cargo.toml dependencies table → a nested JSON object
Cautions
- Malformed source data can cause parsing errors or broken output.
- A mismatched encoding standard or complex nested data may break or drop the structure.
FAQ
Is all TOML syntax supported?
It supports common TOML objects, arrays, and tables.
Is conversion sent to a server?
No. Input is parsed and converted only in the browser.
Are TOML comments kept?
JSON has no comments, so they disappear when converting TOML → JSON.
Are date values converted?
TOML date values are represented as strings in JSON.
Related Tools
- YAML ↔ JSON Converter - Convert YAML and JSON data bidirectionally in the browser.
- INI ↔ JSON Converter - Convert INI config files and JSON data to each other.
- JSON Formatter - Beautify or minify JSON strings instantly and check for validity errors.
- URL Encode / Decode - Encode text into URL-safe form (%XX) or decode an encoded URL back to text.
- Base64 Converter - Encode text to Base64 or decode a Base64 string back to text.
- HTML Escape / Unescape - Convert HTML special characters to entities, and restore entity strings back to characters.