Browser-local data converter

XML to CSV Converter

Turn XML records into a flat CSV table, with repeated elements expanded into rows and attributes kept as columns.

XML to CSV

Processed in this browser
Paste XML
Ready to copy

How to use it

A short path from source data to a usable local result.

01

Add XML

Paste a document whose root element holds one child element per record.

02

Flatten it to rows

Repeated child elements become extra rows and attributes keep their own columns.

03

Take the CSV

Copy the table or download it as converted.csv.

Common questions

Details that matter when moving data between formats.

How are attributes named?

An attribute becomes a column prefixed with @, so id on a record arrives in a column called @id and an attribute on a nested element becomes item.@sku.

What happens to repeated elements?

When one record holds two item elements, that record is written as two rows and the shared values such as the customer name are repeated on both.

Is the XML uploaded?

No. The document is read by the browser XML parser in this tab and is never sent to a server.

What if the XML is malformed?

The page reports the parser message with the line and column where it stopped instead of writing a partial table.

Related tools

Other focused converters that are already available.

When is XML to CSV useful?

XML to CSV is the conversion you reach for when a feed, an export, or a SOAP response has to become something a spreadsheet or a database loader can read. XML describes a tree and a table describes rows, so the job here is to pick one level of the tree as the record, turn its children into columns, and keep every value that would otherwise be lost. The document is handed to the browser's own XML parser inside this tab, which matters when the file holds order details, addresses, or anything that came out of a customer system. Nothing is posted to a server and nothing is kept after the tab closes.

The rules are deliberately plain. The child elements of the root are treated as records. A leaf element becomes a column named after its path, so a sku inside an item becomes item.sku. An attribute becomes its own column prefixed with @, so id on the record gives @id and an attribute on a nested element gives item.@sku. When one record holds several elements with the same name, that record is expanded: two item elements produce two rows and the shared values such as the customer name are repeated on both. Columns are collected across every record in the order they first appear, so a field that only shows up in the last record still gets a column and the earlier rows stay empty.

Watch the places where a flat table starts to lie. Deeply nested documents produce long dotted names and many empty cells, which usually means the data wants several tables rather than one. Mixed content, where an element holds both text and child elements, loses that text because only element content is mapped. Namespaces stay in the element name exactly as written, so a prefixed name such as ns:price becomes a column with that prefix. A large document is parsed in one pass, so the tab can pause for a moment; if that happens, split the file by record and convert each part on its own.