XML to CSV Converter

Turn XML records into a CSV table for spreadsheets

CSV

Everything happens in your browser: your text is never sent anywhere.

How to convert XML to CSV

Step 1

Paste your XML or open an XML file

Step 2

Choose the separator for your spreadsheet

Step 3

Copy the table or download it as a .csv file

From XML elements to rows and columns

Most XML data is a list of records: book elements in a catalog, item elements in a feed, or the rows of an export. The converter finds these repeated elements and makes each one a row of the table, and the line under the result says where the rows were taken from, such as catalog.book. The child elements and attributes of a record become the columns: an attribute is written with @ before its name, as in @id, nested elements get names joined by dots, such as author.name, and repeated ones are numbered. The columns are those of all the records, so a field that only some records have still gets its column, left empty where it is missing.

Under “Separator” choose a comma, a semicolon, which spreadsheets expect in many European languages, a tab or a vertical bar, and untick “First row is column names” for a table without a header row. Fields with the separator, quotes or line breaks are put in quotes, so the table opens correctly, and the downloaded .csv file is marked as UTF-8 for Excel, which keeps letters such as é and Ж intact. Errors in the XML are shown with their line and column. With “From” and “To” you can also convert XML to JSON, or CSV to XML.

Was AnyTextEditor useful to you?

Hello. We tried very hard to create a convenient website that we use ourselves. If you liked any of our tools and editors, add it to your bookmarks, because it will be useful to you more than once. And don't forget to share on social media. We will be better for you.