Convert TOML configuration files (Cargo.toml, pyproject.toml) to JSON format. Supports tables, arrays of tables, inline tables, strings, numbers, booleans, and datetimes.
What is TOML to JSON Converter?
TOML (Tom's Obvious Minimal Language) is a configuration file format designed for readability, using key = value pairs, [tables], and [[array_of_tables]]. JSON is a universal data interchange format. This converter transforms TOML configuration files (like Cargo.toml and pyproject.toml) into JSON format for APIs, databases, and tools that require JSON, and vice versa.
How to Use
- Paste TOML or JSON content in the input area
- Click 'Convert' to parse and transform
- Use the direction toggle to switch between TOML→JSON and JSON→TOML
- Review the formatted output on the right
- Copy the result for use in your application
Why Use This Tool?
Tips & Best Practices
- TOML tables [section] become nested JSON objects
- Arrays of tables [[section]] become arrays of objects
- Inline tables {a = 1} become inline JSON objects
- TOML strings support escape sequences like \n and \t
- When converting JSON to TOML, null values are omitted
- Dotted keys (a.b.c) create nested structures in both formats
Frequently Asked Questions
What is TOML?
TOML (Tom's Obvious Minimal Language) is a configuration file format designed to be easy to read and write. It uses key = value pairs, [tables], and [[array_of_tables]] to organize data. It's commonly used in Rust (Cargo.toml), Python (pyproject.toml), and other projects for configuration.
Why convert TOML to JSON?
Many APIs, databases, and tools require JSON input. Configuration files written in TOML (which is more human-readable) need conversion for systems that only accept JSON. Cargo.toml, pyproject.toml, and other TOML configs often need JSON versions for programmatic processing.
Does this support Cargo.toml and pyproject.toml?
Yes. This converter handles standard TOML syntax including tables, arrays of tables, inline tables, strings, numbers, booleans, and datetimes. Cargo.toml and pyproject.toml files use these standard features and convert correctly.
Is my data safe?
Yes. All processing happens entirely in your browser. Your TOML content is never sent to any server. No data leaves your machine during conversion.
How are null values handled?
TOML does not have a native null type. If a key is absent from the TOML file, it won't appear in the JSON output either. When converting JSON to TOML, JSON null values are omitted from the output since TOML doesn't support null.