Free tools

XML to CSV converter

Turning XML into a CSV comes down to one choice: which element is a row. This converter picks the element that repeats, tells you which one it picked, and lets you change it. If a customer has two contacts, you choose numbered columns or a row for each contact. Attributes and leading zeros stay as written. Your file never leaves your browser.

For Excel

Leave both off if the CSV goes into another system's import. That system may keep the marker and the tab.

Your CSV goes here.

Same file, five converters, five tables

We ran the sample above (two customers, one of them with two contacts) through the five converters on Google's first page. We got five different tables back, and not one converter told us which element it had used as the row.

ConverterRowsThe two contactsAttributesComma in a name
This converter2Numbered columns, or a row each if you pick itKeptQuoted
A2Numbered columnsKeptQuoted
B3Second contact on its own, nearly empty rowKeptQuoted
C1Both customers squeezed into one rowKeptQuoted
D2The text [object Object]type and currency lostQuoted
E6Rows that mix the two customersAll lostComma name not quoted
Converters A to E are the five on Google's first page for "xml to csv", tested November 8, 2026, with default settings. Red marks data lost or misplaced.

Four of the five lost or misplaced data, and you'd only find out in the spreadsheet. Or after the import.

Numbered columns or one row per child

The tool starts with numbered columns, so you get exactly one row per customer in this sample. Every column name is the path to its value in the XML: @ marks an attribute (a detail written inside a tag), and a number in brackets says which of the repeated elements it came from.

  1. <customer id="000184">@id000184
  2. <name>nameHarbor Dental, LLC
  3. first <contact type="billing">contact[1]/@typebilling
  4. its <email>contact[1]/emailap@harbor.example
  5. second <contact>'s <email>contact[2]/emaillee@harbor.example
  6. <balance currency="USD">balance/@currencyUSD
Where six of the first customer's columns come from.

Pick "One row per <contact>" in the Repeated elements menu and each contact gets its own row instead, with the customer's other values copied onto it. Here's the sample both ways, cut down to four columns:

Numbered columns: 2 rows

@idcontact[1]/emailcontact[2]/emailbalance
000184ap@harbor.examplelee@harbor.example1250.50
000731billing@lakeview.example0

One row per contact: 3 rows

@idbalancecontact/@typecontact/email
0001841250.50billingap@harbor.example
0001841250.50ownerlee@harbor.example
0007310billingbilling@lakeview.example

Use numbered columns when each row has to be one customer, like a customer import into a CRM. Use one row per child when the child is what you're loading or counting: contacts, order lines, invoice items. Don't sum the balance column in the second table, though. It repeats on every contact row.

How the converter decides

  • The row is the outermost element that repeats. In an export of orders that each hold order lines, the rows start as orders, not lines. Want one row per line? Pick it in the Row element menu.
  • Values stay as written. 000184 stays 000184 and 1250.50 stays 1250.50. Only the indentation around a value is trimmed. Text in a CDATA section (a block marked as plain text) is read as is, and codes like &amp; become the characters they stand for.
  • Empty elements still get a column. An empty <note/> becomes an empty cell. Namespace prefixes stay in the column names. Comments are skipped.
  • Commas inside a value don't shift your columns. A value with a comma, a double quote or a line break goes in double quotes, the way RFC 4180 describes, so "Harbor Dental, LLC" stays one cell.
  • Broken XML gets a line number. If a tag isn't closed, the error says which line and column to look at. Files can be up to 50 MB.

Excel can still change your numbers. Open the CSV there and, by default, 000184 becomes 184 and 07030 becomes 7030. The steps on our JSON to CSV page keep the zeros.

Questions

Is XML a CSV?
No. XML is a tree: elements inside elements, with attributes on the tags. A CSV is a grid of rows and columns with nothing nested.
What happens to attributes?
Every attribute inside a row gets its own column. Attributes on the elements above the rows, like <export system="billing">, are left out, and the tool tells you which ones.

The CSV is the easy part

An XML export from an old system is often every record it has, dumped as is. Getting it into a CSV takes a minute. Deciding which of those columns go where in your product takes much longer. That's data mapping.

For Rubie's customers, 95% of the systems they move from don't have a clean API or export that captures all the data needed. When that file comes from a new customer leaving another system, Rubie does the whole move. It gets the data out, including what the export missed, and loads it into your product without engineering time. Go-live doesn't wait on the data. See how Migration Playbooks run a migration end to end.

// rubie //

Your customers are waiting on data that lives behind a login.

Book a Demo