XML to CSV Converter

Paste XML or drop a .xml file. The repeating record element is found for you and each one becomes a row.

Drop your XML file here or click to choose a file — or paste your data below

How the records are found

  • The record element is detected. Whatever the file calls its rows — <item>, <record>, <product> — the most frequently repeated element becomes the row, so you do not have to describe the structure first.
  • Wrapper elements are seen through. A document that buries its list a few levels down under single wrapper tags is still read correctly.
  • Attributes become columns too. An id attribute on the record shows up as a column named @id, next to the child elements.
  • Entities are decoded. &amp;, &lt; and numeric entities such as &#233; are turned back into the characters they stand for.
  • Namespaces do not get in the way. A prefixed tag like <ns:name> is read as name.
  • Repeated child names are kept. Two <tag> children in the same record become two columns rather than one overwriting the other.

Is my file uploaded anywhere?

No. This page has no server side: the file is read and written back by JavaScript running on your own machine. You can check it by opening the page, disconnecting from the network, and converting a file anyway.

The equivalent in Excel

Excel can open an XML file directly, but for anything but the flattest document it asks you to create a schema first and then maps elements to columns in a way that is hard to predict. Data → Get Data → From File → From XML in Power Query gives more control at the cost of manual expansion, the same as for JSON.