XML to CSV converter
Convert XML data into CSV rows with automatic column mapping
- Paste your XML data into the input field — must have a root element with repeating child elements
- The converter automatically detects repeating elements and maps them to CSV rows
- Attributes become columns with an @ prefix, nested children use dot notation
- Click "Convert to CSV" to generate the output
- Copy the CSV or download it as a .csv file for use in spreadsheets
XML input:
<?xml version="1.0" encoding="UTF-8"?>
<products>
<product id="p1">
<name>Widget</name>
<price>9.99</price>
</product>
<product id="p2">
<name>Gadget</name>
<price>14.99</price>
</product>
</products>CSV output:
"@id","product.name","product.price" "p1","Widget","9.99" "p2","Gadget","14.99"
What XML structures convert best to CSV?
XML with consistent repeating elements (like product listings, user records, or feed items) produces the cleanest CSV output.
How are XML attributes handled?
Attributes are included as separate columns with an @ prefix (e.g., @id, @type).
What about nested XML elements?
Nested child elements are flattened with dot-separated names (e.g., address.city) so they become distinct columns.
Can I convert large XML files?
Yes, but very large files may slow down your browser. For files over 5MB, consider using a desktop tool.
Does this handle XML namespaces?
Namespace prefixes are preserved in element and attribute names. Review the generated columns for namespace labels.