Sign up free

CSV to XML Converter

Turn CSV or Excel rows into well-formed XML records with tag names you choose.

or drop files here

Accepts CSV, XLSX

Encrypted upload. Files are deleted automatically after 1 hour.

About CSV to XML

CSV to XML is for the moment a spreadsheet has to go into a system that only reads XML: a product feed for a marketplace, an import for an ERP or accounting package, test data for an XML-based service. Upload a CSV or an XLSX file, name the root and row elements, and every row becomes a record with one child element per column. To read XML records back into a sheet, XML to Excel does the reverse.

Column headers become the tag names. A header that isn't a valid XML name, such as Unit Price or 2024 Sales, is turned into a safe tag and the original text is kept in a name attribute, so nothing is lost. Characters like & and < are escaped, the file starts with a UTF-8 declaration, and records are indented for easy reading. From a workbook, the first sheet with data is used.

How to use CSV to XML

  1. 1
    Upload CSV or Excel

    Choose or drop a .csv or .xlsx file with column names in the first row.

  2. 2
    Name your elements

    Enter the Root element (default rows) and the Row element (default row) your target system expects.

  3. 3
    Click CSV to XML

    The XML is written on our server and shown in a box you can copy from.

  4. 4
    Download the .xml

    Save the file, which is named after your spreadsheet.

Why use Cubfile for this

  • Tags from your headers

    Each column name becomes an element, so a record reads like <row><sku>A-12</sku></row>.

  • Awkward headers handled

    Spaces and symbols are replaced, and the original header is kept in a name attribute.

  • Escaping done right

    Ampersands and angle brackets in your data can't break the XML.

  • Works from Excel too

    Upload an .xlsx directly; dates are written in ISO form like 2024-03-01.

FAQ

CSV to XML: questions and answers

How does CSV to XML name the elements?
The root and row tags come from the two settings, and each column becomes a child element named after its header. Empty headers become column_1, column_2 and so on.
What if a header has spaces or starts with a number?
The tag is made valid, so Unit Price becomes Unit_Price, and the exact header is stored in a name attribute on that element.
Can I convert an Excel file with CSV to XML?
Yes. Upload the .xlsx directly and the first sheet that contains data is converted. For other sheets, move them to the front or save them as separate files first. Alternatively, Excel to CSV saves every sheet as its own CSV, ready to upload here one by one.
How much can I convert for free?
Up to 2 tasks a day with a free account, or 2 in total without one, on files up to 50 MB. VIP files can be 1 GB and tasks are unlimited.
Where is my file processed?
On our servers, in an isolated process, after an encrypted upload. The spreadsheet and the XML are deleted automatically one hour later.
Share CSV to XML with a friendIt runs in any browser, and they can try it without signing up.

Related tools

XLSSQL Excel to SQLGenerate CREATE TABLE and INSERT statements from Excel or CSV.
XMLXLS XML to ExcelTurn repeating XML records into spreadsheet rows.
CSVXLS CSV to ExcelOpen CSV and TSV data in Excel with the right columns and encoding.
CSVJSON CSV to JSONConvert CSV to JSON in your browser. Nothing is uploaded.
XLSCSV Excel to CSVSave each sheet as CSV, line breaks in cells handled.
XLSHTML Excel to HTMLTurn a sheet into an HTML table you can paste into a page.
XLSJPG Excel to ImageSnapshot sheets and charts as images.
XLSJSON Excel to JSONTurn rows into JSON objects using the header row as keys.