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):

Auto run on

CSV to XML

convert CSV to XML

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:

<?xml version="1.0" encoding="UTF-8"?>
<!-- File created by Easy Data Transform v1.6.0 at 2020-06-16 12:52:09. -->
<root>
  <record>
    <CustomerID>ALFKI</CustomerID>
    <CompanyName>Alfreds Futterkiste</CompanyName>
    <ContactName>Maria Anders</ContactName>
  </record>
  <record>
    <CustomerID>ANATR</CustomerID>
    <CompanyName>Ana Trujillo Emparedados y helados</CompanyName>
    <ContactName>Ana Trujillo</ContactName>
  </record>
  <record>
    <CustomerID>ANTON</CustomerID>
    <CompanyName>Antonio Moreno Taquería</CompanyName>
    <ContactName>Antonio Moreno</ContactName>
  </record>
</root>


To output values as XML attributes or nested nodes see the XML documentation.

If you have a 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 66 transforms (such as join, filter and dedupe) to quickly and easily create complex data transformations.

CSV to HTML converter

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?

Email support@easydatatransform.com