Turn a list into valid XML
This is a simple one-level XML builder: the input is a list of values, the output is a parent element containing one child per list item. It is built for the common case where you have a bunch of strings and you need to drop them into an XML-consuming API, config file, or data export, not for crafting nested documents with attributes.
Every character that has a special meaning in XML element content - `&`, `<`, and `>` - is escaped to `&`, `<`, and `>` so the result parses cleanly in any standards-compliant XML reader. Blank lines are skipped so trailing whitespace in the input never produces empty tags. Two-space indentation is fixed so the output diffs cleanly in version control.
Tag names you type are used as-is. XML requires names to start with a letter or underscore and contain only letters, digits, hyphens, underscores, or periods - if you type something that violates those rules (spaces, `<`, slashes), the output will still be generated but most parsers will reject it. There is no attribute support in this tool; values go in text content only.
How to use convert a list to xml
- 1Paste your list into the input panel, one value per line
- 2Set the Item tag - the element name wrapping each value (defaults to <item>)
- 3Set the Wrapper tag - the single parent element wrapping all the items (defaults to <list>)
- 4The output updates live as you type; blank lines are skipped and & < > are escaped for you
- 5Copy the XML or download it as an .xml file from the output panel
Keyboard shortcuts
Drive ListShift without touching the mouse.
What this tool actually does
Fixed behaviors to know before you rely on the output.
One item per line, one element per item
Each non-blank line becomes exactly one element. There is no nesting, no grouping, and no attribute support - this is a flat builder by design. If you need nested documents, generate the inner fragment here and paste it into your larger template.
Automatic XML entity escaping
The three characters that break element text in XML - `&`, `<`, `>` - are converted to their entity forms (`&`, `<`, `>`) on every line. You can paste content that contains HTML tags or ampersands and the output will still parse as valid XML.
Blank input lines are dropped
Empty lines and whitespace-only lines are filtered out before generation. That means the output never contains empty elements like `<item></item>` just because a line in your input happened to be blank. If you need empty placeholders, put a real value there (even a single space still has to be trimmed - currently it is dropped too).
Custom item and wrapper tags
Type any tag name into the Item tag or Wrapper tag fields - `user`, `product`, `row`, `entry`, `emails`, `catalog`, whatever your consuming system expects. The tool uses the name exactly as typed; make sure it is a valid XML name (starts with a letter or underscore, no spaces or slashes).
Fixed two-space indentation
Every child element is indented with two spaces relative to the wrapper, producing a consistent and diffable layout. There is no tab or four-space variant - this keeps output predictable across any editor without needing an indentation option.
Worked example
Blank lines dropped, `&` and `<lead>` escaped automatically.
Alice & Bob <lead> Carol
<list> <item>Alice & Bob</item> <item><lead></item> <item>Carol</item> </list>
Settings reference
Two options. Everything else - escaping, blank-line skipping, indentation - is fixed.
| Setting | What it does | Effect on the sample |
|---|---|---|
| Item tag: item | The element name used for each non-blank input line | Each value is wrapped in <item>…</item> |
| Wrapper tag: list | The single parent element that contains all the items | All items are nested inside a single <list>…</list> |
| Escaping (automatic) | Every `&`, `<`, and `>` in a value is replaced with `&`, `<`, `>` | `Alice & Bob` becomes `Alice & Bob`; `<lead>` becomes `<lead>` |
| Blank lines (automatic) | Empty and whitespace-only lines are dropped before elements are emitted | The trailing blank line in the sample produces no `<item></item>` |