XML to Excel Converter

Convert XML to a .xlsx workbook instantly in your browser. Nested records become separate sheets. Your data never leaves your device. To go the other way, use Excel to XML.

or paste XML below
🔒

100% private

Your files are processed locally and never uploaded to our servers.

This XML to Excel converter turns an .xml file, or XML you paste, into an .xlsx workbook in your browser, and decides from the file's structure whether the data belongs on one sheet or several. People usually arrive with an order export from their ERP system or a supplier's UBL e-invoice. They opened it in Excel and got either a dialog about XML schemas or a table where every order appears six times.

How to convert XML to Excel

  1. Drop an .xml file onto the upload box above, or paste the XML into the text box below it. Files up to 50 MB work, and your browser parses them locally, so nothing is uploaded.
  2. Click Convert to Excel.
  3. Find the download. The workbook is named after your file with (xlsx.com) added, so orders.xml becomes orders (xlsx.com).xlsx. Pasted XML downloads as export (xlsx.com).xlsx.
  4. Read the result box. It says which layout the converter picked and why: for an order file with lines and payments, that it found two nested repeating sets and split them into three sheets.
  5. If you want the other layout, click "Combine into one sheet instead" or "Split into separate sheets instead". The switch doesn't re-read the file.

What the converter does to your data

The converter maps each part of the XML to a column, a row or a sheet by its shape.

In the XMLIn the workbook
<customer type="trade">Acme</customer>Two columns: customer (Acme) and customer_type (trade)
<address><city>Leeds</city></address>One column, address.city
Two <tag> elements holding plain textOne cell, the values joined with commas
<cbc:ID>INV-1042</cbc:ID>A column headed ID, prefix removed
<![CDATA[Blue & white]]>The text inside, as text
<qty>12</qty>, <price>1234.50</price>The numbers 12 and 1234.5, ready for SUM
<zip>02134</zip>Text, 02134 with its zero
<total>1,234</total>Text, as written
<code>1e5</code>Text, not 100000
<gtin>7300010000000</gtin>Text, all 13 digits visible
<cbc:CompanyID schemeID="0192">987654321</cbc:CompanyID>Text, because schemeID marks it as an identifier
<issued>2026-03-04</issued>Text, exactly as written

Fields that belong to the document rather than to a repeating record go on a Field/Value sheet placed first. That's where an invoice number or a feed title ends up.

The leading-zero rule matters more than it looks. Excel stores a number without its leading zeros, so a part number like 00417 that arrives as 417 no longer matches the code in your other systems. Here it stays text, while plain decimals such as 0.5 still become numbers.

Sheet names come from element names, cleaned to Excel's rules: no [ ] : * ? / \, 31 characters at most, no duplicates. The header row is bold.

Why nested XML turns into duplicated rows in Excel

XML can nest a list inside a list. Excel can't. A worksheet is one grid, so every tool that reads XML into Excel has to decide what to do with an order that holds three lines and two payments.

The common answer is to flatten everything into one table. Power Query does it when you expand the lines column and then the payments column: each order becomes 3 × 2 = 6 rows, one for every line paired with every payment. None of those pairings exist in the file. Sum the payment amounts and each payment counts three times. Sum the line totals and each line counts twice.

The converter handles the two cases differently.

One chain of repeats stays on one sheet

When the only nesting is a chain, such as orders containing order lines, the converter puts it on one sheet. Each line gets its own row, and the order's id and customer repeat on each of its lines. That's the layout you want for a pivot table or a filter, and every row is real.

Side-by-side collections get a sheet each

When an order holds both lines and payments, the converter gives each repeating element its own sheet and never merges them. Every sheet gets a _row column numbering its rows, and each child sheet gets a column like order_row holding the row of the order it belongs to. The two sheets join back through that key with a pivot table or a lookup:

=XLOOKUP(B2, order!A:A, order!C:C)
// B2          the line's order_row value
// order!A:A   the _row column on the order sheet
// order!C:C   the order field you want, e.g. customer

With an order file holding id and customer, those are the real positions: the line sheet runs _row, order_row, sku, qty, and the order sheet runs _row, id, customer. Adjust the letters for your own fields. The XLOOKUP function page has the full syntax.

If you click "Combine into one sheet instead", the converter still won't invent rows. A collection it can't lay out as rows becomes joined text in a single cell, and the result box names every collection it collapsed that way, so a partial view never passes for a complete one.

Opening a UBL or PEPPOL e-invoice in Excel

UBL invoices, the format behind PEPPOL e-invoicing, trip Excel up in several ways at once. Nearly every element carries a namespace prefix (cbc:ID, cac:InvoiceLine), and IDs that have to stay text look like numbers.

