All processing happens in your browser. Your file is never uploaded to any server.
Paste XML
Upload File

Click to select or drag & drop an .xml file


    
What this conversion decided

All conversion runs in your browser. Your data is never uploaded to any server.

XML to CSV

This free XML to CSV converter turns XML into CSV entirely in your browser. Paste your XML or upload an .xml file, pick which element becomes a row, read the CSV, and download a .csv file. Nothing leaves your device, and there is no sign-up.

XML is a tree, CSV is a table, so every conversion has to answer one question before anything else: which element is a row? Most tools guess and never tell you what they guessed. Get that wrong and the table is wrong — too few rows, or columns that mix unrelated levels. This page lists every repeating element it found in your file, with how many times each one appears, and lets you choose. It then shows you the exact columns that choice produces, and reports every cell where it had to make a decision.

How to use this XML to CSV converter

What this tool supports

Picking the row element instead of guessing

The row element is the repeating element that becomes one CSV row. This page does not guess silently: it enumerates every element path in your document, counts it, and shows the list. A path that appears once is a container or a leaf; a path that appears many times is your data. Once you pick one, the header row, the row count and the column list are rebuilt for that choice only.

Where columns come from

In your XMLColumn it becomesNote
<name>Widget</name>nameleaf element text
<product id="A1">@idattribute, marked with @ so it never collides with an element
<tags><tag>metal</tag></tags>tags.tagnested element, flattened with dot notation
a field some records do not havefilled with an empty cellthe column set is the union of every record, in the order the columns first appear
two <tag> childrenone cell holding both, or extra rowsyour choice under Repeated child

Quoting, and why a cell gets quoted

CSV is not "values joined by commas". A value that contains the delimiter, a double quote, a line break, or leading and trailing whitespace has to be wrapped in double quotes, and any double quote inside it has to be doubled. This page applies that rule cell by cell and then lists every cell it quoted, with the reason.

Value in your XMLWritten asWhy
Widget, large"Widget, large"it contains the delimiter
Gadget "pro""Gadget ""pro"""it contains a double quote, which is doubled
text with a line breakwrapped in quotes, break keptit contains a line break
 padded " padded "it starts or ends with whitespace, which quotes preserve
19.9919.99nothing to escape, left bare

Delimiters, line endings and Excel

Choose comma, semicolon or tab. If the file is going into Excel on Windows, switch line endings to CRLF and tick Add BOM so Excel reads UTF-8 correctly instead of guessing a legacy code page. Text values are written exactly as they appear in the XML — no number or date is reformatted, because CSV has no type system.

Privileges and limits

Parsing happens in your browser with the browser's own XML parser. No file is uploaded, nothing is stored after you close the tab, and there is no account. Because everything runs in your browser's memory, very large files (tens of MB) depend on your device; typical exports and feeds convert instantly.

What this tool does not do

Frequently asked questions

Is this XML to CSV converter free?

Yes. No account, no sign-up, no conversion limit, and no upload — the work happens in your browser.

Is my XML uploaded anywhere?

No. The file you pick is read with the browser's own File API and parsed in the page. There is no request that carries your data.

How does it decide what a row is?

It does not decide — you do. The row element list shows every element path in your document with its occurrence count. Pick the one that represents a record and the table is rebuilt for it.

Why are some cells empty?

Because that record does not have that field. The column set is the union of all records, so a record missing a field gets an empty cell. The report lists which rows were missing which columns.

How do I get attributes into the CSV?

Leave Attributes on Include as @name. Each attribute becomes its own column named with a leading @, so id="A1" becomes the column @id.

A record has two values for the same tag. What happens?

By default they are joined into one cell separated by | , and the report counts how many cells were joined. Switch Repeated child to Split into rows and the record is written as several rows instead.

Why did a value get surrounded by double quotes?

Because it contains the delimiter, a double quote, a line break, or leading or trailing whitespace. Any double quote inside the value is doubled. The report lists each quoted cell with the reason.

My CSV looks wrong in Excel. What should I change?

Switch line endings to CRLF and tick Add BOM. If your locale expects semicolons, change the delimiter to semicolon.

Does it handle nested XML?

Yes. Nested elements are flattened into dotted column names such as tags.tag. You can switch to direct children only, or keep the raw inner XML as the value.

Is there a file size limit?

There is no imposed limit. Parsing happens in your browser's memory, so extremely large inputs (tens of MB) may be slow depending on your device. Typical exports and feeds convert instantly.

Why does it say my XML is not well-formed?

The message names the line where the parser stopped. Common causes are an unclosed tag, a stray &, or text outside the root element. Fix that line and it converts.

What if I need the other direction, or another format?

For the other direction use the CSV to JSON or Excel to CSV pages depending on your source. If you want the XML as JSON instead of a table, the XML to JSON converter keeps the tree, and JSON to XML goes the other way. To turn a table into a spreadsheet file, use CSV to Excel.