YAML to INI Converter
Convert YAML configuration to INI format. Nested mappings become dotted [section.subsection] blocks.
How YAML to INI conversion works
YAML supports deeply nested mappings, lists, and rich scalar types, while INI is a flatter format built from [section] headers and key = value pairs. This tool parses your YAML into a structured object, then walks it recursively: keys at the top level with plain values become global keys written before any section, and every nested mapping becomes its own INI section. A mapping nested two or more levels deep (for example server.tls) is written as a dotted section name so the hierarchy isn't lost. Lists are flattened into a single comma-separated value, and values containing spaces, semicolons, or # are wrapped in quotes so INI parsers don't misread them as comments. Everything runs locally in your browser — nothing is uploaded anywhere.
Built and maintained by Meet Shah · Last updated
What this tool is used for
- Producing an INI config for a legacy tool from a YAML source.
- Flattening nested mappings into dotted section headers.
- Converting settings for software that predates YAML.
- Comparing a YAML config against an INI one in the same shape.
- Migrating configuration during a downgrade.
Frequently Asked Questions
- How does nested YAML fit into INI?
- Badly beyond one level, which is the fundamental constraint. INI has sections and keys and no deeper nesting, so a two-level YAML tree maps cleanly and a three-level one has to be flattened into dotted key names or lost.
- Is there a specification for INI?
- No, and that is the practical difficulty. Comment characters, whether `;` or `#`, duplicate-key behaviour, quoting rules and whether values may span lines all differ between Windows APIs, Python's configparser, PHP and Git's own dialect.
- What happens to lists?
- There is no list type, so they become a delimited string or repeated keys — and which one your consumer accepts is not knowable from the format. Repeated keys are silently overwritten by most parsers, which makes the delimiter approach safer if uglier.
- Are values typed?
- No. Everything is a string, so a YAML boolean `false` becomes the five characters `false`, and the reading application decides what that means. That is the same trap as environment variables, and it produces the same class of bug.
- Why does INI persist?
- Because it is trivially readable and editable by hand, and enormous amounts of software already parse it — Git config, PHP, desktop applications, systemd units in a variant form. It survives on ubiquity rather than on capability.
Common errors and gotchas
- Flattening deeper than INI's single section level, which needs a convention the reader must share.
- Losing types YAML inferred, since INI values are all strings.
- Emitting a dotted section header a parser reads as one literal name rather than a hierarchy.
- Relying on section nesting, which INI has no standard notion of at all.
- Flattening lists into repeated keys, which parsers handle inconsistently.