CSV to XML

Convert CSV to XML online. Each row becomes a <row> element, in your browser.

Suggested tools

XML to CSV

Turn list-style XML into a CSV table, one row per record.

XMLCSV
Open Tool

YAML to CSV

Convert a YAML list into CSV.

YAMLCSV
Open Tool

CSV to YAML

Convert CSV into YAML.

CSVYAML
Open Tool

CSV to HTML

Convert CSV into an HTML table.

CSVHTML
Open Tool

CSV Escape / Unescape

Quote a value correctly for CSV, or unwrap a quoted CSV field.

CSV
Open Tool

JSON to XML

Convert JSON into well-formed XML.

JSONXML
Open Tool

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

  1. Paste CSV with a header row, upload a .csv file or click Sample.
  2. Press Convert.
  3. 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.

Input
name,city
Asha,Surat
Ravi,Rajkot
Output
<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.