XML to CSV Converter
Convert XML with repeated sibling elements to CSV - flattens each repeated element into a CSV row.
Paste or upload XML data below - this tool finds repeated sibling elements (your records) and flattens them into CSV rows.
More File & Data Conversion Tools
View all 20XML's nested, attribute-based structure doesn't map perfectly onto CSV's flat rows-and-columns model - see the limitations below for what happens with deeply nested or irregular XML.
How the Conversion Works
This tool looks for a repeated element pattern (e.g. multiple <item> elements under a parent) and treats each occurrence as one CSV row, with that element's direct children (and attributes) becoming columns.
How to Use It
- Paste or upload XML data.
- Click Convert - the tool auto-detects the repeating record element.
- Review the resulting CSV, then copy or download it.
Limitations
XML supports deeply nested structures and mixed content that CSV's flat model can't represent directly - deeply nested child elements are flattened into a JSON-string cell value rather than silently dropped, and irregular/inconsistent record structures may produce uneven columns.
Example
<products>
<product id="A-100"><name>Blue Mug</name><price>249</price></product>
<product id="B-200"><name>Travel Bottle</name><price>599</price></product>
</products>
The repeated <product> element is detected as the record, and the result is one row per product. Child elements become columns, and attributes become columns prefixed with @, so you can tell them apart:
@id,name,price
A-100,Blue Mug,249
B-200,Travel Bottle,599
Common Uses
- Opening a product feed, RSS feed or sitemap in a spreadsheet.
- Analysing XML exports from accounting, ERP or e-commerce systems.
- Preparing XML data for tools that only import CSV.
Tips
- Records should share the same structure; optional elements leave empty cells, which is fine.
- If the XML wraps records in several layers, paste just the part that contains the repeated elements.
- Check the column order before importing the CSV elsewhere.
Need nested data kept intact? Use XML to JSON. To go the other way, use CSV to XML.
Frequently Asked Questions
Explore More Tools
Keep going with related categories and our most used tools.