1001Ferramentas
🔄 Converters

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?
No. The header line is silently skipped and the keys below it end up inside the previous table, which changes what the file means. Use a full parser for those.
What happens to TOML dates?
They come through as strings in their original format. TOML has a native date type and JSON does not, so text is the only landing spot. Parse it downstream if you need a real date.
Can I paste a whole pyproject.toml?
You can, but read the result carefully. Inline tables, multiline strings and double bracket blocks fall outside the supported subset and will not convert correctly.

Related Tools