How to Convert XML Records to CSV or Excel
Convert XML data with repeated records to CSV and Excel formats privately in your browser.
Filelume Editorial
Published 2026-07-24
XML files often contain structured records — lists of products, users, transactions, or measurements. Converting these records to a spreadsheet format makes the data easier to analyze. Filelume detects repeated XML elements and converts them to CSV or XLSX in your browser.
When is XML tabular?
XML becomes tabular when it contains repeated sibling elements with the same structure. For example:
<products>
<product>
<name>Widget A</name>
<price>19.99</price>
<stock>150</stock>
</product>
<product>
<name>Widget B</name>
<price>29.99</price>
<stock>85</stock>
</product>
</products>
Each <product> element is a record. Each child element (<name>, <price>, <stock>) is a field. Filelume detects this pattern and offers a Table view alongside the Tree view.
How to convert XML to CSV or XLSX
- Open the XML Viewer.
- Load your XML file.
- If repeated records are detected, the Table tab becomes available.
- Click Export CSV or Export XLSX.
The export uses the currently selected dataset. If your XML contains multiple record groups, you can choose which one to export.
How XML maps to a table
Filelume uses these rules when converting XML to a flat table:
- Repeated sibling elements become rows.
- Child elements become columns using dot notation for nesting.
- Attributes become columns prefixed with
@. - Missing values become null cells.
- Unrelated datasets are separated into different sheets (XLSX).
CSV export details
- UTF-8 encoding with optional BOM
- Proper quoting for fields containing special characters
- Formula-injection protection enabled by default
- CRLF line endings for compatibility
XLSX export details
- Genuine
.xlsxworkbook format - Multi-sheet support for multiple datasets
- Safe sheet names with length and character limits
- Header row frozen for easy scrolling
- Formula-like strings preserved as plain text
Not all XML is tabular
Many XML files represent hierarchical data without repeated records — configuration files, for example. In these cases, Filelume keeps the Tree and Formatted views available. CSV and XLSX exports are enabled only when a meaningful record structure exists.
Security
Filelume blocks DOCTYPE and ENTITY declarations before parsing. The parsed data is never rendered as raw HTML. Formula-injection protection ensures that exported spreadsheets are safe to open.
Start converting XML
Open the XML Viewer and load your XML file. If it contains repeated records, the Table view and export options appear automatically.
All processing happens locally in your browser. Your files never leave your device.
Try the related tool
Open in Filelume