AnyFormat

00 XML → CSV

XML to CSV

Finds the repeating element and makes it the rows.

01XML in
02CSV out
03Options 9

XML cannot express "a list of one". Always-arrays gives every consumer a consistent shape at the cost of extra brackets.

Attributes are prefixed with @ so they cannot collide with child elements.

Removes the outermost wrapper so the result starts at the useful data.

Flattening turns {"address":{"city":"Oslo"}} into an address.city column.

  • No upload The conversion runs in this tab. Your file never travels — not to us, and not to the advertising.
  • No sign-up, no email, no daily cap There is no account system to sign up to.
  • No size limit we invented Only your device's memory — about ~2 GB on a desktop browser, ~400 MB on a phone.
  • Turn your Wi-Fi off and convert anyway The conversion needs nothing but this page. Ads will not load without a connection; your file will still convert. That is the whole claim, and it takes five seconds to check.

Drop an XML file and get a table. The hard part is deciding which element is a row, and that is done for you: the tool finds the repeating element inside the document and uses it, unwrapping the containers above it.

How the rows are chosen

Almost all data XML looks like <orders><order>…</order><order>…</order></orders>. The repeating <order> is the row and <orders> is scaffolding. The tool searches the document breadth-first for the first repeating element whose children look like fields, uses it, and tells you what it picked.

If the document has exactly one record, the wrapper elements are peeled off so the columns are the fields rather than the path to them.

Attributes become columns

An attribute becomes a column prefixed with @<order id="7"> gives an @id column. Turn attributes off if the document uses them for metadata you do not want in the table. Nested child elements become dotted columns in the same way as nested JSON.

Repeated children have nowhere to go

An order with three line items is a natural XML shape and an unnatural table. Where a chosen row element has repeated children, they are numbered into columns — item.1.sku, item.2.sku — which means the header is as wide as the largest order in the file and most rows are mostly empty. That is the honest representation, but it is usually a sign the wrong element was picked as the row: choosing the line item as the row instead, and letting the order details repeat down the column, gives a table you can actually pivot.

Questions

It picked the wrong element as the row.
Convert to JSON first, trim to the array you want, then use JSON to CSV. That two-step gives you full control over which node is the record set.
Why do some columns start with @?
Those came from XML attributes. Turn “Keep attributes” off to exclude them.
Is my data uploaded anywhere?
No. The conversion runs as JavaScript inside this tab. Open your browser's Network panel and convert something — you will see no request carrying your data, because there is no server to send it to. You can also turn your Wi-Fi off and convert anyway.