Excel to XML Converter
1Add your Excel file
Drag and drop an Excel file here
or choose a file. Works with .xlsx, .xlsm and .xls.
A small workbook with two sheets, an ID with leading zeros, dates, accents, special characters and a header with symbols.
2Choose how the XML should look
Sheets and header
Element names
Structure
Output
Column names and their XML tags
Spaces and symbols become underscores, names that start with a digit get an underscore in front, and repeated names get a number.
3Check the preview
4Download
Your workbook is read and converted on your device. Nothing is uploaded to Game of Excel or any server.
The fastest way to do an Excel to XML conversion is to upload your .xlsx or .xls file to the converter above, check the preview, and download the XML. The tool turns each row of your sheet into an XML record and each column into a tag, and it works in your browser, so your workbook is never uploaded to a server.
Last updated: October 23, 2026
How to convert Excel to XML in 4 steps
- Add your Excel file. Drag in an .xlsx, .xlsm or .xls file, or load the sample workbook to see how it works.
- Choose how the XML should look. Pick the sheet (or all sheets), say whether the first row holds column names, set the root and row element names, and choose child elements or attributes.
- Check the preview. The preview updates as you change options and shows the first rows of the XML exactly as it will be saved.
- Download or copy the XML. The file is named after your workbook, for example
orders.xlsxbecomesorders.xml.
Excel to XML example: what you put in and what you get out
Say your sheet looks like this, with the column names in row 1:
| Order ID | Customer Name | Qty | Unit Price ($) |
|---|---|---|---|
| 00123 | Ayesha Khan | 2 | 9.99 |
| 00124 | José Martínez | 1 | 34.5 |
With the default settings (root element root, row element row, each cell as a child element, 2-space indent) the converter writes this:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<row>
<Order_ID>00123</Order_ID>
<Customer_Name>Ayesha Khan</Customer_Name>
<Qty>2</Qty>
<Unit_Price>9.99</Unit_Price>
</row>
<row>
<Order_ID>00124</Order_ID>
<Customer_Name>José Martínez</Customer_Name>
<Qty>1</Qty>
<Unit_Price>34.5</Unit_Price>
</row>
</root>
Notice that the leading zeros in 00123 are kept, and that Unit Price ($) became Unit_Price because XML tag names cannot contain spaces or symbols.
If you switch “Each cell becomes” to an attribute of the row, the same data becomes one line per record:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<row Order_ID="00123" Customer_Name="Ayesha Khan" Qty="2" Unit_Price="9.99"/>
<row Order_ID="00124" Customer_Name="José Martínez" Qty="1" Unit_Price="34.5"/>
</root>
How column headers become XML tag names
XML tag names have strict rules, so the converter fixes your headers automatically. Open “Column names and their XML tags” in step 2 to see every change before you download.
| Header in Excel | XML tag | Rule applied |
|---|---|---|
| Unit Price ($) | Unit_Price | Spaces and symbols become one underscore, and a trailing underscore is dropped |
| Customer/Region | Customer_Region | Invalid characters such as / become underscores |
E-mail | Hyphens, dots and underscores are allowed, so nothing changes | |
| 1st Place | _1st_Place | A name cannot start with a digit, so an underscore is added |
| Order ID (second time) | Order_ID_2 | Repeated names get a number so every tag is unique |
| (empty header cell) | column7 | Empty headers are named after their column position |
| xmlns | _xmlns | Names starting with “xml” are reserved by the XML specification, so an underscore is added |
Letters from other alphabets, such as accented letters or Chinese characters, are kept. The exception is ISO-8859-1 output, which cannot store them, so those characters become underscores in tag names. If a header is empty or has no usable characters, the column is named after its position, for example column3. The same rules apply to the root and row names you type.
Options explained
Sheet
Choose one sheet, or “All sheets in one XML file”. With all sheets, each sheet becomes its own element inside the root, named after the sheet (with the same name fixing), and its rows go inside it. Empty sheets are skipped.
First row contains column names
On by default. When it is on, row 1 provides the tag names and is not written as data. Turn it off if row 1 is data. Columns are then named column1, column2 and so on.
Root element and row element
The root element wraps the whole file and the row element wraps each record. The defaults are root and row. Rename them to match what your system expects, for example orders and order.
Child elements or attributes
With child elements, each cell becomes its own tag inside the row. With attributes, each cell becomes an attribute on the row element, which gives shorter files. Child elements are the safer choice when values are long or contain line breaks. Attributes suit short, flat values such as IDs and codes. Check your target system’s documentation to see which one it expects.
XML declaration and encoding
The declaration is the first line, <?xml version="1.0" encoding="UTF-8"?>. Leave it on unless the system you are importing into says otherwise. The encoding setting changes how the file is saved, and the declaration tells readers which one to expect. UTF-8 works for almost everything. UTF-16 is saved with a byte order mark. ISO-8859-1 cannot store every character, so characters outside it are written as numeric references such as € in values.
Layout
Pretty-print adds line breaks and indents of 2 spaces, 4 spaces or a tab, which is easier to read. Minified removes all line breaks and indentation, which gives the smallest file.
Common problems when converting Excel to XML
My tag names are different from my headers
XML does not allow spaces, most symbols, or a leading digit in tag names, so the converter replaces them. The table above shows each rule. The mapping list in step 2 shows exactly what each header turned into.
Dates do not look the way I expected
Date cells are written as the text Excel displays, for example 2026-10-02, so they match what you see on screen. To change the date format in the XML, change the number format of the column in Excel first. Other numbers are written as their stored value, so a cell showing 1,234.50 is written as 1234.5.
A formula cell is empty or shows an old value
Formulas are written as the last result that Excel saved in the file. If the workbook was never calculated and saved, that result may be missing. Open the file in Excel, let it calculate, save it, and convert it again.
Leading zeros disappeared
The converter keeps text exactly as stored, so IDs like 00123 stay intact when the cell is formatted as text. If the zeros are already gone in Excel (the cell holds the number 123 with a zero-padding number format), the converter writes 123. Convert the column to text in Excel first.
Accents or special characters look wrong in the other system
Match the encoding to what the other system expects, and keep the XML declaration on so the file says which encoding it uses. UTF-8 is the usual choice.
The file is very large
Everything happens in your browser, so very large workbooks use a lot of memory. If the tab slows down, convert one sheet at a time, or split the workbook first.
Is it safe to convert Excel to XML online?
This converter reads and converts your workbook on your own device. Your file is not uploaded to Game of Excel or to any server. The page does download one open-source library, SheetJS, from a public CDN so that your browser can read .xlsx and .xls files, and your workbook is not sent anywhere when it does.
Other ways to convert Excel to XML
- Excel’s Developer tab. Excel can export XML data, but only from cells that are mapped to an XML schema. You attach a schema, map columns to its elements, and then use Export on the Developer tab. It gives full control over the structure, but it takes more setup than this tool and fails if the map is incomplete.
- Save As “XML Spreadsheet 2003”. This saves the workbook in Excel’s own XML format (SpreadsheetML). It describes cells, rows and styles, so it is not one clean record per row.
- A script. Libraries in Python, JavaScript and other languages can read a workbook and write XML in whatever structure you need. This is the best option for repeated or automated jobs.
Going the other way? Use the XML to Excel converter.
Limits to know about
- The converter writes one flat table per sheet: one row element per spreadsheet row. It does not build nested XML from a single sheet.
- Rows with no values are skipped, and empty columns at the end of a sheet are dropped.
- Merged cells keep their value only in the top-left cell, so the other cells in the merged area are written as empty.
- Hidden rows, hidden columns and hidden sheets are included.
- Charts, images, comments and cell formatting are not converted.
- Password-protected workbooks cannot be read. Remove the password in Excel first, or use the Excel password remover.
- Characters that XML 1.0 does not allow, such as most control characters, are removed from values.
Frequently asked questions
How do I convert Excel to XML?
Upload your .xlsx or .xls file to the converter at the top of this page, choose the sheet and the element names, check the preview, and click Download XML. You can also copy the XML to the clipboard.
Is my Excel file uploaded to a server?
No. The file is read and converted in your browser, on your device. The page loads the open-source SheetJS library so your browser can read Excel files, but your workbook itself is not sent anywhere.
Which Excel formats can I convert?
The converter reads .xlsx and .xlsm workbooks and older .xls workbooks. For other formats, open the file in Excel and save it as .xlsx first.
How are Excel column headers turned into XML tag names?
Spaces and symbols become underscores, a name that starts with a digit gets an underscore in front, repeated names get a number, and empty headers are named column1, column2 and so on. The “Column names and their XML tags” list in step 2 shows the result before you download.
Can I convert more than one sheet?
Yes. Pick a single sheet from the Sheet list, or choose “All sheets in one XML file” to get one XML file where each sheet has its own element.
What is the difference between Excel to XML and XML to Excel?
Excel to XML turns the rows and columns of a spreadsheet into XML records, which is what this page does. XML to Excel does the reverse: it reads an XML file and lays its records out as rows and columns. For that, use the XML to Excel converter or read how to open an XML file in Excel.
Why does Excel say my XML map cannot be exported?
That message comes from Excel’s own export on the Developer tab, which only works on cells mapped to an XML schema and refuses to export when the map is incomplete or the table does not match it. This converter does not need a schema or a map. It builds the XML directly from your rows and columns.
Get more done in Excel with AI
If you use ChatGPT, Copilot or Claude alongside Excel, grab the free ChatGPT Prompts for Excel pack from Game of Excel.
