Guide
Flattening XML records into CSV or Excel rows
XML still carries a great deal of business data: product feeds for marketplaces, bank and accounting exports, government open data, sitemaps, RSS and Atom feeds, GPS tracks and configuration dumps. It is precise but hard to read, and spreadsheets cannot do much with it directly. This tool turns the repeating records of an XML document into rows and columns.
Opening the XML
Drop an .xml file, or paste the XML text. The browser’s own parser reads it. If the document is not well-formed, for example a tag is never closed, you see the parser’s message so you can fix the file at its source.
Choosing the records
A table needs one element per row. The tool finds elements that repeat under the same parent and lists them, most frequent first, with their counts and paths, such as /feed/product (240). The most likely record type is selected for you. Change it when your file has several levels, for example orders that contain order lines.
How columns are named
Inside each record, attributes become columns named with an @, such as @id or @status. Child elements become columns named by their path from the record: a price element gives “price”, an address with a city inside gives “address/city”, and an attribute on a nested element gives “price/@currency”. Text that sits directly in an element next to child elements appears as “#text”.
Repeated elements
A record may contain the same element several times, such as several tag or item elements. By default their values are joined in one cell with a separator you choose, “; ” unless you change it. Switch on numbered columns to spread them out instead, as tag 1, tag 2 and so on, which suits short, regular lists better than long ones.
Namespaces
Many XML formats use namespaces, which add prefixes like g: or ns2: to element names. Columns are named by the local name without the prefix, which keeps headers readable. Switch off attributes if a format adds technical attributes you do not need.
Safety
XML can declare entities, a feature that has been abused to make parsers load external files or expand a few bytes into gigabytes. The browser’s parser never loads external files, and documents that declare their own entities are refused outright with an explanation. Ordinary documents, including those with a DOCTYPE line that declares no entities, are unaffected.
Saving
Download the table as CSV, Excel or TSV. Values are kept as text exactly as they appear in the XML; Excel output turns plain numbers and ISO dates into real values.
Typical files
Marketplace and price-comparison feeds, Google Merchant product feeds, invoices in UBL or other e-invoicing formats, bank statements in XML, government open-data exports, sitemaps (choose url as the record) and podcast feeds. For large feeds with tens of thousands of products, the conversion runs in your browser in seconds.
Values with special characters
Entities such as & and < and CDATA sections are decoded, so the table shows the real text, like “Arms & Co”.
Related tools
For JSON documents, use JSON to Excel. To convert a table into JSON, try CSV to JSON. For pretty-printing JSON responses, the JSON Formatter helps.
Checked against the current version of the XML to CSV on .

