INI to XML Converter
Paste an INI file and get XML: each section becomes an element, each key a child element with the value as its text. For moving old settings into software that reads XML.
Runs entirely in your browser — nothing you enter here is sent to a server.
From flat settings to an XML tree
INI and XML come from the same era and solve the same problem at opposite levels of formality. INI is a flat list of settings with one level of grouping. XML is a tree with a single root, where every value sits inside a named element. Converting one to the other is a matter of supplying the structure that INI leaves implicit.
One root element
XML needs exactly one top-level element, so the whole file is wrapped in a root — config by default; name it whatever the target expects.
Sections become elements
[smtp] turns into <smtp>…</smtp>, with its keys as children. Keys outside any section become direct children of the root.
Lists repeat
A key given several times, or written key[], becomes several elements with the same name.
Safe names and text
Keys with characters that are not allowed in XML names are adjusted with underscores, and & or < in values are escaped.
Where this is useful
Mostly in migrations: a .NET application that used to read an INI file and now expects app.config-style XML, a Java service configured through XML, an installer or deployment tool that takes its parameters as an XML document. The converter gives you a correct, well-formed skeleton in seconds. Values are kept as text exactly as written — XML has no types — and comments are dropped; anything worth keeping can be added back as an XML comment.
Frequently asked questions
How are INI sections represented in XML?
Each section becomes an element named after the section, containing one child element per key. A dotted section name such as [a.b] becomes nested elements.
Can keys become attributes instead of elements?
Not in this converter. Convert the INI to JSON, prefix the keys you want as attributes with @, and use the JSON to XML converter.
What is the root element for?
An XML document must have exactly one top-level element. Since an INI file has many top-level sections, they are wrapped in a root whose name you can set.
Are INI comments kept?
No. Comment lines are skipped during parsing.