1xA2ZOne Data. Any Format.
Live syncLocal-first · no data upload

Convert XML to CSV

Paste tabular XML into the Quick paste box, the grid on the left shows columns taken from the child tag names, and the CSV tab on the right gives you the file. You choose the delimiter and BOM so Excel opens it correctly.

Runs entirely in your browser. Your data is never uploaded. Tiếng Việt

01

Spreadsheet

SheetsExcelCSVTSV
✦ Quick pasteSheets / Excel, CSV, TSV, Markdown, JSON, HTML, LaTeX, wiki…
0 rows · 0 columnsSelected cell: A1
02

Live Output

Markdowntwo-way
SyncedEdit directly; the table on the left updates itself
0 characters
Every change is processed right in your browserReady · LocalUTF-8 · by xuanhieu.org

When you need to convert XML to CSV

You convert XML to CSV when you take data from accounting software, a product feed or an old system and need it in Excel or in a tool that only reads tables. Real XML can nest deeply while CSV is flat, so the tool reads only XML that already looks like a table: one root element holding many row elements, each child of a row being a column. Attributes and nested structure are not kept.

How to do it

  1. Paste the XML into the Quick paste box and press Load into table ↵, or press Import file and choose an .xml file.
  2. Check the grid on the left. Each child of a row is a column and the tag name is the column name. An empty or skewed grid means the root does not hold row elements the way the tool expects.
  3. Open the CSV tab on the right (selected on this page) and then ⚙ Options to choose Delimiter and Add UTF-8 BOM.
  4. Press Copy result or Download file to get a .csv file.

A real example

The tag Order_ID becomes a column header. 00123 keeps its leading zeros, the cell Includes "gift wrap" is wrapped in double quotes with the inner quotes doubled, and the delimiter is a comma here because the example is in English.

Input · XML

<?xml version="1.0" encoding="UTF-8"?>
<rows>
  <row><Order_ID>00123</Order_ID><Customer>Anna Reed</Customer><Amount>450.00</Amount><Note>Rush delivery, call first</Note></row>
  <row><Order_ID>00124</Order_ID><Customer>Ben Cole</Customer><Amount>1250.00</Amount><Note>Includes &quot;gift wrap&quot;</Note></row>
  <row><Order_ID>00125</Order_ID><Customer>Cara Lin</Customer><Amount>299.50</Amount><Note></Note></row>
</rows>

Result · CSV

Order_ID,Customer,Amount,Note
00123,Anna Reed,450.00,"Rush delivery, call first"
00124,Ben Cole,1250.00,"Includes ""gift wrap"""
00125,Cara Lin,299.50,

Options worth changing

Delimiter
A comma is the common standard. A semicolon opens in the right columns in Excel on many locales where the decimal separator is a comma, and a tab suits systems that read TSV.
Add UTF-8 BOM
Turn it on so Excel recognises UTF-8 and shows accented text correctly. Turn it off when the file goes into a program that rejects a BOM.
Quote characters
By default a cell is quoted only when needed. Choose quoting every cell if the receiving system demands it.
Formula guard
Adds an apostrophe before cells starting with = + - @ so Excel does not run them as formulas. The exported value changes as a result.

Common problems

Limits

Frequently asked questions

What if my XML has attributes?

Attributes are ignored. Only the child element content of each row is read. Turn attributes into child elements before pasting if you need them.

Can I choose which columns to export?

Yes. Delete a column or rename it in the grid before copying, so the CSV holds only the columns you keep.

Can it read a large XML file?

Yes, up to 20 MB and 10,000 rows. Larger files need trimming at the source.

Is my data uploaded?

No. The XML is read and the CSV is built in your own browser.

Related conversions

1xA2Z · Guide

Table statistics