How to convert XML to CSV

XML and CSV formats are both widely used for storing and exchanging data, but have very different structures. XML is markup text structured in the form of a tree and CSV is escaped text structured as a table. However you can easily convert XML to CSV format with Easy Data Transform:

Auto run on


convert XML to CSV

XML to CSV converter

Example XML input:

<?xml version="1.0" encoding="UTF-8"?>

Example CSV output:


The dot (‘.’) character is used to show nesting of XML values and XML attribute values start with an underscore (‘_’). For example:

<?xml version="1.0" encoding="UTF-8"?>
  <record carb="2" cholesterol="5" fiber="0" 
          name="Avocado Dip" protein="1" sodium="210">

Will be ‘flattened’ into CSV as:

2,5,0,Avocado Dip,1,210,0,0,0,0

You can use a Rename Cols transform if you want to rename any of the columns before output.

If you have a large number of files to convert you can do it using batch processing.

As well as changing file format, Easy Data Transform also allows you to combine 66 transforms (such as merge, dedupe and filter) to quickly and easily create simple or complex data transformations.


Try it free now!

Windows Logo Windows Download

v1.46.5 for Windows 11 / 10 / 8 / 7 (47 MB)
Zip file version

Apple Logo Mac Download

v1.46.5 for Mac 14.x to 10.13 (79 MB)

No commitments.
You can uninstall any time.
You don't even have to give us your email address.

Questions or problems?