T tomlkit·org
Inspect Formatter Validator Convert TOMLJSON JSONTOML TOMLYAML YAMLTOML INITOML TOMLINI .envTOML TOML.env TOMLTS Transform Sort keys Flatten Minify Compare Diff Merge

INI to TOML Converter

updated 24 May 2026

Migrate a legacy INI file to TOML. Sections become tables, dotted section names become nested tables, and obvious types (numbers, booleans) are coerced from the strings.

dotted [a.b] sections become nested tables

Why migrate to TOML

INI has been the default for hand-written configs for decades, but it has no real spec. Every parser disagrees on what a quoted value means, whether = or : separates keys, and whether boolean coercion is the parser's job or the application's. TOML fixes those by being strictly spec-defined.

If you maintain an old Python, PHP, or .NET app that ships INI configs and you're about to rewrite the loader anyway, TOML is the obvious next step. It maps 1:1 to the shape your INI already has, just with proper types.

How to use it

  1. Paste INI on the left, or drop a .ini / .conf file.
  2. Click Convert.
  3. Review the right pane and download as .toml.

INI → TOML mapping

  • [section][section] TOML table.
  • [a.b] → nested table [a.b] in TOML.
  • key = value and key: value are both accepted.
  • Comments starting with ; or # are stripped.
  • Quoted strings ("...", '...') are unquoted before output.
  • true / false / yes / no / on / off become real booleans.
  • Integer / float literals are coerced when the value is purely numeric.

FAQ

What if my INI has duplicate keys?

The last write wins. INI has no spec to lean on here, so this matches what most parsers do.

What about array values?

INI doesn't have a real array syntax. If you have tags = a, b, c in INI, it'll come out as a string in TOML. Edit it manually to wrap in [ ].

Is the output canonical TOML 1.0?

Yes. The converter parses INI into a JS object, then runs smol-toml's stringifier — the same one used by the formatter.