XML to CSV Converter

Convert XML to CSV in your browser. Pick which element is a row; nested tags and attributes become columns like customer.name and order@id.

Loading tool…

How it works

Paste XML

Paste XML, open a file up to 100 MB, or drop one on the box. It is read in this tab and never uploaded.

Check the rows

The element that repeats is picked as the row. Pick another under Rows if you want, and preview the first 50 rows.

Copy or download

Copy the CSV or download CSV or TSV, with a BOM for Excel if you need one.

How are columns named?

By path from the row element: nested tags are customer.name, attributes are order@id and customer.@type. A tag that repeats becomes tag.0, tag.1 in every row. Prefixes stay as written, like g:price; xmlns declarations are not data and get no column. A field missing from a row leaves its cell empty, so nothing shifts.

Source: Namespaces in XML 1.0

What about mixed text, empty tags and CDATA?

A tag with both text and child tags, like <p>Hello <b>world</b>!</p>, becomes one cell with the text in order: Hello world!. A row element keeps its child columns too. Empty tags, missing tags and whitespace-only text are all empty cells. CDATA becomes plain text, entities are decoded, and comments are dropped.

Source: XML 1.0 §2.7 CDATA · §3.1 Empty tags

Why is my XML rejected?

It must be well-formed: one root element, every tag closed, prefixes declared. Besides &amp; &lt; &gt; &quot; &apos;, named entities like &nbsp; need a declaration, and documents that declare entities are refused, because expanding them can freeze the tab. Use numeric references like &#160; instead. External DTDs are never fetched.

Source: §2.1 Well-formed · §4.6 Predefined entities

Why do accents look wrong in Excel?

Microsoft says Excel opens a UTF-8 CSV normally if it was saved with a byte order mark (BOM); otherwise it has to be imported. Tick "Add BOM for Excel" before you download.

Source: Microsoft: opening CSV UTF-8 files in Excel

Need data from a website first?

Browser Use agents open pages in a real browser, including dynamic ones, and return structured data.