XML to CSV Converter

Convert list-style XML to CSV in your browser: rows auto-detected from the repeating element, columns from child tags. No upload. No upload — runs 100% in your browser

How to use this tool

  1. Paste or drop your input above.
  2. The tool processes it locally — usually instantly.
  3. Copy the output or download the result.

How the rows are found

CSV is flat; XML usually is not, so the converter looks for the flat part: the element that repeats most often as siblings of the same name. In the sample that is <employee> inside <records>. Each repetition becomes one CSV row, and the child tags of the first occurrences become the columns. The detected row element is shown in the stats line so you can confirm it picked the level you meant.

Two shapes of XML, two behaviors

When rows are made of child elements (<name>, <dept>…), the columns are the child tag names and the values are their text. When rows carry their data as attributes instead (common in feeds), the attributes become the columns. Mixed and deeply nested documents may need a manual mapping this tool deliberately does not guess — it converts what is unambiguous and tells you when it can't.

Fidelity notes

Text is entity-decoded (so &amp; becomes &) and cells containing commas or quotes are re-quoted per the CSV standard on output. CDATA sections count as element text. Comments and processing instructions are ignored, as they should be.

Frequently Asked Questions

Are my files uploaded to a server?

No. Everything on this page runs inside your browser using JavaScript and WebAssembly. Your file never leaves your device — you can even disconnect from the internet after the page loads and the tool still works.

Which element becomes a row?

The one with the most identically-named siblings — the repeating level. The stats line names it explicitly; if it chose the wrong level, the XML needs wrapping or trimming first.

What about nested child elements?

Only leaf text is exported; a child that itself contains elements contributes no cell rather than a mangled serialization.

Does it handle attributes?

Yes — for rows that have no child elements, attributes become the columns. Element-based rows use child tags instead; the tool does not mix the two silently.

Related Tools

XML FormatterLine CounterChinese Word CounterX/Twitter Character CounterYAML to JSONJSON to YAMLCSV to JSONCSV to ExcelExcel to CSVCSV to XMLHTML Entity DecoderCase ConverterKebab Case ConverterJSON DiffDOCX to TXT