Excel to XML converter

Drop a .xlsx or .xls file and get well-formed XML, one element per row. Your spreadsheet never leaves your device.

From cells to elements, entirely in your browser

Plenty of older systems still speak XML: procurement platforms, publishing pipelines, government gateways, legacy imports. When one of them asks for your spreadsheet as XML, most online converters want you to upload the file to their server first. This tool does not. The workbook is opened and converted by JavaScript running on your own machine, so your spreadsheet never leaves your device, and once the page has loaded the converter works with no internet connection at all.

The output uses a simple, predictable shape. A single <rows> element wraps the sheet, each spreadsheet row becomes a <row>, and each cell becomes a child element named after its column header. Flat and boring, which is exactly what you want from machine-readable XML: no schema required, easy to walk with XPath, and any parser can consume it.

How column names become element names

XML element names are much stricter than spreadsheet headers. They cannot contain spaces, brackets, currency symbols or most punctuation, and they cannot start with a digit. The converter cleans each header the same way every time: runs of invalid characters become a single underscore, leftover underscores at the ends are trimmed, accents are stripped to plain letters, and a leading underscore is added if the result would start with a digit. Blank headers get generated names like column_3 so no data is dropped. The values inside the elements are never altered, only the names.

Header: Unit price (£)
Element name: Unit_price. The space run and the bracketed symbol collapse to underscores, then trailing underscores are trimmed
Header: 2024 sales
Element name: _2024_sales, because an XML name cannot start with a digit

Escaping, and the Excel date gotcha

Three characters are special in XML text: the ampersand and the two angle brackets. The converter escapes them as &amp;, &lt; and &gt;, so a cell containing Marks & Spencer produces well-formed XML that reads back as exactly the original text. Without that escaping, one stray ampersand in a company name would make the entire file unparseable.

Cell value: Marks & Spencer
Stored in the XML as Marks &amp; Spencer, and read back by any parser as Marks & Spencer

Dates need care too, because Excel does not store them as dates at all. Every date is a serial number counting days, and only the cell's display format makes it readable on screen.

date = 30 December 1899 + serial number in days

Serial 45658 is 1 January 2025, and 46245 is 11 August 2026. A careless converter exports those raw serials, leaving you with five-digit numbers where your dates were. This tool detects date cells and writes them using the display format saved in your file, so the XML contains readable dates. The style follows whatever the spreadsheet specified, so check a row or two if the file came from a machine with different regional settings.

Headers, sheets and what to expect

The first row of the sheet is treated as the header row and supplies the element names; every row after it becomes one <row> record. Empty cells are included as empty elements rather than skipped, so every record has the same fields, which import routines tend to appreciate. If the workbook has more than one sheet, buttons appear so you can convert each sheet separately, up to 8, and the download is named after the file and sheet.

Formulas are exported as their calculated values, and formatting does not survive the trip, the same as any conversion to a plain-text format. If the system you are feeding wants JSON rather than XML, the Excel to JSON converter linked below does the same job with the same privacy: everything in the browser, nothing uploaded.

Frequently asked questions

Is my spreadsheet uploaded anywhere?

No. The file is opened and converted entirely in your browser with JavaScript. It never leaves your device, nothing is stored, and once the page has loaded the converter works without an internet connection.

What structure does the XML use?

A rows element wraps the whole sheet, each spreadsheet row becomes a row element, and each cell becomes a child element named after its column header. It is a simple, flat, predictable shape that XML tools and importers can consume without a schema.

Why did some of my column names change?

XML element names are strict: no spaces, no brackets, no symbols, and they cannot start with a digit. Invalid characters are replaced with underscores and a leading underscore is added where needed, so Unit price becomes Unit_price and 2024 sales becomes _2024_sales. The values themselves are never altered.

What happens to special characters in my data?

Values are escaped the standard XML way, so an ampersand becomes amp entity, and angle brackets become lt and gt entities. Any XML parser turns them back into the original characters when it reads the file, so nothing is lost.

Why do dates come out readable instead of as numbers?

Excel stores dates as serial numbers, such as 45658 for 1 January 2025, and only the display format makes them readable. This tool detects date cells and writes them using the format saved in your file, so the XML contains dates you can read rather than bare serials.

Related tools