XML to CSV
Flatten XML records into CSV rows.
XML to CSV Converter Online
The XML to CSV converter flattens XML records into comma-separated values that open directly in Excel, Google Sheets, LibreOffice, or any database import wizard. Paste XML or open a file; the CSV appears instantly and a sortable table preview confirms that every column lines up.
Automatic record detection
You do not have to write an XPath expression or tell the tool which element holds the data. It scans the document for the most frequently repeated element and treats each occurrence as a row. That works for product catalogs, RSS <item> lists, database dumps with <row> elements, and most exports from ERP and CMS systems.
Columns from attributes and children
- Attributes such as
id="bk101"become columns namedid. - Child elements become columns in the order they first appear.
- Deeper nesting is flattened with dots (
shipping.address.city). - Repeated children inside one record are joined into a single cell.
- Missing fields are left empty so every row has the same number of columns.
Options
Choose comma, semicolon, or pipe as the delimiter, include or omit the header row, and enable Quote all fields for strict importers. Remove namespace prefixes gives short column names such as creator instead of dc:creator.
Typical workflow
Export XML from your shop, CRM, or accounting system, paste it here, check the preview for the expected columns, and download data.csv. Open it in a spreadsheet to filter and pivot, or feed it to an import tool that only understands flat files.
Edge cases
Values containing delimiters, quotes, or line breaks are quoted according to RFC 4180. Entities like & are decoded, CDATA content is included as text, and comments are ignored. Because processing is local, even confidential exports stay on your computer.
Related tools
Need tabs instead? Use XML to TSV. For a real spreadsheet file, try XML to Excel. Convert the CSV back with CSV to XML, or explore it in the CSV Viewer.
Frequently Asked Questions
How does the converter decide what a row is?
It picks the element that repeats most often — <book>, <item>, <record>, <row> — and makes one CSV row per occurrence. Attributes and child elements become columns; nested children are flattened into dotted names like address.city.
Which delimiter should I use for Excel?
Comma works for most spreadsheet apps. In locales where the comma is the decimal separator (much of Europe), Excel expects semicolons, so choose Semicolon (;) to get separate columns when you double-click the file.
Are commas and quotes in values handled?
Yes. Values containing the delimiter, double quotes, or line breaks are wrapped in quotes and inner quotes are doubled, following RFC 4180. Switch on “Quote all fields” to quote every value regardless.
What happens to attributes on text elements?
An element like <price currency="USD">44.95</price> becomes two columns: price with 44.95 and price@currency with USD, so no data is lost.