XML to CSV

Convert XML to CSV online. The first repeating record set is flattened into a table, in your browser.

Suggested tools

CSV to XML

Convert CSV rows into well-formed XML elements.

CSVXML
Open Tool

YAML to CSV

Convert a YAML list into CSV.

YAMLCSV
Open Tool

CSV to YAML

Convert CSV into YAML.

CSVYAML
Open Tool

CSV to HTML

Convert CSV into an HTML table.

CSVHTML
Open Tool

CSV Escape / Unescape

Quote a value correctly for CSV, or unwrap a quoted CSV field.

CSV
Open Tool

JSON to XML

Convert JSON into well-formed XML.

JSONXML
Open Tool

About XML to CSV

XML to CSV turns list-style XML — product feeds, exports, RSS items, records from an API — into a CSV table you can open in Excel or Google Sheets. The tool finds the first repeating set of elements and makes one row per element.

Child elements and attributes become columns, nested elements are flattened into dot-notation columns, and values such as 007 or +91 phone numbers are kept exactly as written. Everything runs locally in your browser — the text you paste is never uploaded.

How to use XML to CSV

  1. Paste XML, upload an .xml file or click Sample.
  2. Press Convert.
  3. Copy or download the CSV.

Key features

  • Finds the repeating records automatically
  • Attributes and nested elements become columns
  • Leading zeros and codes kept as text
  • Checks the XML is well-formed first

Example

The repeating <student> elements become rows; the roll attribute becomes a column.

Input
<students><student roll="1"><name>Asha</name><marks>91</marks></student><student roll="2"><name>Ravi</name><marks>84</marks></student></students>
Output
name,marks,@_roll
Asha,91,1
Ravi,84,2

When to use XML to CSV

  • Opening an XML product feed or export in a spreadsheet.
  • Turning RSS items into a table of titles and links.
  • Analysing XML records with spreadsheet tools.

Tips and common problems

  • Only the first repeating set of elements is converted — paste just the section you need for other lists.
  • Attribute columns start with @_.
  • Leading zeros and codes are kept as text.

Frequently asked questions

The first list of repeated elements (for example every <item> in a feed or every <product> in an export).