Tools
EN

XML to CSV Converter

Turn XML data into a CSV file for spreadsheets, databases and scripts. The converter detects the repeating record element and flattens attributes and nested elements into named columns.

XML

CSV

The element that repeats most often becomes one row each; choose another one in “Rows from element”.

Private: your data is processed in your browser and never uploaded.

How to convert XML to CSV

  1. Paste XML or open a file. The element that repeats most often becomes one row each.
  2. Pick another element under Rows from element if needed, and choose the delimiter: comma, semicolon, tab or pipe.
  3. Copy the CSV or download it. Tick Add a UTF-8 BOM for Excel so that accented characters open correctly in Excel.

How the columns are named

XMLCSV column
Attribute on the record, id="7"@id
Child element <name>name
Nested element <address><city>address.city
Attribute on a child, <price currency="EUR">price.@currency
Repeated children such as several <tag>One cell, values joined with “; ”
<ns:name> with Ignore namespace prefixesname

Choosing the delimiter

Commas are the standard, but Excel in many European locales expects semicolons, because the comma is the decimal separator there. Tab-separated output pastes cleanly into spreadsheets, and the pipe is handy when the data contains both commas and semicolons. Values that contain the delimiter, quotes or line breaks are wrapped in double quotes, as defined in RFC 4180.

Frequently asked questions

Which element becomes a row?

The converter counts how often each element path occurs and picks the repeating element with the most data, for example catalog/product. You can choose any other path; the number in brackets shows how many rows it gives.

What if my records have different fields?

Every field of every record becomes a column, and values that a record does not have stay empty.

Can I get an Excel file directly?

Yes. XML to Excel builds a real .xlsx file with a bold header row and filters from the same rows and columns.

Is my data uploaded?

No. The conversion runs entirely in your browser.