The converter strips the prefixes, so the invoice line sheet has columns headed ID, InvoicedQuantity and LineExtensionAmount rather than cbc:ID and the rest. An amount written as <cbc:LineExtensionAmount currencyID="EUR"> gives a LineExtensionAmount column plus LineExtensionAmount_currencyID. AllowanceCharge appears both on the invoice and inside each line, so the sheets are told apart by their parent: AllowanceCharge for the invoice-level charges, InvoiceLine_AllowanceCharge for the line-level ones.

Identifiers are the other trap. A value with a schemeID or listID attribute is an identifier, and the converter keeps it as text however numeric it looks. Integers longer than 11 digits stay text too. Excel shows a 13-digit GTIN in General format as 7.30001E+12, and it stores only 15 significant digits, so a longer number converted to a real number loses its tail for good.

Doing it in Excel without a converter

Excel 365 on Windows has three built-in routes. Power Query is the one worth learning.

Data > Get Data > From File > From XML. Pick the file and the Navigator lists the tables it found. Click Transform Data, then use the expand icon on each column that shows Table to pull nested elements into columns. Attributes arrive with an Attribute: prefix. Close & Load puts the result on a sheet as a table. To avoid the row multiplication above, expand only one collection per query: right-click the query, choose Reference, and expand the second collection in the copy. Expect ten to twenty clicks for a two-level file, more for UBL.

File > Open. Choose the .xml file and Excel asks how to open it: As an XML table, As a read-only workbook, or Use the XML Source task pane. Pick As an XML table and Excel usually warns that "The specified XML source does not refer to a schema". Click OK and it builds one from the data. Flat files open cleanly this way. Nested ones come out as a single wide table.

Developer > Import. The same XML map engine, reached from the Developer tab, which is hidden until you tick it under File > Options > Customize Ribbon.

Stay in Excel when you want a query to refresh as the XML changes, when you need an XSLT stylesheet applied, when the XML sits at a URL (Data > Get Data > From Other Sources > From Web), or when the file is over 50 MB.

Limits

  • Files and pasted text only. The converter doesn't fetch XML from a URL. Download the file first.
  • No XSD or XSLT. Schemas and stylesheets are ignored. The layout comes from the data itself.
  • Minimal formatting. The header row is bold, and that's all. Column widths and number formats aren't set, so double-click a column's right border to fit long values.
  • Dates stay text. 2026-03-04 arrives as written. Convert a column with =DATEVALUE(A2) and a date format, or see the DATEVALUE function.
  • Mixed content keeps only direct text. In XHTML or DocBook, where text and child elements interleave, each element keeps its own direct text, not the text inside its child elements.
  • Excel's row and column limits. The converter checks before building anything. Past 1,048,576 rows on a sheet, you choose between a truncated download and, in the combined layout, splitting into separate sheets, which can bring each sheet under the limit. Truncating drops every data row after the 1,048,575th and moves nothing to another sheet. More than 16,384 columns stops the conversion with a message.
  • Bad input gets a plain message. An empty file, invalid XML with no root element, and an HTML page dropped by mistake each get their own error message.

If the same system offers a JSON export, JSON to Excel takes that route instead, and a flat CSV export goes through CSV to Excel. Going the other way, Excel to XML turns a sheet into XML that this converter reads back into the same columns.

Questions

How do I convert an XML file to Excel?

Drop the .xml file on the converter above, or paste the XML, and click Convert to Excel. The .xlsx downloads with the layout already chosen from the file's structure. Inside Excel 365, the equivalent route is Data > Get Data > From File > From XML, followed by expanding the nested columns in Power Query.

Can Excel open XML files directly?

Yes. File > Open accepts an .xml file and asks whether to open it as an XML table, as a read-only workbook, or with the XML Source task pane. That works well for a flat list of records. Files with repeating elements inside repeating elements usually come out as one wide table with parent values duplicated on every row.

Why did my XML convert to only one row?

The file has no element that repeats, so there is only one record to show. That is normal for a config file or an API response describing a single record.

How are nested XML elements converted to Excel columns?

A nested element that appears once becomes a dot-notation column, so city inside address becomes address.city. An element that repeats becomes rows: on the same sheet as its parent when the repeats form a single chain, such as orders holding order lines, or on its own sheet when the parent holds two or more different repeating sets.

What happens to XML attributes?

They become ordinary columns with no @ prefix. An element with text and an attribute gives two columns, so a customer element with a type attribute produces customer and customer_type.

Why do long numbers from XML show as 7.30001E+12 in Excel?

Excel displays a number longer than 11 digits in the General format in scientific notation, and it keeps at most 15 significant digits. This converter keeps integers over 11 digits as text so every digit stays visible. Values marked with a schemeID or listID attribute also stay text, however numeric they look.

Is my XML uploaded to a server?

No. The browser's own XML parser reads the file and the workbook is built on your computer. The converter is free, has no daily limit, needs no sign-up and takes files up to 50 MB.