XML to CSV Converter

XML to CSV Converter

Updated August 20, 2026

Convert XML to CSV online. Turn XML lists into a spreadsheet table you can open in Excel. Free XML to CSV converter.

XML

0 lines · 0 chars

Loading editor...

CSV

Features

  • Flatten repeating child elements of the root into CSV rows
  • Attributes become @column headers
  • Nested children become path-like headers (parent/child)
  • Proper CSV quoting for commas and quotes
  • Download a .csv the spreadsheet can open
  • Client-side only

Common Use Cases

  • Export an XML product catalog to Excel
  • Turn a list of <record> elements into a table
  • Give a non-developer a spreadsheet from an XML dump
  • Compare XML lists in a CSV diff tool
  • Feed repeating XML records into a data tool that wants CSV

Which nodes become rows

CSV is a table. XML is a tree. We look at the children of the root, pick the most common tag name as the row type, and flatten each of those elements. Nested tags become slash paths. That works well for catalogs, RSS item lists, and “array of records” documents.

A deeply irregular tree (every child a different shape) will produce sparse columns. If the records are not siblings of the root, wrap them or use XPath to extract first.

Examples

Valid - Catalog of books
<c><b id="1"><t>A</t></b><b id="2"><t>B</t></b></c>
Valid - Single record still works
<c><b id="1"><t>A</t></b></c>
Invalid - Empty root
<c/>

Frequently Asked Questions

Why are some columns empty?

Not every record had that child. CSV still needs a column because another row did.

Can I choose a different row element?

This version uses the most common child of the root. Restructure the XML or use XPath if your rows live deeper.

Tips

  • Put the repeating records directly under the root for the cleanest table.
  • Excel may need a UTF-8 BOM for non-ASCII. This download is UTF-8 without BOM.