DeveloperKit

XML to CSV Converter

Convert XML records to CSV for Excel and Google Sheets. Free, private, and 100% in your browser.

Input XML

CSV Output

CSV output will appear here.

Convert XML to CSV Online

Product feeds, exports from ERP and CRM systems, and many APIs deliver data as XML. To analyze it in Excel or Google Sheets, or import it into a database, you need a table. This converter finds the repeated records in your XML and turns them into clean CSV rows.

Features

  • Automatic row detection

    Repeated elements such as <user> or <product> are found automatically and become rows.

  • Choose the row element

    For complex documents, type the element name that represents one row.

  • Attributes as columns

    Attributes become @-prefixed columns, such as @id, next to the element values.

  • Flatten nested elements

    Nested elements become dot-notation columns, such as address.city.

  • Any delimiter

    Comma, semicolon, tab, or pipe, with correct quoting for Excel and Google Sheets.

  • Private by design

    The conversion runs entirely in your browser. Your data is never uploaded.

XML to CSV Example

XML input
<products>
  <product sku="A-100">
    <name>Keyboard</name>
    <price>49.90</price>
    <stock><warehouse>12</warehouse></stock>
  </product>
  <product sku="B-200">
    <name>Mouse, wireless</name>
    <price>24.50</price>
    <stock><warehouse>0</warehouse></stock>
  </product>
</products>
CSV output
@sku,name,price,stock.warehouse
A-100,Keyboard,49.90,12
B-200,"Mouse, wireless",24.50,0

Each <product> becomes a row, the sku attribute becomes the @sku column, and the nested warehouse value becomes stock.warehouse.

How to Convert XML to CSV

  1. Paste your XML into the input editor, or upload an .xml file.
  2. Leave Row element empty to detect rows automatically, or type the element name.
  3. Choose a delimiter and whether to include a header row.
  4. Copy the CSV or download it and open it in your spreadsheet app.

Frequently Asked Questions

How does the converter decide what a row is?

It looks for the first element, starting from the root, that contains two or more child elements with the same name, such as several <user> elements inside <users>. Each of those becomes one row. If the detection picks the wrong element, enter the row element name yourself.

How are attributes and nested elements handled?

Attributes become columns prefixed with @, such as @id. With Flatten nested elements on, nested elements become dot-notation columns such as address.city. Repeated nested elements are written into one cell as JSON text.

Why are numbers kept exactly as written?

CSV is plain text, so values are written exactly as they appear in the XML. This keeps leading zeros, trailing zeros like 49.90, and long IDs intact. Your spreadsheet app decides how to display them.

Is my XML uploaded anywhere?

No. The converter runs entirely in your browser using JavaScript. Your XML never leaves your device.

  • XML to JSON

    Convert XML to JSON with attributes, repeated elements as arrays, and automatic number and boolean detection.

  • XML to YAML

    Convert XML documents and configs into clean, readable YAML.

  • XML to Base64

    Encode XML documents, SOAP messages, and SVG as Base64 or base64url.

  • Base64 to XML

    Decode Base64 into well-formed, validated, and formatted XML.