Convert XML to Excel

Open an XML file as an Excel spreadsheet: each repeating element becomes a row, and its attributes and child elements become columns.

Your files never leave your computer: they're opened and processed right here in your browser, and nothing is uploaded.

Or paste your data

How XML becomes a table

XML has no rows and columns, so the converter looks for the element that repeats, like <book> in <catalog><book>…</book><book>…</book></catalog>, and makes each one a row. If it picks the wrong one, choose another under "Rows": every repeating element in the file is listed with how many rows it gives.

  • Attributes and child elements become columns: <book id="bk101"><title>… gives columns id and title.
  • Nested elements get dotted names: <price currency="USD">44.95</price> gives price (44.95) and price.currency (USD).
  • An element that repeats inside a row (two <author>s) becomes a column per item (author.0, author.1), one cell with all of them, or a row per item: choose under "Repeated elements".
  • Values are kept exactly: &amp; and other entities are decoded, CDATA is kept as text, and ISBNs or codes with leading zeros stay as they are in the Excel file.

How to open XML in Excel

In Excel for Windows (Microsoft 365, 2016 and later): Data → Get Data → From File → From XML, choose the file, select the table in the Navigator (or click Transform Data and expand the nested columns one level at a time), then Load. Older versions have Developer → Import, which needs an XML map and often fails on files without a schema. Where Excel can't import the file, convert it here first.

In Google Sheets

Google Sheets' IMPORTXML function reads web pages by URL with an XPath query; it can't open an XML file from your computer. Convert the file here, then File → Import the Excel file.

Questions

Which element becomes a row?
The outermost element that repeats and has fields of its own, such as <item> in an RSS feed or <product> in a product feed. You can pick any other repeating element under "Rows".
What happens to namespaces?
Prefixes are kept in the column names (g:id, g:price in a Google Merchant feed), so columns from different namespaces stay apart.
My XML file is rejected as invalid. Why?
The message says where the problem is (line and column): usually an unclosed tag, an unescaped & in text (it must be &amp;), or two root elements. Fix it in a text editor and try again.
Is the file uploaded?
No. The XML is read and converted by your browser; nothing is sent anywhere.