TOML to JSON
Convert TOML to JSON. Paste TOML on the left; the JSON output builds on the right as you type.
[package]
name = "vayce"
version = "1.0"
[[servers]]
host = "a.example.com"
[[servers]]
host = "b.example.com"
becomes
{
"package": { "name": "vayce", "version": "1.0" },
"servers": [{ "host": "a.example.com" }, { "host": "b.example.com" }]
}
[package] becomes a nested object under the package key. The two [[servers]] blocks, TOML’s syntax for an array of tables, become a JSON array with one object per block, in source order.
Typed values
TOML distinguishes strings, integers, floats, booleans, dates, and arrays at the syntax level, unlike CSV or plain text formats where everything is a string until you coerce it. That typing carries straight into JSON: a bare 42 becomes the number 42, and true becomes the boolean true, no coercion step needed on this side.
Reading config files
TOML to JSON is the direction you’ll use most when a Rust or Python project’s config, Cargo.toml, pyproject.toml, config.toml, needs to feed a JavaScript build step or a debugging script that expects JSON. Paste the whole file; comments in the source are dropped, since JSON has no comment syntax.
Parse errors
TOML is strict about table redefinition and duplicate keys within the same table, both of which fail to parse rather than silently overwriting. The input pane’s error footer reports the exact line, which is usually enough to spot a copy-paste duplicate or a table declared twice.