FormatterHQ

XML to Excel Converter

Create an Excel workbook from XML records. Each repeated element becomes a row, attributes and child elements become typed columns, and you name the sheet.

Input XML
Output CSV
Ready.

How to use the XML to Excel Converter

  1. Paste XML into the input editor, upload an .xml file, use Load URL, or click Sample.
  2. Set the Attribute prefix, Detect numbers & booleans, Sheet name and Flatten nested objects.
  3. Click Convert to Excel. The output panel shows a CSV preview.
  4. Click Download to save the .xlsx file.

Convert XML to Excel with real numeric cells

Excel can open some XML files directly, but the result depends on the file's structure and often needs an XML map or several import steps. This XML to Excel converter takes a simpler route: it finds the repeating records in your XML, lays them out as a table and builds an .xlsx workbook in your browser. Numbers and booleans are written as real typed cells, so sums, filters and charts work straight away.

Example

<inventory>
  <item sku="WM-204">
    <name>Wireless Mouse</name>
    <price>24.99</price>
    <stock>120</stock>
    <active>true</active>
  </item>
  <item sku="KB-11">
    <name>Keyboard</name>
    <price>49.00</price>
    <stock>0</stock>
    <active>false</active>
  </item>
</inventory>

The preview shows the sheet as CSV:

@sku,name,price,stock,active
WM-204,Wireless Mouse,24.99,120,true
KB-11,Keyboard,49,0,false

In the downloaded workbook, price and stock are numeric cells and active is a boolean column. The 49.00 appears as 49 because it is stored as a number; apply a number format in Excel to show two decimals.

Options explained

  • Attribute prefix – attribute columns are named with this prefix (@sku). Clear it for plain headers.
  • Detect numbers & booleans – on by default. Leading-zero values such as 00123 remain text either way. Untick the option to store every cell as text, which is safer when codes look numeric but must not be summed or rounded.
  • Sheet name – the tab name in the workbook. Excel allows at most 31 characters and no \ / ? * [ ] :; the converter removes invalid characters and shortens long names.
  • Flatten nested objects – nested elements become columns like supplier.name; untick it to put nested content in one cell as JSON text.

What the workbook looks like

The file contains one sheet with a header row and one row per record. Column widths are set from the content (capped so very long text does not produce enormous columns), so the sheet is readable as soon as you open it. The download is named after the tool, and you can rename it freely. Because the file is created by a spreadsheet library rather than by renaming a CSV, Excel opens it without any import wizard or delimiter question.

Edge cases

  • Single versus repeated children. A child element that appears once in one record and several times in another produces a mix of plain and numbered columns (tag, tag.0, tag.1). Review such columns after opening the file.
  • Dates are written as text exactly as they appear in the XML. Use Excel's text-to-date tools if you need date cells.
  • Mixed content, like paragraphs with inline tags, ends up as plain text without the inline markup.
  • Invalid XML is reported with line and column; no partial workbook is produced.

Related tools

If you only need a text file, XML to CSV is lighter. For JSON sources, JSON to Excel builds the same kind of workbook, and to open an existing spreadsheet in the browser, use the Excel viewer.

Privacy

The workbook is generated in your browser with a JavaScript spreadsheet library; your XML is not uploaded. Load URL and Save & Share are the only features that use our server.

Frequently asked questions

Why does the output show CSV if I asked for Excel?
The output panel is a text preview of the sheet. The .xlsx workbook is created at the same time and saved when you click Download.
Will numbers be numeric in Excel?
Yes, with Detect numbers & booleans on. Values such as 24.99 become number cells, true and false become booleans, and values with leading zeros stay text.
Can I convert XML with several different record types?
The converter builds one table from the main list of repeated elements. Convert each section separately if your XML contains unrelated lists.
Does the file work in Google Sheets and LibreOffice?
Yes. It is a standard .xlsx workbook that opens in Excel, Google Sheets, LibreOffice Calc and Numbers.

Last updated September 26, 2026

Related tools