XML to CSV Converter

Convert an XML document to CSV. Each repeated child element of the root is treated as one record (a CSV row), and that record’s own child elements become the columns — ready to open in Excel or Google Sheets.

How xml to csv works here

  • The direct child elements of the root (e.g. each <person> or <item>) become the rows; their child tags become the columns.
  • Element attributes are included as columns named @attribute (e.g. id="7" becomes a column @id).
  • Deeply nested elements are flattened to their text — use XML to JSON instead when you need to keep the structure.

Frequently asked questions

How is XML mapped to rows and columns?
The root’s repeated child elements are the rows, and each of their child tags is a column. Every tag seen across the records becomes a header; rows missing a tag are left blank, exactly like a spreadsheet.
Are XML attributes kept?
Yes. An attribute such as <person id="7"> becomes a column named @id holding the value 7, alongside the columns built from the child elements.
Is my XML uploaded anywhere?
No. The XML is parsed and converted entirely in your browser using the built-in DOMParser, so your data never leaves your device.

Related data & developer conversions

See all data-format conversions →