Convert TOML tables, arrays of tables and simple key = value pairs into formatted JSON.
JSON to TOML Converter
Use JSON to TOML Converter
What it does
Convert a JSON configuration into TOML, the format of Cargo.toml, pyproject.toml and many other tools.
It runs entirely in your browser: nothing you enter is uploaded.
Example
Server config
{"title":"Report feed","server":{"host":"127.0.0.1","port":8080,"tls":true},"tags":["web","api"],"owners":[{"name":"alice"},{"name":"bob"}]}title = "Report feed"
tags = ["web", "api"]
[server]
host = "127.0.0.1"
port = 8080
tls = true
[[owners]]
name = "alice"
[[owners]]
name = "bob"title and tags = ["web", "api"] at the top, then a [server] table and two [[owners]] entries.
FAQ
How are JSON types mapped to TOML?
Strings, numbers and booleans become TOML values, objects become [section] tables with dotted names for nesting, arrays of objects become [[array]] tables and other arrays are written inline. The input must be valid JSON; otherwise the parser error is shown.
What does not convert cleanly?
null becomes an empty string because TOML has no null, keys are written without quotes so keys with spaces or dots need quotes added by hand, line breaks inside strings are not escaped, and arrays of arrays are written as tables. Run such results through a TOML validator.
Is the JSON sent to a server?
No. Parsing and conversion run in your browser, and nothing is uploaded.