XML to Excel Converter
Flatten an XML document into rows and columns and download a genuine .xlsx workbook you can open straight in Excel, Numbers or Google Sheets.
From a tag tree to a spreadsheet
Spreadsheets are flat: a grid of rows and columns. XML is a tree. The job of this tool is to bridge that gap — it reads your XML, flattens the nested structure into a single record (or a list of records), and writes that out as a true Excel workbook. The download you get is a real .xlsx binary, not a CSV with a misleading file extension.
Two libraries do the heavy lifting. xml2js parses the XML into a JavaScript object, then SheetJS (the xlsx package) builds a worksheet, packs it into a workbook, and serialises it to the OOXML format Excel expects. Nested keys are joined with dots — so <address><city> becomes a column header reading address.city.
Because the workbook is generated in the browser and handed to you as a binary download, this tool keeps the original spreadsheet experience rather than showing text in a pane. Your data is flattened and written locally and never sent anywhere.
Getting a spreadsheet out of XML
- 1
Paste your XML
Add the XML to the input pane, or load it from an .xml file.
- 2
Let it flatten
As you type, the converter parses the XML and flattens nested objects into dot-joined column names behind the scenes.
- 3
Click Convert to Excel
Press the button to generate the workbook. There's no text preview here — Excel is a binary format.
- 4
Open the .xlsx
Your browser downloads converted.xlsx. Open it in Excel, Google Sheets, LibreOffice or Numbers.
Why a real workbook matters
No CSV-in-disguise
You get an actual OOXML .xlsx file, so Excel opens it without an import wizard or encoding prompt.
Nested data becomes columns
Deeply nested elements flatten to readable dot-notation headers like order.customer.name.
Hand data to non-developers
Turn a developer-facing XML feed into something a colleague can sort, filter and pivot.
Stays on your machine
The workbook is built client-side with SheetJS, so confidential records never leave your browser.
What a converted row looks like
The XML on the left flattens to a single spreadsheet row with the column headers shown on the right.
<order>
<id>1042</id>
<customer>
<name>Ada Lovelace</name>
<city>London</city>
</customer>
</order>Headers: order.id | order.customer.name | order.customer.city
Row 1: 1042 | Ada Lovelace | London
(downloaded as converted.xlsx)How flattening decides your columns
Each leaf value in the XML becomes one cell, and its full path becomes the column header. A structure like <order><customer><name>Ada</name></customer></order> produces a header of order.customer.name with the value Ada beneath it. If the parsed XML is a single object you get one row; if it's a repeating list, each entry becomes its own row sharing the same headers.
Where this differs from XML to CSV
- The output is a binary
.xlsx, not comma-separated text — there's nothing to preview as plain text, only a file to download. - Excel reads it natively, so numbers, long IDs and special characters survive without the encoding surprises CSV can bring.
- If you only need plain tabular text for a script or a database import, the XML to CSV tool is the lighter choice.
Frequently asked questions
It's a genuine .xlsx workbook in the OOXML format, generated with SheetJS. Excel, Google Sheets, LibreOffice and Numbers all open it directly with no import step.
Excel files are binary, not text, so there's nothing meaningful to show in a text box. Click Convert to Excel and the workbook downloads as converted.xlsx instead.
Nested elements are flattened into dot-joined column names. For example a city inside a customer inside an order becomes the header order.customer.name. Each leaf value gets its own column.
No. The XML is parsed and the workbook is built entirely in your browser. The file is created locally and handed to you as a download — nothing is transmitted.
Yes. When the parsed XML is a repeating list, each entry becomes its own row in the worksheet, all sharing the same set of column headers.
Any app that reads .xlsx — that includes Microsoft Excel, Google Sheets, Apple Numbers and LibreOffice Calc. The format is the modern standard, so compatibility is broad.
Need another tool?
Browse the full toolbox or dig into the blog for the engineering behind it.