TOML to JSON Converter
Example
Input:
title = "Demo" [owner] name = "Ali"
Output:
{
"title": "Demo",
"owner": {
"name": "Ali"
}
}About this converter
Reading TOML as JSON is how you feed Rust/Python/Go config into JSON-only tooling, and how you sanity-check what a TOML file really declares. This parser covers the working TOML surface: key/value pairs with basic and literal strings, integers, floats, booleans, arrays, inline tables, [table] headers including dotted paths, and [[array-of-tables]]. Datetimes — TOML's one type JSON lacks — are carried as their string form, the only honest mapping. Multi-line basic strings are read correctly; exotic key quoting edge cases follow the spec's common path.
Frequently Asked Questions
How are datetimes handled?
As strings (their ISO form), because JSON has no datetime type.
Does it support dotted keys like a.b = 1?
Yes — dotted keys build nested objects, as the TOML spec defines.