CSV input

or drop a file here, or paste code below
CSV input

XML output

XML output

Files never leave your browserHow?

Paste CSV or open a file and get well-formed XML: every row becomes an element, every column a child element or an attribute. Nothing is uploaded.

How it works

  1. Open or paste CSV

    Drop a .csv or .tsv file, use Open from URL, paste the data or load the sample. The delimiter and encoding are detected automatically.

  2. Name the elements

    Set the root element and the row element, and choose whether columns become child elements or attributes.

  3. Download or copy

    The XML updates on every change. Download the .xml file, copy it or open it in the XML Viewer.

Features

  • Reads real-world CSV

    Comma, semicolon, tab and pipe delimiters are detected; quoted fields with commas, quotes and line breaks are handled. Turn off First row is the header for files without one.

  • Encodings

    UTF-8, UTF-8 with BOM and UTF-16 are recognized, and old Excel exports in Windows-1252 are detected. You can also pick the encoding yourself.

  • Custom tags and attributes

    Choose the names of the root and row elements and write each column as <name>value</name> or as name="value".

  • Valid XML names

    Headers with spaces or leading digits, such as first name or 2nd, are turned into valid element names (first_name, _2nd), and the changes are listed.

  • Output settings

    XML declaration on or off, 2 or 4 spaces, tabs or no indentation, and empty cells as empty elements or xsi:nil="true". The result is checked for well-formedness.

  • Large files

    Big CSV files are streamed row by row in a background worker. XML → CSV converts the result back.

Limits & privacy

Files can be up to 100 MB, also after decompressing a .gz file. Files above 5 MB are converted from the file without loading them into the editor; the table preview shows the first 500 rows.

The output is generic XML; mapping to a specific schema (XSD) is not supported. Values are written as text and special characters are escaped. See the privacy page.

FAQ

How do I convert CSV to XML?

Paste the CSV or open the file. Each row becomes a <row> element inside <rows>; rename them if you like and press Download .XML.

Can columns become XML attributes?

Yes. Set Columns as to attributes to get <row id="1" name="Ann"/> instead of child elements.

What happens with column names that are not valid XML?

Invalid characters become underscores and names that start with a digit get a leading underscore. The tool lists every renamed column.

My CSV uses semicolons. Does that work?

Yes. The delimiter is detected automatically, or choose comma, semicolon, tab or pipe yourself.

Is this CSV to XML converter free?

Yes, free and without sign-up, on desktop and mobile.

Is my data uploaded?

No. The CSV is parsed and converted in your browser and never leaves your device.

Related tools