1. Home
  2. Spreadsheet & data tools
  3. XML to CSV

XML to CSV

Product feeds, bank exports, sitemaps and API responses often come as XML. Turn the records into rows and columns you can read, filter and import elsewhere.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use XML to CSV

  1. Drop the XML file or paste the XML.
  2. Pick the record element (the most common one is preselected).
  3. Download CSV or Excel.

Features

  • Finds repeating record elements automatically
  • Attributes as @columns, nested elements as path/columns
  • Repeated children joined or numbered
  • Namespaces handled by local names
  • Entity declarations refused for safety

Supported formats

You can open

  • XML
  • Pasted data

You get

  • CSV
  • XLSX
  • TSV

Private by design

Your files are opened and processed by your browser on this device. They are never uploaded to openWorkstand or anyone else, so the XML to CSV is safe for contracts, IDs, photos and work documents. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Documents that declare their own entities in a DOCTYPE are refused for safety.
  • Very large files are limited by your device’s memory; on a phone, split huge files into smaller parts first.

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”.

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 .

Troubleshooting

The file does not open

Check that it is one of the supported formats above and opens in another app. Damaged files and password-protected PDFs cannot be read until they are repaired or unlocked.

It is slow or stops on a very large file

Everything runs on your device, so speed depends on its memory. Close other tabs, use a computer rather than a phone, or split the file into smaller parts first.

The download did not start

Look for your browser’s download bar or icon. Some browsers ask once before a site may download files; allow it and click the button again.

Frequently asked questions

My XML has products inside categories. Which record should I pick?

Pick the element that represents one row of your future table, usually the innermost repeating one, such as product. Data from parent elements is not repeated onto each row, so if you need the category, choose a record type that contains it.

Can it read RSS feeds and GPX tracks?

Yes. They are XML: choose item for RSS feeds, entry for Atom, or trkpt for GPX track points, and the latitude, longitude, elevation and time appear as columns.

How are nested elements named?

By their path inside the record: <address><city> becomes the column “address/city”, and an attribute id on the record becomes “@id”.

Why was my XML refused?

Either it is not well-formed (the error says where), or it declares its own entities in a DOCTYPE. Entity declarations are refused because they can be abused to freeze a computer; remove the DOCTYPE block and try again.

Keep working with the result

After you download, choose “Save to Workstand” to keep the result in a folder on your computer, attach it to a project and create a follow-up task. It is saved by your browser, not uploaded.