JSON TOML Converter
BetaConvert a JSON object to TOML 1.0 or TOML back to JSON in your browser. Tables, arrays of tables and inline arrays handled; nulls dropped or emptied, your choice.
- Free, no sign-up
- Updated
- Reviewed by Olgun Ozoktas
The config text is converted in your browser and is not uploaded to FindUtils. Analytics and ads may load on the page.
The TOML will appear here..
How to convert JSON to TOML
-
Paste or upload the JSON
The root must be an object, because a TOML document is a table. The sample is a Cargo-like project with a nested dependency table and two [[servers]] entries. -
Decide what a null becomes
TOML cannot express null. Drop leaves the key out; Empty string writes "". Either way the changed keys are listed under Notes, so nothing disappears unnoticed. -
Optionally sort the keys
Sort keys orders every table alphabetically, which is useful when the JSON came from a map with random order and the TOML will be checked in. -
Copy or download
Copy the TOML or download converted.toml. Switch the direction to parse TOML back to JSON; the current output moves into the input so you can check a round-trip.
Common Use Cases
Generating Cargo.toml or pyproject.toml
Static site configs
Reading a TOML file as data
Checking a hand-written TOML
Why convert JSON to TOML in the browser?
TOML is the config format that Rust, modern Python packaging and several static site generators settled on: readable, typed, and strict about what a table is. JSON is the format every script and API speaks. FindUtils' JSON TOML Converter moves data between the two in the browser using a TOML 1.0 parser and writer, so tables, dotted keys, arrays of tables, inline tables, integers, floats, booleans and datetimes are all handled by the library rather than by string replacement.
The two directions are not perfectly symmetric, and the page says so instead of hiding it. JSON has null and TOML does not, so a null is either dropped or written as an empty string and the affected keys are listed. TOML has datetimes and JSON does not, so a TOML datetime becomes an ISO string in JSON, and a JSON string that happens to look like a date stays a string on the way back. A null-free object round-trips exactly.
The page sits beside the JSON YAML Converter, the Env JSON Converter and the Properties JSON Converter, which share the same two-pane layout. Use the JSON Formatter to tidy the JSON first if it came out of a log.
How it compares
Most online JSON-to-TOML converters are thin wrappers around a server call, and several implement TOML 0.4 or 0.5, which means inline tables, multi-line strings and some datetime forms fail. This page uses a TOML 1.0 implementation and runs in the browser, so the config text stays on your machine and the output is what current Cargo and pyproject readers accept.
Compared with a CLI such as yj or remarshal, the page needs no install and shows a parse error with a line and column. It is not a schema checker: it will happily write a Cargo.toml with a misspelled section, because TOML does not know what Cargo expects.
TOML Conversion Tips
- TOML has no null. Choose Drop when the consumer treats a missing key as unset, and Empty string when it needs the key to exist.
- An array of objects becomes [[name]] tables, one per element. An array that mixes objects and scalars is still valid TOML 1.0 and is written inline.
- A JSON string that looks like a date stays a quoted string. TOML datetimes are a distinct type, and the converter does not guess.
- Keys with dots, spaces or symbols are quoted automatically, so "my.key" survives as one key rather than becoming a nested table.
- TOML to JSON turns a local date such as 1979-05-27 into the string "1979-05-27", not a UTC timestamp, so no timezone is invented.