TOML to JSON Converter

Convert TOML configuration files to JSON instantly in your browser

A TOML to JSON converter parses TOML configuration files and produces equivalent JSON. TOML is the configuration format used by Rust's Cargo package manager, Python's pyproject.toml, and Hugo static sites. This free tool converts your TOML files to JSON instantly, with clear error messages for any syntax problems — all in your browser.

TOML Input

JSON Output

JSON output will appear here...

How to Convert TOML to JSON

TOML (Tom's Obvious Minimal Language) is designed to be a minimal configuration format that maps unambiguously to a hash table. It is the native configuration format for the Rust ecosystem, Python packaging tools, and many static site generators. Converting TOML to JSON is useful when integrating TOML-based configuration into systems that work with JSON APIs or JavaScript code.

Step 1: Paste Your TOML Configuration

Copy your TOML file contents — from a Cargo.toml, pyproject.toml, config.toml, or any other source — and paste them into the TOML Input area on the left.

Step 2: Convert and Review

Click Convert (or the tool auto-converts as you type). The resulting JSON appears on the right with proper formatting. TOML tables like [database] become nested JSON objects, and array of tables like [[products]] become JSON arrays of objects.

Step 3: Handle Parse Errors

If your TOML has syntax errors, an error message explains the problem. Common issues include missing quotes around string values, incorrect bracket syntax for tables, or duplicate keys. Fix the error in the input and the output updates automatically.

Step 4: Copy or Download the JSON

Use the Copy button to grab the converted JSON for use in your code or API client. Use Download to save it as a .json file.

TOML Type Mapping

TOML types map directly to JSON types: TOML integers become JSON numbers, TOML booleans become JSON booleans, TOML strings become JSON strings, TOML arrays become JSON arrays, and TOML tables become JSON objects. TOML datetime values, which have no JSON equivalent, are preserved as ISO 8601 strings.

Frequently Asked Questions

Is the TOML to JSON converter free?

Yes, completely free with no account required and no data sent to any server. All parsing runs in your browser using client-side JavaScript.

Is my TOML data private?

Yes. Nothing is uploaded anywhere. The TOML parser runs entirely in your browser, so configuration files with sensitive credentials, API keys, or secrets never leave your device.

What TOML features are supported?

The converter supports key-value pairs, quoted strings (single and double), integers, floats, booleans, standard datetime values, inline arrays, multi-line arrays, standard tables ([table]), and array of tables ([[array-of-tables]]). TOML v1.0 dot-notation keys and inline tables are also handled.

What is TOML used for?

TOML (Tom's Obvious Minimal Language) is widely used for application configuration. Rust's Cargo.toml, Python's pyproject.toml, Hugo's site configuration, and many other tools use TOML because it is unambiguous and easy to read, with a clear mapping to hash tables.

Why is my TOML showing a parse error?

Common TOML mistakes include forgetting quotes around strings, using invalid key names without quotes, incorrect table header syntax, or placing values after a table header on the same line. The error message will indicate the line number and nature of the problem.

How are TOML datetime values converted?

TOML datetime values (RFC 3339 format like 2024-01-15T10:30:00Z) are converted to ISO 8601 strings in JSON, since JSON has no native datetime type. The string representation preserves the full precision of the original TOML datetime.