Kadben

Convert XML to CSV

Choose an XML file or paste XML to get a CSV file with one row per record. Nested elements and attributes become columns with dotted names.

Runs in your browser. Nothing is uploaded.

XML to CSV

Input
Options

The result appears here.

How to use it

  1. Choose an XML file, drop it on the box, or paste XML; the result appears at once.
  2. Check “Rows from”: the tool picks the largest list of repeated elements. Choose another list if needed.
  3. Choose the delimiter that your spreadsheet program expects, and keep the UTF-8 BOM if you open the file in Excel.
  4. Download the .csv file or copy the result.

Rules and limits

XML and JSON mapping

The array rule: nested data in columns

How CSV is written

Questions and answers

Why are numbers in the CSV not converted?

XML has no data types, so the page cannot know whether 01067 is a number or a postcode. Values are written as they appear; the program that opens the CSV decides.

What if the wrong elements became rows?

Pick another list under “Rows from”. The first guess is the largest list of repeated elements. Elements that repeat inside each record, such as the <item> elements of an order, are not offered as rows: they become numbered columns.

Why are there columns such as item.0.@sku and item.1.@sku?

An element that repeats inside one record gets numbered columns, so that each record stays on one row.

What if Excel shows the whole CSV in one column?

Excel splits CSV files by the list separator of your region settings. Choose the other delimiter, a comma or a semicolon, and download the file again.

Related tools