Convert TOML to INI
Turn TOML files into INI. Top-level objects become [sections] and plain top-level values come first, and an object inside a section becomes its own section named with a dot, such as [server.tls].
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop TOML files on the dialor turn it to pick what to do
TOML settings as flat INI sections.Tables become sections, and nested tables get dotted names. Comments are dropped.
What you get
One INI file. Plain top-level values come first. Each top-level table becomes a [section], and a table inside a section becomes its own section named with a dot, such as [server.tls].
Dates and times are written as ISO 8601 text.
How lists are written
A list becomes a repeated key, one line per item. An empty list disappears, because there is no key to repeat.
Objects or lists inside a list are written as JSON text, since INI has no way to nest them.
A TOML file whose top level is a list becomes one section per entry, numbered from 0 under items, as [items.0]. An entry that is not an object goes under the key value.
What it leaves behind
Comments are dropped. INI output has no place for the structure of nested lists, so those are kept only as JSON text.
When it stops
A file that cannot be parsed stops the conversion with
input_corrupted. The TOML must be readable before any INI is written.
TOML and INI.What each format is.
The formats
TOML
TOML configuration files, the format of Cargo and pyproject.
- Extensions
- .toml
- MIME type
- application
/toml - Kind
- Text and data
INI
Sections of key and value pairs, the settings format of Windows and many tools.
- Extensions
- .ini .cfg
- MIME type
- text
/x -ini - Kind
- Text and data
In your code.The same TOML to INI conversion through the API, for your app or your agent.
$ cv convert report.toml report.ini$ cv convert report.toml report.iniQuestions.What people ask about TOML to INI.
Each nested table becomes its own section with a dotted name. A table inside a server section, for example, becomes [server.tls].
It becomes a repeated key, one per item. An empty list is left out. Objects or lists inside a list are written as JSON text.
No. Comments are dropped in the INI file.
There is a separate conversion for that: INI to TOML.