TOML to JSON Converter
Turn TOML into JSON, usually to feed tooling that cannot read TOML or to inspect how a config file is actually structured.
This page opens with TOML as the input and JSON as the output.
Tables become nesting
A [tool.ruff] header becomes a nested object under tool, then ruff. Seeing that expansion is often the point of converting - a long TOML file with many bracketed sections hides its actual shape, and the JSON makes the hierarchy obvious.
Dates lose their type
TOML dates and times are first-class values. JSON has no date type, so they become strings. If a consumer expects to parse them back, the format matters - check that the string form round-trips into whatever library reads it.
Comments do not survive
TOML config is usually heavily commented, and none of that reaches JSON. Convert to read or to feed a tool, and keep the TOML as the file you edit.
Inline tables and mixed arrays
TOML inline tables written in braces convert to ordinary nested objects, so the distinction between inline and section syntax disappears entirely - it was only ever a formatting choice in the source.
TOML also permits heterogeneous arrays in recent versions, which JSON accepts happily, so nothing is lost in that direction either.
Dotted keys and deep nesting
A dotted key such as a.b.c = 1 expands to three levels of nested objects, identical to what a bracketed section would produce. TOML treats the two spellings as equivalent, so the JSON reveals the structure regardless of which the author used.
Redefining a table already defined by a dotted key is an error in TOML, which is worth knowing if a hand-merged config refuses to parse.