Celtrim

Convert XML to CSV

Repeating elements become rows, attributes become columns, and Excel SpreadsheetML is read as a workbook. Download CSV or Excel. Nothing is uploaded.

Generic XML or Excel 2003 SpreadsheetML. Nothing is uploaded.

Free · no sign-up · processed on your device

How it works

  1. 01

    Drop the .xml or paste it

    Generic XML and Excel SpreadsheetML both work. Repeating sibling elements are listed so you can pick which tag is a row.

  2. 02

    Check the table

    Attributes land in columns prefixed with @. Nested tags flatten with dotted names. Switch the record element if the first guess was the wrong list.

  3. 03

    Download CSV or Excel

    CSV with comma or semicolon, or a real .xlsx workbook if you would rather keep types. Nothing was uploaded to produce either.

XML to CSV is the same unwrapping job as JSON to a table, with two extra wrinkles. Tags can repeat under different parents, so the converter lets you pick which element is a row instead of silently taking the first list it finds. And some of the XML that arrives is not a tree of records at all — it is Excel's 2003 SpreadsheetML, which is already a workbook and just needs to be read as one. Both shapes land in the same preview.

What the conversion keeps

Repeating sibling elements becomes One row per element
<catalog><product>…</product><product>…</product></catalog> is the usual case. Each product becomes a row. If several tags repeat, you pick which one is the record — categories and products in the same file are not mixed into one table.
Attributes and nested tags becomes Columns named @id and supplier.name
An id attribute becomes @id, so it does not collide with a child element also called id. Nested unique children flatten; repeated children of the same name are numbered.
Excel 2003 SpreadsheetML becomes The worksheets it already contains
That XML is a workbook in disguise — File → Save As → XML Spreadsheet 2003. Each Worksheet becomes a sheet and the record picker is skipped, because the rows are already rows.
A document with no repeating elements becomes A key / value table
A config file or a single record still converts, just not into a list. Flattened paths become keys so you can still get a CSV out of it.

Related conversions

Common questions

How do I convert XML to CSV?
Drop the .xml file onto the converter above, or paste the XML. Repeating elements become rows and you download a CSV. If more than one tag repeats, pick the one that should be a row from the list.
Can I convert XML to Excel as well?
Yes. After the preview appears, download Excel as well as CSV. SpreadsheetML files with several worksheets become a multi-sheet workbook.
What if the wrong element is used as the row?
Change Repeating element to use as rows. The preview updates immediately. The converter lists every tag that appears at least twice as a sibling, with a count.
Does it work with Excel XML spreadsheets?
Yes. The Excel 2003 XML Spreadsheet format is detected automatically and read as a workbook, one CSV — or one Excel sheet — per Worksheet.
Are attributes included?
Yes. They become columns prefixed with @ so they stay distinct from child elements of the same name.
Is my XML uploaded to a server?
No. The file is parsed and the CSV is written in your browser with local JavaScript. Nothing is transmitted, stored, or logged.
What about namespaces?
Local names are used, so a tag in a namespace still matches its repeating siblings. The xmlns declarations themselves are not turned into columns.