Kadben

Convert CSV to XML

Choose a CSV file or paste CSV to get XML with one element per row and one child element per column. The delimiter is detected, and values stay exactly as written.

Runs in your browser. Nothing is uploaded.

CSV to XML

Input
Options

The result appears here.

How to use it

  1. Choose a CSV or TSV file, drop it on the box, or paste the text; the result appears at once.
  2. Check the delimiter and the header option; the notes next to the result show what was detected.
  3. Set the names of the root and row elements, and turn on “Nest dotted headers” if you want nested XML.
  4. Download the .xml file or copy the result.

Rules and limits

How CSV is read

From CSV to XML

Questions and answers

Why are numbers written as plain text?

XML has no number type: every value is text, so the page writes it exactly as it is in the CSV, with its zeros, signs and separators.

Why do some element names differ from my headers?

XML names cannot contain spaces and some other characters, so they become “_”. Rename the headers in the CSV file to choose the names yourself.

What if my CSV has no header row?

Turn off “First row is a header”: the elements are then named column_1, column_2 and so on. Rename them later, or add a header row to the file.

Why does a row get extra elements named column_N?

That row has more fields than the header, often because a value contains the delimiter but is not in quotes. Put such values in double quotes, or choose the right delimiter.

Related tools