XML to CSV Converter

Choose the repeating element that holds each record and get one CSV row per record. Your file stays in your browser.

  • Runs in your browser
  • No sign-up
  • No watermark

XML files such as product feeds, exports and RSS contain the same element many times. This tool finds the elements that repeat, picks the most likely record automatically, and lists the others so you can change it. Each record becomes one row. Attributes become columns with an @ prefix, nested child elements get dotted column names such as address.city, and CDATA is read as ordinary text.

If records have different fields, the CSV has the union of all columns, in the order they first appear, and a record is left blank where it lacks a field. If the same child element appears more than once inside a record, the values are joined with a semicolon, or spread over numbered columns if you prefer. Mixed content (text between child elements) is kept in a #text column. The file must be well-formed XML; if it is not, you are told where the parser stopped. Files up to 30 MB are accepted and nothing is uploaded.

How to use XML to CSV

  1. Choose an XML file, or paste the XML into the box.
  2. Check the record element the tool detected, or pick another from the list.
  3. Set the delimiter, attribute and namespace options.
  4. Check the preview, then Copy or Download the CSV.

Frequently asked questions

Is my XML uploaded anywhere?

No. The file is read and converted in your browser using its built in XML parser.

How does it choose the record element?

It counts every element that repeats, ignores plain text only elements when a record shaped one exists, and picks the one that appears most often. You can pick any other repeating element from the list.

What if records have different fields?

The CSV has every column that appears in any record, in the order of first appearance. A record that lacks a field gets a blank cell in that column.

How are attributes and nested elements written?

Attributes on the record become columns named @name. A nested element becomes a column named after the path, for example address.city, and its attributes are named address.@type. Namespace prefixes are dropped unless you ask to keep them.

What happens to repeated children inside one record?

By default the values are joined into one cell with a semicolon and a space. You can choose separate numbered columns such as author.1 and author.2 instead.

What does an error message mean?

The XML is not well-formed, for example an unclosed tag, a stray ampersand or a missing quote. The tool shows what the parser reported and roughly where, but it cannot repair the file for you.

Are there limits?

Files up to 30 MB, and up to 1,000 columns. XML schemas, DTD validation and XSLT are not supported. Namespace declarations themselves are not written as columns.