XML to CSV

Convert XML to CSV in your browser. Paste XML or choose a file. Pick the repeating element that should become a row, preview the result, then copy or download it. Your data stays on your device.

Pasted XML or .xml and .txt files, up to 10 MB

Paste or choose an XML file. You can also drop it here.

Separator
Encoding

Adds an apostrophe before text that could run as a formula in Excel. Turn off for raw CSV data imports.

Your preview will appear here after conversion.

How it works

This XML to CSV converter turns a pasted document or local XML file into spreadsheet rows. Conversion runs in a Web Worker in your browser; the XML and CSV are not uploaded. No account is needed.

How XML becomes CSV

Your XMLIn the CSV
Repeating elements, such as <order>Each selected element becomes one row. Columns include fields seen in any row, and missing fields leave empty cells.
Attributes, such as id="A-104"Attributes become columns with an @ prefix, such as @id. Namespace declarations are omitted.
Nested elements, such as <shipping><city>…</city></shipping>Nested values become dotted columns, such as shipping.city. A dot inside an XML name is escaped as \. in the column name.
Repeated values inside a record, such as two <tag> elementsThe values stay together as a JSON array in one CSV cell, such as ["new","gift"]. Select the tag path if you want one row per tag instead.

Convert XML to CSV in three steps

Paste XML or choose a .xml file, then select Convert XML to CSV. If the automatically chosen record element is not the row you want, choose another path in One CSV row per element. Check the table or CSV text, then copy or download the file.

Choose comma for standard CSV, semicolon for some regional spreadsheet settings, or tab for TSV. Values containing separators, quotes or line breaks are quoted. Files use UTF-8 and CRLF row endings. Choose UTF-8 with BOM if Excel misreads accented or non-Latin characters.

Spreadsheet protection is on by default. Text beginning with =, +, - or @, including after whitespace, gets a leading apostrophe to prevent spreadsheet formula execution. Turn it off when an importer requires the original text exactly.

You can use .xml or .txt files up to 10 MB. The preview shows the first 100 rows and 30 columns; copy and download include everything. XML must be well formed. DTDs and external entities are not supported. Very large or deeply nested XML may exceed your device’s memory.