1001Ferramentas
📃 Converters

TOML to INI Converter

Converts simple TOML (with [section] and key = value) to INI — strips quotes from strings.

From TOML to INI

Converting TOML to INI comes up when an older program has to read configuration that now lives in TOML: a tool that only understands INI, a legacy configuration library, a script parsing by hand. Since INI is the poorer of the two formats, the translation is one of simplification — and it matters to know what gets lost.

Paste the TOML and receive INI. Bracketed sections are kept, hash comments become semicolon comments, the kind most INI readers accept, and quotes around strings are removed, because INI works with bare values. A line that is neither section, comment nor simple pair comes out commented, marking what had no translation.

The main loss is types. In TOML, quotes separate the string "42" from the number 42, and the format further distinguishes dates, times and arrays. In INI everything becomes text, and the reading program decides how to interpret it. Arrays of tables, nested tables and triple-quoted values do not survive either — all appear commented in the result.

Frequently asked questions

Which comment character should I use in INI?
The semicolon is the most widely accepted, and it is what comes out here: practically every INI reader understands it, including the original Windows format. The hash works in many but not all — and since INI has no specification, the conservative choice is the safe one.
My value had quotes on purpose. Do they survive?
The outer quotes are removed, because in INI they would become part of the value. If the destination program expects the quotes as content, they will have to be put back by hand — looking only at the TOML, there is no way to tell delimiting quotes from literal ones.
What happens to a multi-line value?
It does not survive. TOML has triple-quoted multi-line strings; INI is one value per line, and what to do with continuations varies from reader to reader. Those blocks appear commented, signalling that they need a manual decision.

Related Tools