XML to CSV Converter
Convert XML to CSV format instantly
XML Input
CSV Output
What is XML to CSV Converter?
Need an XML export in a spreadsheet? Paste it here and you get CSV back. The converter looks for the repeated element that holds your records (every <subscriber> inside <subscribers>, say) and writes one row per record. A document with a single record becomes a single row.
Each record is flattened into columns. Child elements keep their name (plan), nested ones get a dotted path (address.city), and attributes get an @: @id for the record's own attributes and device@type for nested ones. If an element repeats inside a record, plain values are joined with ; in one cell, and repeated groups get numbered columns such as line.1.sku and line.2.sku. The result opens in Excel, Google Sheets or any data tool.
Values that contain commas, quotes, line breaks or leading spaces are quoted the CSV way, and quotes are doubled. Elements outside the records, such as a feed title next to the entries, are not included. Everything happens in your browser; the XML is not uploaded.
How to Use XML to CSV
Follow these steps to convert XML to CSV. Each step uses the actual buttons and panels on this page.
Paste, Upload, or Load Sample
Paste XML into the left XML Input panel, or click Upload to load a file. Click Sample to load example telecomm XML. Example:
<subscribers><subscriber id="SUB-1001"><plan>Unlimited 5G</plan><device type="smartphone"><model>Pixel 8</model></device></subscriber></subscribers>Use Clear to start fresh. The example above has a single subscriber, so it becomes one row with the columns @id, plan, device@type and device.model.
View CSV Output
The CSV lands in the right CSV Output panel while you are still typing. Columns are gathered across all the records, not just the first one, and each sits where it was first seen; a record without that field simply gets a blank cell. Malformed XML shows the parser's error in place of the CSV.
Download or Copy
Click Download to save converted.csv, or Copy to paste it straight into a spreadsheet.
When You'd Actually Use This
Data Analysis
Convert XML data exports to CSV for analysis in Excel or Google Sheets. CSV format makes it easy to filter, sort, and analyze your data.
Database Import
Import XML data into databases that accept CSV. Many databases and data tools work better with CSV format for bulk imports.
Reporting
Convert XML reports to CSV for easier sharing and presentation. CSV files are universally supported and easy to open in spreadsheet applications.
Data Migration
Migrate XML data to systems that prefer CSV format. Great for moving data between different platforms or tools.
Common Questions
Is my XML uploaded?
No. The conversion runs in your browser; your XML never leaves your computer.
How does it decide what a row is?
It walks down from the root and picks the first repeated element that has children or attributes, so <orders><order/><order/></orders> gives one row per order. If nothing repeats, the whole document (or the single record inside a wrapper) is one row.
How are attributes converted?
Each attribute gets its own column with an @: @id for an attribute on the record, price@currency for one on a nested element. Namespace declarations are skipped.
How are nested elements handled?
They are flattened into dotted column names, like address.city. Repeated plain values in one record are joined with ; , and repeated nested groups get numbered columns (line.1.sku, line.2.sku), so nothing ends up as a JSON blob in a cell.
Are values typed or reformatted?
No. Every value is copied as the text in the XML, so 02134 stays 02134 in the file. Excel may still reformat it when it opens the CSV; import it as text if that matters.
Does it work with large datasets?
Up to 5 MB of XML. Bigger files are refused to keep the page responsive; split them first or use a streaming tool such as XMLStarlet.
Other XML Tools You Might Need
Conversion is just one XML task. Here are other tools that work well together: