Skip to content
toolgrid

No tool found. Try another word.

CSV to XML Converter

Convert CSV to XML: every row becomes an element with a child element per column. Choose the names of the root and row elements.

Runs in your browser. What you enter is kept for 30 days to improve Toolgrid, then deleted.

How to use the CSV to XML Converter

  1. 1 Paste the CSV or open the file.
  2. 2 Choose the names of the root element and the row element.
  3. 3 Copy or download the XML.

About the CSV to XML Converter

Many older systems, feeds and configuration tools expect XML rather than CSV. The converter writes every CSV row as an element (such as <row>) inside a root element (such as <rows>), with one child element per column and the value as its text.

Column names become valid XML element names: spaces and other characters become underscores, and names that start with a digit or with "xml" get an underscore in front. Duplicate names get a suffix. The characters & < > " and ' in values are escaped, so the result is always well-formed.

Empty values become empty elements such as <price/>. The output is indented with two spaces and starts with an XML declaration (UTF-8).

Frequently asked questions

Can the values become attributes instead of elements?

Not yet: every value becomes a child element, the most common and readable layout.

What happens to spaces in column names?

They become underscores, because XML element names cannot contain spaces: "first name" becomes first_name.

How are special characters handled?

& < > " and ' are written as &amp; &lt; &gt; &quot; and &apos;, so the XML stays valid.

How do I convert XML back to CSV?

Use the XML to CSV converter.