Skip to content

CSV to XML Converter

Drop a CSV and its XML appears at once, one element per row, ready to copy or download as .xml.

Processed on your device. Nothing is uploadedHow to check

Try a sample file:

You can also paste CSV or JSON text with Ctrl+V (⌘+V on a Mac).

Paste text instead

Pasted text stays in this tab and is never sent anywhere.

Turn a CSV export into XML for a system that only imports XML, a feed or a config file. Choose, drop or paste a CSV or TSV file and the XML is written at once: a root element holding one row element per line, with a child element per column named after its header. You can rename the root and row elements. Header names with spaces or symbols are turned into valid element names, and <, > and & in your data are escaped. The delimiter and encoding, Arabic Windows-1256 included, are detected for you, and the file is read in your browser, never uploaded.

Why use CSV to XML

  • Private

    Your CSV is turned into XML by your own browser and never sent to a server, so nobody else sees your data.

  • Valid XML every time

    Header names become legal element names and special characters are escaped, so the file parses in any XML reader.

  • Works offline

    Once this page has loaded, it keeps working without an internet connection.

How it works: convert CSV to XML

  1. Add your CSV

    Choose or drop a .csv or .tsv file, paste CSV text into the box, or try a sample.

  2. Name the elements

    Keep <rows> and <row> or type the names your importer expects; the XML updates as you type.

  3. Copy or download

    Copy the XML to your clipboard or download it as a .xml file with the CSV's name.

What the CSV to XML converter handles

  • Files: .csv and .tsv, or CSV text you paste; comma, semicolon, tab and pipe delimiters detected.
  • Encodings: UTF-8, UTF-16 (when the file starts with a byte order mark), Windows-1256 Arabic and Windows-1252 Western European text, written out as UTF-8 XML.
  • Shape: <rows><row><column>value</column></row></rows>, with root and row names you choose.
  • Headers such as "Order ID" or "2024 total" turned into valid element names.
  • Escaping: <, > and & in cells written as &lt;, &gt; and &amp;.
  • Quoted fields with commas or line breaks inside, as Excel and Google Sheets export them.

CSV to XML: what it can't do

  • Every value is written as text; the XML has no types, attributes or schema.
  • The preview shows the first 5,000 lines; Copy and Download always take the whole file.

CSV to XML: questions and answers

Is my file uploaded?
No. The CSV is read and written as XML by your browser, on your device. Pasted text stays in this tab and is never sent anywhere.
What does the XML look like?
A root element (rows by default) with one row element per CSV line; inside each row, one element per column named after its header, holding the cell's value.
What happens to headers with spaces or symbols?
XML element names cannot contain spaces or start with a digit, so such headers are turned into valid names. The values under them are unchanged.
Can I choose the element names?
Yes. Type a root name and a row name, for example products and product, and the XML is rewritten at once.
Are numbers written as numbers?
XML has no number type of its own, so every value is written as text. A schema or the importing program decides how to read it.
Does it work with large files?
Yes, though very large files can take a few seconds. The preview shows the first 5,000 lines; Copy and Download always take the whole XML.
How do I convert a CSV file to XML?
Open or paste the CSV, type the root and row element names your importer expects, then copy the XML or download it as a .xml file. OpenAnyDoc writes the XML in your browser, so the file is never uploaded.

Why it's private: your files never leave your browser

Most online viewers upload your file to a server, so a copy of it leaves your device. OpenAnyDoc works the other way round: your browser reads the file and draws it on your screen. Nothing is uploaded, there is no account, and the file is gone from memory when you close the tab, so there is nothing for us to store, see or lose.

How we tell you about new features

Announcements are based on the release date shown to everyone, and nothing is stored on your device or sent anywhere.