CSV to XML Converter


CSV to XML Converter is used to convert CSV data or file into XML. You can choose whether to write the values as XML attributes or as text inside the record elements. The XML elements generated can also be named as per your choice.



Input: Paste CSV content below



Settings

Output: Converted XML


CSV is an old & very popular format for storing tabular data. It has been used in the desktop as well as mainframe. It is a simple & compact format that works really well for tabular data and so is still in use today.

XML is a widely used language that was once the de facto standard for data interchange between applications. Since the advent of JSON, however, it has lost the advantage to the more simple nature of JSON. Nevertheless, XML is still used by applications and SOAP based web services

Root Element Name
This is the name of the root element of the output XML under which the record/row nodes are created.
Root Element: People
<?xml version="1.0" encoding="utf-8"?>
<People>
  <Record Name="John Doe" Age="69" />
  <Record Name="Jane Doe" Age="65" />
</People>
Root Element: Root
<?xml version="1.0" encoding="utf-8"?>
<Root>
  <Record Name="John Doe" Age="69" />
  <Record Name="Jane Doe" Age="65" />
</Root>
Record Element Name
This is the name of all the record/row elements created in the output XML.
Record Element: Person
<?xml version="1.0" encoding="utf-8"?>
<Root>
  <Person Name="John Doe" Age="69" />
  <Person Name="Jane Doe" Age="65" />
</Root>
Record Element: Record
<?xml version="1.0" encoding="utf-8"?>
<Root>
  <Record Name="John Doe" Age="69" />
  <Record Name="Jane Doe" Age="65" />
</Root>
Indent
This setting governs whether or not the output is indented. The indented output is easier for humans to comprehend. On the other hand, a non-indented output is compact & smaller in size (best for transmission).
Indentation On
<?xml version="1.0" encoding="utf-8"?>
<Root>
  <Record Name="John Doe" Age="69" />
  <Record Name="Jane Doe" Age="65" />
</Root>
Indentation Off
<?xml version="1.0" encoding="utf-8" ?><Root><Record Name="John Doe" Age="69" /><Record Name="Jane Doe" Age="65" /></Root>
Attribute Values
This setting governs how the values are written in the output XML. When turned on, the values are written as XML attributes of the record elements. When turned off, the values are written as text nodes inside the record elements.
Attribute Values On
<?xml version="1.0" encoding="utf-8"?>
<People>
  <Person Name="John Doe" Age="69" />
  <Person Name="Jane Doe" Age="65" />
</People>
Attribute Values Off
<?xml version="1.0" encoding="utf-8"?>
<People>
  <Person>
    <Name>John Doe</Name>
    <Age>69</Age>
  </Person>
  <Person>
    <Name>Jane Doe</Name>
    <Age>65</Age>
  </Person>
</People>
Feedback