XML to Excel Converter

Paste XML, flatten repeating elements into rows, and download a CSV file that opens straight in Excel. The output is CSV, not a native .xlsx workbook, and that difference matters once a script downstream checks the file extension.

Reviewed & Maintained by Wajahat QasimLast updated August 2, 2026
Waiting for input
Options
Preview

Paste XML above and convert to see the spreadsheet here

It's a CSV file wearing an Excel costume

Excel opens the download without complaint. That does not make it an .xlsx file.

This converter builds a comma-separated table from your XML and hands it back as a .csv file. Double-click it and Excel, Google Sheets, or Numbers open it into a normal-looking grid, because every spreadsheet program on the market reads CSV natively. What you do not get is a real workbook: no sheet tabs, no cell formatting, no formulas, no column types. If a script further down your pipeline checks for the .xlsx signature or expects multiple worksheets, this output fails that check even though it opened fine on your screen.

The JSON to Excel converter in our JSON tools writes an actual binary .xlsx workbook using the SheetJS library. This page does not do that yet. If your workflow genuinely needs a native workbook rather than a CSV that looks like one, convert your XML to JSON first with the XML to JSON converter, then run that output through JSON to Excel.

How the tool decides what becomes a row

The parser looks at your root element's direct children first. Find one wrapper, like a single <employees> tag holding many <employee> tags, and each <employee> becomes a row. Skip the wrapper and repeat tags directly under the root, and those repeated tags become the rows instead. Either shape works without extra configuration.

Take a three-employee export. An <employee> element with <name>, <department>, and <salary> children turns into one row with three columns, named after those child tags. A second <employee> with the same three children lines up under the same headers automatically. A third <employee> missing <salary> simply leaves that cell blank rather than shifting every column left, since headers are collected across all rows before the table gets built.

Column order follows first appearance, not alphabetical order. The first row to introduce a tag decides where that column sits for every row after it.

Where this earns a permanent bookmark

What won't survive the round trip

Three specific things break here, and each one is worth knowing before you rely on the output.

Turn Flatten off before feeding it a deep export

With Flatten on, the converter walks every descendant of a row element and pulls in every leaf value it finds, however many levels down. On a shallow feed like the sample above, that is exactly what you want. On a deeply nested export, an order with line items, each line item with tax breakdowns, each breakdown with regional codes, it can produce far more columns than you expected, some pulled from data three or four levels removed from the row itself.

Switch Flatten off and the tool reads only a row's direct children, skipping anything nested deeper than one level. Fewer columns, easier to scan, and no surprise data from a branch you did not know existed.

CSV now, or a real workbook later?

Three ways to get XML data into Excel, and none of them is wrong, they just answer different questions.

MethodOutputBest for
This converterCSV, opens in ExcelA quick look at flat or lightly nested XML
XML to JSON, then JSON to ExcelReal .xlsx workbookDeliverables that need a genuine workbook file
Excel's built-in Get Data > From XMLNative worksheet, refreshableRecurring imports from the same XML source

We built this page for the first case, a fast, no-install look at XML data. If you are past the spot-check stage and building something recurring, Excel's own XML import handles refresh cycles better than any browser tool will.

XML to Excel, the questions the converter itself doesn't answer

Short answers for the details that don't fit next to the buttons.

Does this actually create an .xlsx file?

No. It produces a CSV file, which Excel, Google Sheets, and Numbers all open without issue. If a downstream process specifically checks for the .xlsx binary format or expects multiple sheet tabs, use the JSON to Excel converter instead, which writes a real workbook.

Why did two of my rows overwrite the same value?

Column names come from tag names, not from position. If a row element contains the same child tag twice, the second occurrence overwrites the first in that column. There is no automatic numbering of repeated tags right now.

My converted table has way more columns than I expected. Why?

The Flatten option is likely on, which pulls leaf values from every level of nesting inside each row, not just direct children. Turn Flatten off to limit columns to a row's immediate children.

Can I convert an XML file instead of pasting text?

Yes. Drag a .xml file onto the input box and it loads and converts automatically. There is no file size limit enforced by the tool itself, though very large files will slow down your browser tab.

Does my XML get uploaded anywhere?

No. Parsing, flattening, and CSV generation all happen in your browser with the built-in DOMParser. Nothing is sent to a server, logged, or stored.

Why is a cell blank in some rows but filled in others?

That happens when one row element is missing a tag that other rows include, an optional field in your source XML. The column stays in place and the cell for that row is left empty instead of shifting other columns out of alignment.