Dad’s Data formats tools

CSV → XML Converter

Convert CSV to XML locally. Each row becomes a child element; column headers become tag names.

CSV Input
XML Output

XML output will appear here.

Paste, upload, or drop a file in the input panel to get started.

Output structure

The converter wraps all rows in a <root> element. Each row becomes an <item> element, and each column value becomes a child element named after the column header. All values are text content.

Input
id,name,city
1,Alice,Paris
2,Bob,London
Output
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <item>
    <id>1</id>
    <name>Alice</name>
    <city>Paris</city>
  </item>
  <item>
    <id>2</id>
    <name>Bob</name>
    <city>London</city>
  </item>
</root>

Column header requirements

Warning: Column headers must be valid XML element names. Names cannot start with a digit or contain spaces. Rename headers like first name to first_name before converting, or use the CSV Formatter to clean them up.
Invalid headerValid alternative
first namefirst_name
123idid_123
email-addressemail_address
typeitem_type (reserved in some XML dialects)

Frequently Asked Questions

Your files stay on your computer. Dad promised.

Data formats tools

Search the Data formats tools