JSON to TOML Converter (YAML to TOML too)
Convert JSON or YAML to TOML: [tables], [[arrays of tables]], quoted keys, multi-line strings and optional TOML dates. Output is re-parsed to prove it.
TOML configuration files — Cargo.toml, pyproject.toml, Hugo and Netlify settings — are easier to read than JSON, but writing them by hand from existing data is fiddly: nested objects become [tables], lists of objects become [[arrays of tables]], keys with dots or spaces need quotes, and plain values must come before any table. This converter does all of that from JSON or YAML, then reads its own TOML back with a TOML 1.0 parser to confirm nothing changed.
How to use this tool
- Paste JSON (an object) or YAML (a mapping).
- Decide what happens to null values, which TOML cannot store.
- Optionally write small objects as inline tables and ISO date strings as TOML dates.
- Copy the TOML into your .toml file.
Formula
object → [table] · array of objects → [[array of tables]] · other arrays → [ … ] · text with line breaks → """…"""
Inside every table the plain values come first and the sub-tables after them, which TOML requires; the order of keys is otherwise kept. Keys that are not made only of letters, digits, _ and - are quoted. JSON numbers keep their exact spelling (1.0 stays a float, long integers keep every digit); integers must fit in 64 bits. Strings are escaped as TOML basic strings. Dates are only converted when you ask, because "2024-02-29" may be meant as text.
Example
The sample becomes plain values first — title = "My App", tags = ["web", "api"] and the multi-line motd — then [server], [database] with its url, [database.pool], and two [[users]] blocks for Ada and Lin: five headers in all. With "inline tables" on, {"pt": {"x": 1, "y": 2}} is written pt = { x = 1, y = 2 }.
Frequently asked questions
What happens to null?
TOML has no null. By default the converter stops and shows where the null is; you can leave those keys out or write empty strings instead.
Why did the order of my keys change?
TOML reads every key after a [table] header as part of that table, so plain values have to be written before the sub-tables. Only the position changes, not the data.
Can it convert YAML to TOML?
Yes. Choose YAML (or leave Detect on). Anchors, aliases and merge keys (<<: *defaults) are expanded, YAML comments are not carried over, and YAML 1.2 numbers keep their type and spelling, so 1.0 stays a float and a key such as 200 stays "200". A file whose aliases would expand to millions of values is refused.
Is my data uploaded?
No. The conversion and the check run in your browser.
Sources
Last updated:
Page address with these inputs: https://kakao.mobile/tools/json-to-toml-converter/
Cite or embed this tool
kakaoCalc. (2026, November 8). JSON to TOML Converter (YAML to TOML too). https://kakao.mobile/tools/json-to-toml-converter/
“JSON to TOML Converter (YAML to TOML too).” kakaoCalc, 8 Nov. 2026, kakao.mobile/tools/json-to-toml-converter/.
Paste this code into your page. The widget runs in your visitors' browsers, shows no ads and keeps a link back to this page. Embedding terms