DevTools Logo

XML to CSV Converter

XML to CSV Converter

Pick the repeating element and flatten its fields into a spreadsheet-ready CSV.

Runs in your browser
Try an example

XML input

CSV output

Paste XML to extract rows

Choose a repeating element when the auto-detected row path is not right.

Paste an XML feed and choose which element repeats. The tool flattens attributes and leaf children into CSV columns, handles repeated siblings and nested paths, and exports RFC 4180 CSV right in your browser.

Product feed

XML: <catalog><product sku="A1"><name>Café</name><price currency="USD">12.50</price></product></catalog>
CSV: @sku,name,price.@currency,price
A1,Café,USD,12.50

Pick /catalog/product as the row path; attributes get an @ prefix and child attributes become dot paths.

Repeated tags

XML: <row><tag>new</tag><tag>sale</tag></row>
CSV: tag_1,tag_2
new,sale

Sibling elements with the same name become numbered columns, up to 20 per name.

Examples

Product feed

Input
XML: <catalog><product sku="A1"><name>Café</name><price currency="USD">12.50</price></product></catalog>
CSV: @sku,name,price.@currency,price
A1,Café,USD,12.50

Pick /catalog/product as the row path; attributes get an @ prefix and child attributes become dot paths.

Repeated tags

Input
XML: <row><tag>new</tag><tag>sale</tag></row>
CSV: tag_1,tag_2
new,sale

Sibling elements with the same name become numbered columns, up to 20 per name.

About this tool

Paste an XML feed and choose which element repeats. The tool flattens attributes and leaf children into CSV columns, handles repeated siblings and nested paths, and exports RFC 4180 CSV right in your browser.

What this tool does not do

  • Processes only the inputs provided in this session without connecting to external accounts or background servers.
  • Runs entirely in the current browser tab; nothing is synced across devices or backed up to a server.

How to use this tool

  1. Paste XML or upload .xml

    Load your XML feed, catalog, or export document.

  2. Select repeating row path

    Pick the repeating element path and toggle attribute/namespace options.

  3. Download flattened CSV

    Verify union column headers and download RFC 4180 CSV.

Use cases

Product feed

Pick /catalog/product as the row path; attributes get an @ prefix and child attributes become dot paths.

Repeated tags

Sibling elements with the same name become numbered columns, up to 20 per name.

Common mistakes

Mistake:How are XML attributes and nested child elements mapped to columns?

Fix:Attributes map with an @ prefix (such as @id) and nested child elements flatten with dot/path headers across the union of all columns found in the row set.

Mistake:What if my XML uses namespace prefixes like soap: or atom:?

Fix:Toggle namespace-prefix stripping to produce clean column headers without losing element hierarchy.

Frequently asked questions

How does the converter decide which XML tag becomes a CSV row?

It detects repeating sibling element paths automatically and lets you pick the exact row path (for example /catalog/product or /rss/channel/item).

How are XML attributes and nested child elements mapped to columns?

Attributes map with an @ prefix (such as @id) and nested child elements flatten with dot/path headers across the union of all columns found in the row set.

What if my XML uses namespace prefixes like soap: or atom:?

Toggle namespace-prefix stripping to produce clean column headers without losing element hierarchy.

Are XML feeds or exports uploaded anywhere?

No. Parsing and CSV serialization run locally in your browser.