XML To CSV
Paste XML and turn it into a CSV file you can open in a spreadsheet. Repeated elements become rows, their child elements become columns, and values are quoted the way CSV needs. Everything runs in your browser, so your data never leaves your device.
Your XML
Your CSV
Paste XML on the left, then tap Convert to CSV.
Worked Example
Take a small product catalog with three products, each with an id, a name, and a price. The converter finds the three repeated product elements and turns them into three rows, with id, name, and price as the column headers. The first data row is 101, Canvas Tote Bag, 24.99; the second is 102, Stainless Steel Bottle, 19.50; and the third is 103, Desk Lamp, 39.00. Open the downloaded file in a spreadsheet and each value lands in its own cell.
Common Mistakes
Pasting XML with a missing closing tag. XML is strict: every opening tag needs its matching closing tag, and one missing tag stops the whole file from parsing. If the tool reports an error, check the end of the file first, then look for a tag that was opened twice or closed with the wrong name.
Expecting nested lists to flatten into extra columns. Only the first level of repeated elements becomes rows, and only their direct child elements become columns. Deeper nesting is read as plain text inside its parent cell, so a list of tags inside one product stays in one cell.
Forgetting that CSV quoting matters. A value with a comma in it, like “Widget, Deluxe”, must be wrapped in quotes or the spreadsheet will split it into two cells. This tool quotes those values for you, and doubles any quote marks inside a value.
Mixing different child elements across rows. If one product has a colour element and the next one does not, the column still appears, and the row without it gets an empty cell. That keeps every row lined up with the header, so sort the columns before you compare rows.
Related Tools
Go the other way with the JSON to CSV Converter, tidy a query with the SQL Formatter, make a unique id with the UUID Generator, or browse every tool in the Tools hub.
Frequently Asked Questions
How does the converter decide what becomes a row?
It looks at the children of the top element and finds the tag name that repeats. Each element with that tag becomes one row, and the names of their child elements become the columns. If nothing repeats, the top element itself becomes a single row.
What happens to values with commas or quotes?
They are quoted following the CSV rules. A value with a comma, a quote mark, or a line break is wrapped in double quotes, and any quote mark inside it is doubled. A plain value is left as it is.
Why does my XML show an error?
The XML is not well formed, which usually means a missing closing tag, a mismatched tag name, or a stray character like a bare less-than sign in the text. Fix the first error the file has and try again, because one bad tag stops the whole parse.
Does my data leave my browser?
No. The conversion happens entirely in your browser with the built-in XML parser. Nothing you paste is uploaded or stored anywhere.
Can I convert XML with attributes?
Attributes are not included in the output. Only element names and their text content become columns and values, so an id stored as an attribute will not appear. If you need it, move it into a child element first.