Next-Gen App & Browser Testing Cloud
Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

Turn any JSON object into valid TOML v1.0.0, including nested tables and arrays of tables, without leaving your browser.
A JSON to TOML converter rewrites a JSON object as a TOML document, the configuration format defined by TOML v1.0.0. JSON nests everything in braces, while TOML uses named sections such as [database], so the same data becomes easier to read and comment in a config file.
All processing happens in your browser. Your JSON is never uploaded, which matters when a config file holds internal host names or credentials. For the reverse direction and related formats, TestMu AI also offers a TOML to YAML converter and a JSON to YAML converter.
The converter parses your text with RFC 8259 JSON rules, then walks the resulting tree and maps each shape onto its TOML equivalent.
Here is the sample configuration above, shown as JSON and as the TOML this tool produces.
{ "database": { "ports": [8001, 8002] },
"product": [ { "name": "hammer", "sku": 738594937 } ] }
[database]
ports = [8001, 8002]
[[product]]
name = "hammer"
sku = 738594937TOML v1.0.0 defines ten value types, and none of them is null. The format treats an absent setting as a key that is simply not written, so there is no way to store null inside an array either. JSON has no such restriction, which makes null the one shape that cannot cross over unchanged.
Rather than dropping nulls silently, this converter asks you to choose. Omit the key matches how TOML expresses an unset value and is the default.
Use an empty string keeps the key present when a downstream parser expects it. Report an error is useful in a review workflow, where a null means the source data needs fixing before the config ships.
Keep JSON where machines exchange data over an API, and use TOML where a person maintains the file. If you are generating those config files as part of an automated suite, the KaneAI test agent can author and maintain the tests that consume them. To inspect a payload before converting it, use the JSON parser or the JSON to XML converter.
Yes. The converter is completely free, with no sign up, no account and no limit on how many documents you convert. It is part of a wider free developer toolkit, so you can use it as often as your work actually requires.
No. The conversion runs in JavaScript on your own machine, so nothing is uploaded to a server and nothing is stored anywhere afterwards. That makes the tool safe for configuration files that hold internal host names, connection strings or live API keys.
The converter reports an error, because a TOML document must be a table at the top level. Wrap the array in an object first, for example turn [1, 2, 3] into { "items": [1, 2, 3] }, and the conversion will succeed.
The output targets TOML v1.0.0, which was released in January 2021. That version defines the ten value types, dotted table headers and the array of tables syntax that this converter emits whenever your JSON document contains an array of objects.
This page converts in one direction only, from JSON to TOML. To move TOML into another format, convert it to YAML with the TOML to YAML tool first, then turn that YAML result into JSON using the YAML to JSON converter.
Key order is preserved, with one adjustment required by the format. Plain values are written before any table header, because a key placed after a [section] header would be parsed as part of that section rather than the parent table.
TOML is a configuration format designed to be easy for people to read and unambiguous for machines to parse. Rust's Cargo, Python packaging and many Go projects use it for project settings, where explicit tables and typed values avoid YAML's indentation pitfalls.
Did you find this page helpful?
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance