TOML to JSON
Convert TOML to JSON. Supports strings, integers, floats, booleans, dates, arrays and nested tables. Useful to inspect configs or pipe them into scripts. Everything in your browser.
Subset suportado: chaves simples, strings, números, booleans, arrays e tabelas [a.b].
Read a config file without installing a parser
You open a Cargo.toml, a pyproject.toml or some tool config and you need to see the shape of it, or feed it to a script that only speaks JSON. Pulling in a TOML library just to take a look is overkill. Paste the snippet on one side and the tree shows up on the other: plain keys, strings, numbers, booleans, arrays and dotted tables all come out ready to use.
There is no library behind this: it is a subset parser that walks the file line by line. A header like [server.tls] creates the nested object, and everything after it lands inside until the next header. What it leaves out matters as much as what it handles. Double bracket arrays of tables are not recognised, an inline table in braces comes back as raw text, and a dotted key on the left of the equals sign becomes one literal key with a dot in its name.
Read the output before you trust it, especially on large files. Comments are cut from the first hash preceded by whitespace, so a string containing that character mid value comes out truncated. TOML dates arrive in JSON as plain text, not as a dedicated type. For a full pyproject with double brackets and multiline strings, reach for a real parser: tomllib in Python 3.11 or the toml CLI. Everything runs in your browser.
Frequently asked questions
Does it handle arrays of tables in double brackets?
What happens to TOML dates?
Can I paste a whole pyproject.toml?
Related Tools
JSON to TOML
Convert JSON to TOML, the readable config format used by Cargo (Rust), pyproject.toml, Hugo, etc. Supports strings, numbers, booleans, arrays and nested tables. Everything in your browser.
JSON to Python (dataclass)
Convert JSON to a Python dataclass with type hints. Supports List, Optional and nested classes. Everything in your browser.
JSON ⇄ Query String Converter
Convert a flat JSON object to a query string (?a=1&b=2) and vice versa. Supports a[]=1&a[]=2 array style. Everything in your browser.
JSON to Go Struct
Convert a JSON to a Go struct with `json:` tags and inferred types. Detects strings, ints, floats, bools, slices and nested structs. Everything in your browser.
JSONP to JSON Converter
Strips the callback wrapper of a JSONP response leaving only the JSON contained inside the parentheses.
MessagePack to JSON (text) Converter
Explains the MessagePack binary format, its advantages and how to translate it into textual JSON.