Skip to content
migration.tools
CSV to XML

CSV to XML converter

Turn rows of CSV into XML records. Name the root and row elements to match the schema your importer, feed validator or legacy system expects.

Going the other way? XML to CSV

Options
Used when the input is a list.

CSV

XML

The result appears here as soon as there is input.

Processed on this device. Nothing you paste or drop is uploaded.

How to use it

  1. 1Paste your CSV or drop a file onto the input panel.
  2. 2Adjust the options — the result updates as you type.
  3. 3Copy the XML or download it. Drop several files to convert a batch into one ZIP.

How CSV becomes XML

Every row in the CSV input becomes one record in the XML output, and the header row supplies the field names. Column order is preserved.

Cells are typed where the meaning is unambiguous: 42 and 3.14 become numbers, true and false become booleans, and an empty cell becomes null. Anything that only looks numeric — 00501, +44 20 7946 0958, a 19-digit order ID — stays a string, because turning it into a number would corrupt it.

CSV and XML, briefly

CSV is the lowest common denominator for tabular data: every spreadsheet, database and import wizard reads it. It has no types and no nesting, and details such as the delimiter, quoting and encoding vary between programs.

XML describes documents with nested elements and attributes. It still runs enterprise integrations, SOAP services, product feeds, sitemaps and many government and banking formats.

Questions

Which CSV dialects are supported?

Comma, semicolon, tab and pipe delimiters are detected automatically. Quoted fields, escaped quotes (""), line breaks inside quotes and a UTF-8 byte-order mark are all handled. If your file has no header row, switch that option off and columns are named column_1, column_2, and so on.

What do the element names look like?

Each field becomes an element named after its key. Characters that aren't legal in XML names are replaced with underscores, keys starting with @ are written as attributes, and you choose the names of the root and row elements.