XML to Excel Converter & Excel to XML Converter (Two-Way, Online)
Turn any XML file into a clean Excel spreadsheet, or turn an Excel sheet back into well-formed XML, with one free tool. Paste or upload your data, pick a direction, and download a ready-to-use XLSX, XLS or XML file in seconds.
What is an XML to Excel converter?
XML stores information as a tree of nested tags, which is great for software but awkward for people. Excel stores information in rows and columns, which is great for sorting, filtering, charting and reporting. An XML to Excel converter bridges the two: it reads your XML, finds the repeating records, and writes them into a worksheet where every element or attribute becomes a column and every record becomes a row.
This tool works in both directions. Use it as an Excel to XML converter when you need to hand spreadsheet data to a website, an ERP, a product feed or an API that only accepts XML. Use it as an XML to Excel converter when you receive an export, sitemap, invoice or feed and want to actually read and analyze it. Either way you skip hand-editing tags or fighting with Excel’s schema mapping.
How to convert XML to Excel
- Add your XML. Upload an
.xmlfile or paste the XML code into the input box. - Choose “XML to Excel” and select the output format, XLSX (modern Excel) or XLS (legacy Excel 97–2003).
- Click Convert. The tool validates the XML and builds the worksheet.
- Download and open the spreadsheet in Excel, Google Sheets or LibreOffice Calc.
If your file fails to convert, the cause is almost always malformed XML: an unclosed tag, mismatched element names, or a stray & that should be &. Run it through our XML beautifier and validator first to spot the broken line quickly.
How to convert Excel (.xlsx) to XML
- Prepare the sheet. Put clear column names in the first row. They become your XML tag names, so avoid spaces and special characters (
unit_priceworks better thanUnit Price ($)). - Upload the .xlsx or .xls file and switch the direction to “Excel to XML”.
- Convert. Each row is written as one record and each cell as a child element. Characters such as
&,<and>are escaped for you so the output stays valid. - Download the XML and use it for imports, feeds, integrations or testing.
Working with plain text exports instead of spreadsheets? Our CSV to XML converter handles delimited files the same way.
See how nested XML becomes rows and columns
Nested XML rarely maps one-to-one onto a spreadsheet, so it helps to know what to expect. Take this small file with one order that contains two items:
<orders>
<order id="A-1001">
<customer>Northwind Trading</customer>
<item><sku>KB-100</sku><qty>3</qty></item>
<item><sku>MS-200</sku><qty>12</qty></item>
</order>
</orders>
Each repeating <item> becomes its own row. Attributes such as id and parent fields such as customer become columns, and the parent values are carried onto the rows beneath them:
| id | customer | sku | qty |
|---|---|---|---|
| A-1001 | Northwind Trading | KB-100 | 3 |
| A-1001 | Northwind Trading | MS-200 | 12 |
Repeating the parent values on every row means you can sort, filter and build pivot tables straight away, with no fill-down step.
Why use this converter instead of Excel’s built-in import?
Excel can open XML on its own. In Microsoft 365 you go to Data → Get Data → From File → From XML, and in older versions you use Data → From Other Sources → From XML Data Import. When the XML file doesn’t reference a schema, Excel infers one from the data (see Microsoft’s guide to importing XML data into Excel). That works nicely for simple, flat files.
Real-world XML is different. It has deep nesting, namespaces, optional fields and mixed content, and that’s where the built-in route gets fiddly: XML maps to manage, import errors to decode, and a result that still needs cleaning. A dedicated converter takes care of that mapping automatically, which is why people search for how to import XML code to Excel or open an XML file in Excel without the manual setup. Here’s how the two approaches compare:
| Need | Excel built-in import | This converter |
|---|---|---|
| Open a simple, flat XML file | Works well | Works well |
| Nested elements and repeating groups | Often needs a manual XML map | Flattened into rows automatically |
| Convert Excel back to XML | Requires an XML map and the Developer tab | Built-in, one click |
| Paste XML code straight from an API response | Save to a file first | Paste directly into the input |
| Works on any device with a browser | Needs desktop Excel | Yes |
Benefits of converting XML to Excel
Why bother converting at all? Because a spreadsheet makes structured data usable for everyone on your team, not only developers.
Faster analysis
Use formulas, charts and pivot tables on data that was locked inside tags.
Easier sharing
Colleagues who don’t read markup can still review the data in a familiar grid.
Quicker checking
Duplicates, blanks and wrong values stand out in a table far faster than in raw code.
Smoother migration
Clean up an export in Excel, then convert it back to XML for the next system.
Common use cases
- Product and order feeds: review WooCommerce, Google Merchant or marketplace XML feeds, edit prices in Excel, then convert Excel to XML again.
- XML sitemaps: list every URL and last-modified date to audit a site’s structure.
- Accounting and banking exports: inspect invoices, ledgers and transaction files for reconciliation.
- API and ERP data: turn XML responses or SAP/Oracle-style exports into something you can filter.
- Configuration and content files: document settings or bulk-edit content, then export back to XML.
- Learning and testing: build quick XML test data from a spreadsheet instead of typing tags.
XLSX vs XLS: which one should you choose?
| XLSX (Excel 2007+) | XLS (Excel 97–2003) | |
|---|---|---|
| Maximum rows | 1,048,576 | 65,536 |
| Maximum columns | 16,384 | 256 |
| File size | Smaller (zipped XML) | Larger (binary) |
| Best for | Almost everything today | Legacy systems only |
Pick XLSX unless an old system specifically needs XLS. The XLSX format is itself built on XML, and its structure is documented in Microsoft’s MS-XLSX specification. If your dataset is larger than the row limit, split it or export to CSV instead.
Tips for cleaner results
- Check that the XML is well-formed first. Every tag must close, and names are case-sensitive. The W3C XML standard defines the exact rules.
- Expect numbers and dates to need a check. XML carries no data types, so values like
007or2026-10-01may arrive as text. Use Excel’s Text to Columns or the number format menu if you need to calculate with them. - Use simple headers for Excel → XML. Letters, numbers and underscores make safe tag names.
- Mind optional fields. If only some records contain a field, you’ll see blank cells for the others. That’s normal.
- Keep a copy of the original file. Converting is non-destructive, but a backup costs nothing.
Related converters
Moving data between formats? These free tools pair well with this one:
- CSV to XML converter: for comma-separated exports, sitemaps and RSS feeds.
- XML to JSON converter: when the next step is a web app or API.
- JSON to Excel converter: the same idea for JSON data.
- XML minifier and beautifier: format or compress XML before you convert it.
Browse everything in our free online tools collection.
Frequently asked questions
How do I convert XML to Excel?
Upload or paste your XML, choose XML to Excel, select XLSX or XLS, and click Convert. Download the spreadsheet and open it in Excel. Repeating records become rows and element names become column headers.
How do I convert .xlsx to XML?
Put clear column names in the first row, upload the .xlsx file, switch to Excel to XML, and convert. Every row becomes a record and every cell a child element in the XML you download.
How do I open an XML file in Excel?
In Microsoft 365, go to Data → Get Data → From File → From XML and pick your file. In older versions, use Data → From Other Sources → From XML Data Import. If you’d rather skip the XML mapping, convert the file here and open the resulting XLSX normally.
How can I import XML code into Excel without saving a file?
Paste the XML code into the input box of this tool, convert it to Excel, and download the spreadsheet. It’s handy for API responses and snippets.
Will nested XML elements convert correctly?
Yes. Nested structures are flattened so child elements become columns and repeating groups become separate rows, with parent values kept alongside. Very irregular XML may need a quick review of the columns afterwards.
Why are some numbers shown as text after converting?
XML doesn’t store data types, so a converter can’t tell whether 007 is a code or a number. Change the cell format in Excel, or use Text to Columns, if you need to calculate with those values.
Is an Excel file the same as an XML file?
No. Excel files (XLSX, XLS) are spreadsheets built for Excel, while XML is a plain-text markup language for storing and exchanging data. The XLSX format uses XML internally, but you can’t use it as a normal XML data file, which is why converting is useful.
What is the difference between XLSX and XLS output?
XLSX is the modern format with room for over a million rows. XLS is the older format limited to 65,536 rows. Choose XLSX unless a legacy system requires XLS.
Is this XML to Excel converter free?
Yes, you can use it for free in your browser, on desktop or mobile, with nothing to install.