curly{bits}

curlybits / XML to CSV

XML to CSV Converter

Paste XML or open an .xml file and get a CSV you can open in Excel or Google Sheets. The converter finds the element that repeats (like every <item> or <product>), makes one row for each, and turns its child elements and attributes into columns.

Input XML
CSV output

      

How to use the XML to CSV Converter

  1. Paste XML into the left box, open an .xml file, or click Load sample.
  2. The CSV appears on the right: one row per repeated element.
  3. Choose the Delimiter: semicolon suits Excel in many European languages.
  4. Click Download to save a .csv file, or Copy.

How the rows and columns are chosen

<menu>
  <item id="1" spicy="true"><name>Pad Thai</name><price>120</price></item>
  <item id="2"><name>Mango Sticky Rice</name><price>90</price></item>
</menu>

becomes

id,spicy,name,price
1,true,Pad Thai,120
2,,Mango Sticky Rice,90
  • Rows: the longest list of repeated elements anywhere in the file, so wrappers like <response><data> don't matter.
  • Columns: attributes and child elements. Deeper elements get dotted names such as address.city.
  • Missing values are left empty; repeated children inside a row are joined into one cell.

Need a real Excel file with several sheets? Convert to JSON with XML to JSON, then use JSON to Excel.

Frequently asked questions

Is my XML uploaded?

No. It's parsed by your browser's own XML parser.

Why did it pick the wrong element for rows?

It chooses the element that repeats the most. If your file has two kinds of lists, convert it to JSON first and pick the list you need.

Can I open the CSV in Excel?

Yes. If accents or Thai text look wrong, use Excel's Data → From Text/CSV and choose UTF-8, or convert to .xlsx instead.

Updated

Add this XML to CSV converter to your website

Free for blogs, schools and businesses. Copy the code below and paste it into your page's HTML. The tool works exactly like this one and runs in your visitors' browsers, so nothing is uploaded. Please keep the credit line so others can find it too.

Preview embed ↗