Skip to content
Categories
TOML to JSON
Convert TOML into JSON format.
Overview
- Converts TOML-formatted data into JSON format.
- TOML is a notation designed for configuration files, used by many development tools such as Rust's Cargo.toml and Python's pyproject.toml.
- TOML's date type (e.g. 1979-05-27T07:32:00Z) is converted to an ISO 8601 string in the resulting JSON.
Usage
- Enter the TOML you want to convert into the text area.
- Click the "Convert" button.
- The result, converted to JSON format, is displayed below. Use the "Copy" button to copy it to the clipboard.
Example
Input
[package] name = "my-app" version = "0.1.0"
Output
{
"package": {
"name": "my-app",
"version": "0.1.0"
}
}Use Cases
- Reviewing the contents of a Rust (Cargo.toml) or Python (pyproject.toml) configuration and passing it as JSON to a script
- Converting a TOML configuration file to read it more like JSON
- Converting TOML-formatted data to pass it to a JSON-based tool or API
FAQ
Is the TOML I enter sent anywhere?
No. The conversion runs entirely in your browser, and nothing is sent to an external server.
Are TOML comments preserved in the result?
No. Since JSON cannot contain comments, comments are discarded during conversion.
Can I convert JSON back to TOML?
Yes. Please use the "JSON to TOML" tool.
Notes
- Parsing follows the TOML 1.0 specification. TOML that violates the spec, such as redefining the same key, is shown as an error.
- Converting very large TOML data (several MB or more) may make browser processing slow.
Related Tools
Convert JSON into TOML format.
Convert YAML into JSON format.
Validate whether JSON is correctly formatted.