XML to CSV
Convert XML to CSV online. The first repeating record set is flattened into a table, in your browser.
Suggested tools
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
- Paste XML, upload an .xml file or click Sample.
- Press Convert.
- 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.
<students><student roll="1"><name>Asha</name><marks>91</marks></student><student roll="2"><name>Ravi</name><marks>84</marks></student></students>
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).
Only the first repeating set is converted. Paste just the section you need to convert another list.
They were XML attributes rather than child elements.