CSV to XML
Convert CSV to XML online. Each row becomes a <row> element, in your browser.
Suggested tools
About CSV to XML
CSV to XML converts spreadsheet rows into well-formed XML: each row becomes a <row> element and each column a child element named after its header. It is useful for systems and feeds that only import XML.
Headers that are not valid XML names (for example "first name" or "1st") are made safe automatically, values are escaped, and comma, semicolon or tab separators are detected for you. Everything runs locally in your browser — the text you paste is never uploaded.
How to use CSV to XML
- Paste CSV with a header row, upload a .csv file or click Sample.
- Press Convert.
- Copy or download the XML.
Key features
- One <row> element per CSV row
- Header names become element names
- Invalid names made XML-safe
- Automatic delimiter detection
Example
Each CSV row becomes a <row> element named by the headers.
name,city Asha,Surat Ravi,Rajkot
<rows>
<row>
<name>Asha</name>
<city>Surat</city>
</row>
<row>
<name>Ravi</name>
<city>Rajkot</city>
</row>
</rows>When to use CSV to XML
- Importing spreadsheet data into a system that only accepts XML.
- Creating XML test data from a CSV.
- Converting simple exports into a structured format.
Tips and common problems
- Rename CSV headers to the element names you want before converting.
- Values with & or < are escaped automatically.
- Each row is wrapped in <row> inside a <rows> root element.
Frequently asked questions
Element names come from your header row. Rename the headers in the CSV to get the names you want.
Yes. Characters such as & and < are escaped so the XML stays valid.
Yes, with XML to CSV.