XML to CSV
Turn repeating XML elements into CSV rows you can copy or open in Excel.
Add XML in the box and click Convert to see the CSV here.
How XML to CSV works
Converts XML to CSV. The tool looks for the first element that repeats, like many <book> tags inside <books>, and turns each one into a row. Each child tag becomes a column named after the tag.
Attributes of the repeating element become columns too, named with the element name in front, like book_id. Rows that are missing a value get an empty cell, so every row has the same columns.
Input to XML to CSV
- Paste or type XML into the input box, or upload a .xml or .txt file. Click Convert to run it.
- XML must be valid and have one root element. If it is not, you see the line and column of the error.
- Works best with simple lists of records. Text from tags nested deeper inside a child tag is joined into one cell.
Output from XML to CSV
- A table preview of the result. Switch to Raw View to see the CSV text.
- Comma separated CSV with a header row. Values with commas or quotes are put in quotes.
- Copy it, download it as a .csv file or open it in full screen. For a spreadsheet file, use XML to Excel.