TOML to JSON Converter
Turn a TOML configuration file into JSON that any program or script can read. Tables become objects, arrays of tables become lists, dates become standard date text, and mistakes in the TOML are reported clearly.
How to Convert TOML to JSON
Quick answer: paste your TOML or open the file; the JSON appears below. Copy it or download the .json file.
-
1
Add your TOML
Paste it or open a file.
-
2
Choose options
Adjust the output on the right.
-
3
Check the JSON
Errors are explained clearly.
-
4
Copy or download
Save it as .json.
What You Get
What Is TOML?
TOML is a configuration format designed to be easy to read. Settings are written as key = value lines, grouped under [table] headings, with clear types for text, numbers, true/false, dates and lists. Many build tools, package managers and applications use TOML for their settings files.
What Is JSON?
JSON is the most common format for data and settings exchanged between programs. It uses curly brackets for objects, square brackets for lists and double quotes around every key and text value. It is strict: no comments and no trailing commas are allowed, which makes it reliable for machines but less friendly to edit by hand.
Why Convert TOML to JSON?
Programs, web services and many tools read JSON but not TOML. Converting lets you inspect a TOML file as data, send its settings to a service, compare it with other files or process it in a script.
How the Conversion Works
Every [table] becomes a nested object, [[arrays of tables]] become lists of objects, inline tables and arrays keep their structure, and comments are removed because JSON has none. Dates and times are written in the standard ISO form.
Example
The sample TOML becomes a JSON object with title, debug and port, plus owner and database objects; the database ports become [5432, 5433].
Who Uses It?
Developers checking configuration, tooling authors, and anyone who needs TOML settings in a JSON-only system. Because everything happens in the browser, it is also safe for internal and confidential files.
Using Your JSON File
Use the JSON in any program, web service or script that reads JSON. Choose minified output for sending data and pretty output for files people will read. To tidy or validate it further, open it in the JSON Formatter.
Common Problems in TOML Input
Common TOML mistakes are text values without quotes, the same key written twice, a table heading repeated, and dates in an unusual layout. Keys with spaces or dots must be quoted. Arrays may span several lines, but every item needs a comma between it and the next. When something is wrong, the message names the line, so fix that line and the output refreshes as you type.
Checking Your JSON Output
Before using the JSON, look at the values that matter most: numbers should be numbers without quotes, true and false should be plain words, and dates appear as text in a standard layout. Keys keep the order they had in your input. If you plan to send the data to another program, choose the minified option to make it as small as possible; for files people will open, keep the indented layout.
Step by Step
Start by pasting your TOML into the input box, or press Open File to load it from your device. The converter reads it straight away and shows the JSON in the output box. If the input has a problem, a short message explains what is wrong and where, so you can fix it in place. Next, adjust the options on the right; the output refreshes immediately so you can compare. When you are happy, press Copy to put the result on your clipboard, or Download to save it as a .json file ready to use.
Private, Free and Instant
The converter is free, with no sign-up, no limit beyond the 5 MB file size and no watermark. It runs in your browser, so settings files with passwords, server addresses or customer data are never uploaded or stored. Paste the content, drop a file on the input box or press Open File, then copy the result or download it with the right file extension. It works on Windows, Mac, Linux, Chromebooks, iPhone and Android.
TOML to JSON: Reading Configuration as Data
TOML is used for Rust's Cargo files, Python's pyproject files and many tools. Converting to JSON shows the data as nested objects.
Note
Dates become strings in ISO form. Comments disappear. See TOML to YAML for another readable format.
Frequently Asked Questions
Questions about TOML to JSON