How to convert CSV to XML

CSV and XML are both widely used formats for storing and exchanging data. They are quite different in structure, but you can easily convert CSV to XML with Easy Data Transform (including ‘escaping’ special characters):

CSV to XML

convert CSV to XML

CSV to XML converter

CSV to XML converter

Example CSV input:

CustomerID,CompanyName,ContactName ALFKI,Alfreds Futterkiste,Maria Anders ANATR,Ana Trujillo Emparedados y helados,Ana Trujillo ANTON,Antonio Moreno Taquería,Antonio Moreno

Example XML output with Values as set to Nodes:

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <record>
    <CategoryID>1</CategoryID>
    <CategoryName>Beverages</CategoryName>
    <In_stock>true</In_stock>
  </record>
  <record>
    <CategoryID>2</CategoryID>
    <CategoryName>Condiments</CategoryName>
    <In_stock>false</In_stock>
  </record>
  <record>
    <CategoryID>3</CategoryID>
    <CategoryName>Confections</CategoryName>
    <In_stock>true</In_stock>
  </record>
</root>


Example XML output with Values as set to Attributes:

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <record CategoryID="1" CategoryName="Beverages" In_stock="true" />
  <record CategoryID="2" CategoryName="Condiments" In_stock="false" />
  <record CategoryID="3" CategoryName="Confections" In_stock="true" />
</root>


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

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

Try it free now!

Windows Logo Windows Download

v1.5.0 for Windows 10 / 8 / 7 (25 MB)

Apple Logo Mac Download

v1.5.0 for Mac 10.15 to 10.12 (22 MB)


Questions or problems?

Email support@easydatatransform.com


Do you have a question?
We would love to help.

This pop-up will not be shown again