XML to CSV Converter

Extract the repeated records from an XML document, such as items in a feed or rows in an export, into a CSV table.

Loading tool…

About the XML to CSV

The converter parses the XML, then looks for the list of records: it descends through single wrapper elements (<catalog>, <channel>) until it finds an element that repeats, such as <book> or <item>. Each occurrence becomes one CSV row.

Columns come from child elements and attributes. Attributes are prefixed with @ (@id), and nested elements are flattened with dots, so <price currency="USD">44.95</price> yields price.@currency and price.#text. Records that lack a field get an empty cell. Turn off flattening to keep nested structures as JSON in one cell.

The writer quotes fields that contain commas, quotes or line breaks per RFC 4180. Invalid XML is reported with the line where parsing failed. Nothing is uploaded.

Example: from an RSS feed, each <item> with <title>, <link> and <pubDate> becomes a row with those three columns. Numbers are written exactly as they appear in the XML; spreadsheets detect them when the CSV is opened.

How to use it

  1. Paste XML or open an .xml file.
  2. Check the columns in the output.
  3. Choose the output delimiter.
  4. Copy or download the CSV.

Frequently asked questions

Which element becomes a row?
The first element that repeats under its parent after skipping single wrapper elements. If there are none, the whole document becomes one row.
Why are there columns like price.#text?
The element has attributes and text. The text is stored as #text so both the attribute and the value are kept.
Can I convert an RSS feed?
Yes. rss → channel → item is found automatically and each item becomes a row; channel-level fields are skipped.

Related tools