About this tool
Convert repeating XML elements into RFC 4180 CSV rows in your browser, with attributes and nested tags flattened into columns.
This XML to CSV converter turns the repeating elements in an XML document into spreadsheet rows, flattening nested tags into dotted column names and attributes into @-prefixed columns. Output follows RFC 4180: fields containing the delimiter, a double quote or a line break are wrapped in double quotes, and embedded quotes are doubled. It is built for anyone who has been handed a product feed, bank statement or API dump as XML and needs it in Excel, Google Sheets or a database import.
Open XML to CSV on AltFTool — it loads instantly in your browser.
Paste or upload your source content.
Choose the target format or conversion mode.
Copy or download the converted result.
It picks the deepest element that repeats under a shared parent, so <catalog><book>…</book></catalog> becomes one row per book.
Commas, quotes and line breaks inside your data are quoted and escaped properly instead of silently breaking a column.
The XML is parsed by JavaScript in the page, so confidential feeds and statements never reach a server.
It looks for the deepest element whose children repeat under the same name. In <catalog><book/><book/></catalog> the repeating name is book, so each <book> becomes one CSV row. If nothing repeats, the root's child elements are used instead.
Each attribute becomes its own column, named with an @ marker — an id attribute on the row element gives a column called @id, and a currency attribute on <price> gives price@currency. You can switch attributes off entirely with one checkbox.
Nested paths are joined with a dot, so <author><name> inside a record produces a column called author.name. Where the same child appears more than once, the second and later copies are numbered — tag, tag[2], tag[3].
Excel guesses ANSI encoding unless the file starts with a UTF-8 byte-order mark, so the download here writes that BOM automatically. If your data uses semicolons as the natural separator, switch the delimiter to semicolon, which is what Excel expects in most European locales.
Add the XML to CSVwidget to your blog or website — free, responsive, no signup. Just keep the “Widget by AltFTool” credit link visible.
<iframe src="https://www.altftool.com/embed/widget/xml-to-csv"
title="XML to CSV — free AltFTool widget"
width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden"
loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
<p style="font-size:12px;margin:4px 0 0">Widget by <a href="https://www.altftool.com/tools/all/xml-to-csv?utm_source=embed&utm_medium=widget">AltFTool — free online tools</a></p>