Map Extract
Free tool

Turn an XML file into a CSV you can open in a spreadsheet

Product feeds, supplier price lists, directory exports and old CRM backups often arrive as XML. Paste it or open the file, and the converter picks out the element that repeats once per record, turns every tag and attribute inside it into a column and gives you a CSV.

Runs in your browser. Nothing you enter is uploaded.

Example: a supplier's stockist feed

A wholesaler sends its stockist list as XML. Each <listing> has an attribute for its reference, a name, a town and sometimes a phone number or several categories. Left empty, the Record element box picked listing because it repeats most.

The attribute became a column called @ref, so you can tell it apart from a child tag. Pike & Daughter had two <category> tags, and both values went into one cell, separated by a semicolon. The &amp; in the source was decoded to a plain ampersand, and the missing phone simply left a blank cell.

Input
<feed>
  <listing ref="A1"><name>Hollin Bakery Supplies</name><town>Bury</town><phone>0161 496 0321</phone></listing>
  <listing ref="A2"><name>Pike &amp; Daughter Joinery</name><town>Ramsbottom</town>
    <category>joiner</category><category>kitchens</category></listing>
</feed>
Result
2 rows from <listing>, 5 columns.

@ref,name,town,phone,category
A1,Hollin Bakery Supplies,Bury,0161 496 0321,
A2,Pike & Daughter Joinery,Ramsbottom,,joiner; kitchens

Converting XML to CSV

  1. Add the XML

    Paste it into the box or press Open a file to load an .xml or .txt file from your computer.

  2. Confirm the record element

    Leave Record element empty to let the converter use the element that repeats most, which it shows as the placeholder. Type a name such as product or item if it chose the wrong one.

  3. Pick a separator

    Comma suits most spreadsheets. Choose semicolon for Excel set to a European locale, or tab if values contain lots of commas.

  4. Check the preview and download

    A line reports how many rows and columns were found, and the first 50 rows appear as a table. Copy the CSV or download it as data.csv.

How XML structure becomes columns

In the XMLIn the CSV
A child tag such as <town>A column named town
An attribute such as ref="A1"A column named @ref
A tag nested deeper, such as <contact><email>A column named contact.email
The same tag twice in one recordOne cell with both values, separated by "; "
A tag present in some records onlyA column for everyone, blank where missing
Entities such as &amp; and &lt;Decoded to & and <

When the converter stops with an error

XML has to be well formed before anything can read it: every opening tag needs a closing tag, tags must close in the right order, and a bare & must be written as &amp;. If a check fails you get the line number and the reason, for example an unclosed tag. Fix that line in the box and the table appears straight away.

Feeds that hold two different kinds of record (say, <category> blocks and <product> blocks) need converting once per kind. Type the element you want in Record element each time.

Questions people ask

How do I convert XML to CSV without Excel?

Paste the XML on this page or open the file, check that the record element is the one that repeats for each item, and download the CSV. It runs in the browser, so no software or account is needed. Excel can also import XML through its Data tab, but it often asks for a schema and splits nested data awkwardly.

What is the record element?

It is the tag that wraps one item, such as one product, one company or one order. Each copy of that tag becomes one row of the CSV. The converter guesses it by finding the element that appears most often, which is right for most feeds; type a different name when the guess is a repeated inner tag.

Why does my CSV look garbled in Excel?

Excel sometimes opens a UTF-8 CSV with the wrong character set, so pound signs and accented names turn into odd symbols. Use Data, From Text/CSV and choose UTF-8 as the file origin, or open the file in Google Sheets or LibreOffice, which read UTF-8 correctly.

Can it handle very large XML files?

It reads the whole file in your browser's memory, so files of a few megabytes are quick and larger ones depend on your computer. The preview shows only the first 50 rows to keep the page responsive, but the downloaded CSV contains every record.

Where your data goes

Your XML is parsed by code on this page and never leaves the browser. Files opened with the button are read locally, and the CSV is created in memory, so supplier price lists and customer exports stay private.

Checked against the tool on

Top