How to use
- XML → CSV: paste XML or drop an
.xmlfile. A sample RSS feed is preloaded so you can see a result right away. - Pick the repeating element that should become one row each. The most repeated path comes first (for example
/rss/channel/item). - Choose how deep to flatten, how to handle names that repeat, and whether to strip namespace prefixes.
- Untick columns you do not need and reorder the rest with the arrows. Check the preview (first 100 rows).
- Click Save CSV, Save XLSX, or Open in workbench to keep cleaning the table.
- CSV → XML: switch the direction, paste CSV, and set the root and row names, which columns become attributes, and the indent.
Options
| Option | What it does |
|---|---|
| Repeating element | Each element at the chosen path becomes one row. Up to 5 candidates, ranked by how often the same name repeats under one parent |
| Flatten depth | 1 = children only, 2 = grandchildren too (author/name), 3 = great-grandchildren. Anything below the limit is joined into one cell as text |
| Split columns | A name that appears several times in a record becomes category[1], category[2]. If it repeats in any record, every row uses the same format |
| Join in one cell | Joins the values with ; into a single category column |
| Remove namespaces | dc:creator → creator |
| Write as attributes | In CSV → XML, ticked columns become attributes like <row id="1">; the rest become child elements |
Why repeating elements become rows
XML is a tree and CSV is a flat table, so you have to decide which element counts as “one line”. Elements that repeat with the same shape (<item>, <book>, <row>) are usually one record each, so the tool makes them rows and spreads attributes (@id) and child elements into columns.
Government open-data API responses are the classic case. In the response below, /response/body/items/item is detected first and gives 2 rows.
<response><header><resultCode>00</resultCode></header>
<body><items>
<item id="1"><name>A</name><addr><city>Seoul</city><zip>04524</zip></addr></item>
<item id="2"><name>B & C</name><addr><city>Busan</city></addr></item>
</items><total>2</total></body></response>
| @id | name | addr/city | addr/zip |
|---|---|---|---|
| 1 | A | Seoul | 04524 |
| 2 | B & C | Busan | (empty) |
With depth 1, addr becomes a single column holding the text, Seoul 04524 and Busan.
Good to know
- Deep structures do not fit a flat table perfectly. If a repeating element contains another repeating list (order lines inside an order), you get extra columns (
item[1], …) or one joined cell. To get the inner list as rows, choose the inner path and convert again. - Columns are created in the order they first appear. A value missing from a row is an empty cell.
- The parser does not process DTDs or external entities, so XXE attacks that try to pull in files or URLs have nothing to work with. Only the basic entities (
<,&, …), numeric references and CDATA are decoded. - Values starting with
=or@could be run as formulas by Excel, so the CSV download prefixes them with'. - In CSV → XML, column names are adjusted to XML naming rules: spaces and symbols become
_, and a leading digit gets a_in front (1st col→_1st_col). Non-Latin names such as Korean are kept. - Input up to 5 MB is supported.
Related tools: Excel & CSV Workbench, JSON to CSV Converter, XML Formatter, HTML Table to CSV
Your text and files are processed only in this browser and are never sent to a server.