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

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 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. See our quick start guide for more details.

CSV to HTML converter

Try it free now!

Windows Logo Windows Download

v1.6.5 for Windows 10 / 8 / 7 (48 MB)

Apple Logo Mac Download

v1.6.5 for Mac 10.15 to 10.12 (23 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