Our Network


Coming Soon


Coming Later

XML to CSV Converter

world's simplest csv tool

Free online XML to CSV converter. Just upload your XML file in the form below and it will automatically get converted to a CSV file. In the tool options, you can customize the CSV output format by specifying the character that separates field values (by default it's a comma) and a character that's used to quote field values (by default, it's a double-quote symbol). Created by programmers from team Browserling.

᠎᠎᠎        Tool Options

Field Delimiter

Configure CSV value separator.
(Default is a comma.)

Field Quoting

Configure CSV value quoting
character. (Default is quotes.)
Activate this option to enclose
all values in the output CSV in
quote marks (specified above).

What is a XML to CSV Converter?

This tool transforms Extensible Markup Language (XML) data into Comma Separated Values (CSV) data. The XML format is much more complex and less readable than CSV as it uses tags to define the structure and values of the data. It's better suited for storing and exchanging structured data (such as keeping a database backup or exporting WordPress blog posts), while CSV is better for data analysis and visualization as it's column-and-row based. To do the conversion, the input XML file should have a two-level structure with column values enclosed in tags. For example, a valid XML file would be <People><Person><Name>John</Name><Age>30</Age></Person></People>, where "Name" and "Age" values become CSV headers, and "John" and "30" become CSV fields. The <People> is the root element and can also be named <Root> or <root>. Additionally, you can customize the CSV column delimiter in the option. Typically, CSV uses a comma as a delimiter, but you can use other symbols, such as a semicolon or vertical bar. You can also set the default quotation character in the options and optionally enclose all output CSV data values in these quotes. To convert CSV data back into an XML file, you can use our Convert CSV to XML tool. Csv-abulous!


XML to CSV Converter Examples

Click to try!

Convert Meals Data from XML to CSV

This example transforms an XML file containing a two-day menu into tabular CSV data. It converts XML tag names into CSV column headers and XML tag values into CSV values, which are separated with commas. The resulting CSV file has three columns: "Breakfast", "Lunch", and "Dinner", with two dishes listed under each column for each day.

<Meals> <Meal1> <Breakfast>Omelette</Breakfast> <Lunch>Salad</Lunch> <Dinner>Lasagna</Dinner> </Meal1> <Meal2> <Breakfast>Oatmeal</Breakfast> <Lunch>Burrito</Lunch> <Dinner>Steak</Dinner> </Meal2> </Meals>
Breakfast,Lunch,Dinner Omelette,Salad,Lasagna Oatmeal,Burrito,Steak
Required options
These options will be used automatically if you select this example.
Configure CSV value separator.
(Default is a comma.)
Configure CSV value quoting
character. (Default is quotes.)
Activate this option to enclose
all values in the output CSV in
quote marks (specified above).

Extract Dates from XML

This example extracts date information from an XML document and converts it into CSV format. The input document has three rows of data (row-0, row-1, row-2) and each row has "Year", "Month", and "Day" XML keys. These keys get transformed into three columns ("Year", "Month", and "Day") in the output CSV, with the values of these keys corresponding to CSV fields. Additionally, this CSV file is created using an unusual format, which uses periods instead of commas as field separators.

<root> <row-0> <Year>2020</Year> <Month>03</Month> <Day>12</Day> </row-0> <row-1> <Year>1999</Year> <Month>10</Month> <Day>26</Day> </row-1> <row-2> <Year>2031</Year> <Month>07</Month> <Day>14</Day> </row-2> </root>
Year.Month.Day 2020.03.12 1999.10.26 2031.07.14
Required options
These options will be used automatically if you select this example.
Configure CSV value separator.
(Default is a comma.)
Configure CSV value quoting
character. (Default is quotes.)
Activate this option to enclose
all values in the output CSV in
quote marks (specified above).

Print Product XML as CSV

This example converts a complex XML data structure containing product, brand, and price information into a simple CSV text file. The first line of the output file contains the CSV column headers and the following lines contain the data. For more consistent formatting, all output values are wrapped in double quotes.

<Products> <Product> <Name>Headphones</Name> <Brand>Sony</Brand> <Price>$199.99</Price> </Product> <Product> <Name>Smartwatch</Name> <Brand>Apple</Brand> <Price>$399</Price> </Product> </Products>
"name","brand","price" "Headphones","Sony","$199.99" "Smartwatch","Apple","$399"
Required options
These options will be used automatically if you select this example.
Configure CSV value separator.
(Default is a comma.)
Configure CSV value quoting
character. (Default is quotes.)
Activate this option to enclose
all values in the output CSV in
quote marks (specified above).

Pro tips Master online csv tools

You can pass input to this tool via ?input query argument and it will automatically compute output. Here's how to type it in your browser's address bar. Click to try!

https://onlinetools.com/csv/convert-xml-to-csv?input=%3CMeals%3E%0A%20%20%3CMeal1%3E%0A%20%20%20%20%3CBreakfast%3EOmelette%3C/Breakfast%3E%0A%20%20%20%20%3CLunch%3ESalad%3C/Lunch%3E%0A%20%20%20%20%3CDinner%3ELasagna%3C/Dinner%3E%0A%20%20%3C/Meal1%3E%0A%20%20%3CMeal2%3E%0A%20%20%20%20%3CBreakfast%3EOatmeal%3C/Breakfast%3E%0A%20%20%20%20%3CLunch%3EBurrito%3C/Lunch%3E%0A%20%20%20%20%3CDinner%3ESteak%3C/Dinner%3E%0A%20%20%3C/Meal2%3E%0A%3C/Meals%3E&char-delimiter=%252C&char-quote=%2522&convert-quote=false

All CSV Tools

Didn't find the tool you were looking for? Let us know what tool we are missing and we'll build it!

Quickly convert a CSV file to a JSON data structure.

Quickly convert a JSON data structure to a CSV file.

Quickly convert a CSV file to an XML file.

Quickly convert an XML file to a CSV file.

Quickly convert a CSV file to a YAML file.

Quickly convert a YAML file to a CSV file.

Quickly convert a CSV file to a TSV file.

Quickly convert a TSV file to a CSV file.

Quickly convert a CSV file to evenly aligned text columns.

Quickly convert text columns to a CSV file.

Quickly encode CSV to base64.

Quickly decode base64 to CSV.

Quickly convert CSV to URL-encoding.

Quickly decode CSV from URL-encoding.

Quickly change the CSV column delimiter to a new symbol.

Quickly prepend columns at the beginning of a CSV file.

Quickly append one or more new columns at the end of a CSV file.

Quickly insert one or more new columns anywhere in a CSV file.

Quickly export one or more columns from a CSV file.

Quickly replace any column in a CSV file with a new one.

Quickly delete one or more columns from a CSV file.

Quickly swap two columns in a CSV file.

Quickly exchange columns with rows in a CSV file.

Quickly exchange rows with columns in a CSV file.

Quickly transpose a CSV file.

Quickly truncate columns in a CSV file.

Quickly left-trim and right-trim column values in a CSV file.

Quickly sort data in one or more CSV columns.

Quickly remove double quotes from all CSV fields.

Quickly wrap all CSV fields in double quotes.

Quickly change the character that CSV fields are wrapped in.

Quickly make sure the given CSV file doesn't have errors.

Quickly find rows and columns in CSV that are missing values.

Quickly fill missing CSV values with placeholder values.


Coming Soon

These CSV tools are on the way!
Edit CSV in the Browser

Edit the contents of a CSV file in a neat editor.

Deduplicate CSV Data

Remove duplicate rows in a CSV file.

Print CSV Statistics

Display detailed information about a CSV file.

Convert CSV to HTML

Convert a CSV file to an HTML table.

Convert HTML to CSV

Convert an HTML table to a CSV file.

Convert CSV to Markdown

Convert a CSV file to a Markdown table.

Convert Markdown to CSV

Convert a Markdown table to a CSV file.

Convert CSV to ASCII Table

Draw an ASCII table from CSV data.

Convert CSV to ANSI Table

Draw an ANSI table from CSV data.

Convert CSV to Unicode Table

Draw a Unicode table from CSV data.

Convert CSV to PDF

Convert CSV to a PDF document.

Convert PDF to CSV

Extract data from a PDF and create a CSV file.

Convert CSV to a Screenshot

Create a screenshot of CSV data.

Convert CSV to an Image

Draw a CSV file as a PNG, JPG or GIF picture.

Convert Image to CSV

Extract data from an image and create a CSV file.

Convert CSV to Excel

Convert a CSV file to an Excel spreadsheet.

Convert Excel to CSV

Convert an Excel spreadsheet to a CSV file.

Convert CSV to vCard

Convert a CSV file to a vCard file.

Convert vCard to CSV

Convert a vCard file to a CSV file.

Convert CSV to LaTeX

Convert CSV to a LaTeX table.

Convert CSV to SQL

Generate SQL insert queries from a CSV file.

Convert SQL to CSV

Create a CSV file from SQL query results.

Convert CSV to qCSV

Convert a CSV file to a qCSV (quoted CSV) file.

Convert qCSV to CSV

Convert a qCSV (quoted CSV) file to a CSV file.

Convert CSV to INI

Convert a CSV file to an INI file.

Convert INI to CSV

Convert an INI file to a CSV file.

Convert CSV to JSONL

Convert a CSV file to a JSONL (JSON Lines) file.

Convert JSONL to CSV

Convert a JSONL (JSON Lines) file to a CSV file.

Convert CSV to TXT

Convert a CSV file to a plain text file.

Convert TXT to CSV

Convert a plain text file to a CSV file.

Convert CSV to 0SV

Convert a CSV file to a null-separated values file (0SV).

Convert 0SV to CSV

Convert a null-separated values file (0SV) to a CSV file.

Convert CSV to SSV

Convert a CSV file to a semicolon-separated file (SSV).

Convert SSV to CSV

Convert a semicolon-separated file (SSV) to a CSV file.

Convert CSV to HSV

Convert a CSV file to a hash-separated file (HSV).

Convert HSV to CSV

Convert a hash-separated file (HSV) to a CSV file.

Convert CSV to PSV

Convert a CSV file to a pipe-separated file (PSV).

Convert PSV to CSV

Convert a pipe-separated file (PSV) to a CSV file.

Convert CSV to SQLite

Create an SQLite database from the given CSV file.

Convert SQLite to CSV

Export tables from an SQLite database as CSV files.

Convert CSV to GeoJSON

Convert a CSV file to a GeoJSON file.

Convert GeoJSON to CSV

Convert a GeoJSON file to a CSV file.

Merge CSV Files

Merge together two or more CSV files.

Compare Two CSV Files

Visually show the differences between two CSV files.

Diff Two CSV Files

Run the diff algorithm on two CSV files.

Find Data in CSV

Find CSV cells that contain certain data.

Filter CSV Cells

Return data in a CSV file that matches a pattern.

Slice CSV

Extract a slice from a CSV file.

Cut CSV

Cut a fragment from a CSV file.

Rotate CSV Columns

Move CSV columns to the left or right.

Rotate CSV Rows

Move CSV data rows up or down.

Sort CSV Rows

Sort the data in one or more CSV rows.

Shuffle CSV Columns

Randomly change the positions of CSV columns.

Shuffle CSV Rows

Randomly change the order of CSV rows.

Shuffle CSV Values

Randomly change the order of all CSV values.

Rename CSV Columns

Change the name of CSV columns.

Create a Random CSV

Generate a random CSV of any size.

Create an Empty CSV File

Generate a CSV file that contains nothing.

Create a Large CSV File

Generate a large CSV file for testing.

Create a Custom CSV File

Generate a custom CSV file with m rows and n columns.

Delete Empty CSV Columns

Remove CSV columns that are completely empty.

Delete Empty CSV Rows

Remove CSV rows that are completely empty.

Delete Empty CSV Values

Remove all fields in a CSV file that are empty.

Delete Empty CSV Lines

Remove all empty lines in a CSV file.

Remove CSV Separator

Delete the comma separator from CSV files.

Remove Extra CSV Commas

Delete extra commas around CSV values.

Delete CSV Comments

Delete comments (lines starting with # or //) from CSV files.

Delete CSV Header

Delete the column header from a CSV file.

Delete First CSV Line

Delete the first line from a CSV file.

Compress a CSV File

Minify a CSV file and remove unnecessary whitespaces.

Optimize CSV File Size

Reduce the file size of a CSV file.

Change CSV Encoding

Change the character encoding of a CSV file to UTF8 or ISO-8859-1.

Add Extra Spaces in CSV

Add extra spaces between CSV columns.

Convert CSV to a Matrix

Convert a CSV file to an m-by-n matrix.

Convert CSV to an Array of Arrays

Convert a CSV file to an array of arrays of fields.

Convert an Array of Arrays to CSV

Convert an array of arrays of fields to a CSV file.

Convert CSV Columns to a List

Create a list from one or more CSV columns.

Convert CSV Rows to a List

Create a list from one or more CSV rows.

Convert CSV Columns to an Array

Create an array from one or more CSV columns.

Convert CSV Rows to an Array

Create an array from one or more CSV rows.

Find CSV Dimensions

Find the number of rows and columns of a CSV file.

Count CSV Columns

Find the number of columns in a CSV file.

Count CSV Rows

Find the number of rows in a CSV file.

Sum CSV Columns

Find the sum of CSV columns.

Sum CSV Rows

Find the sum of CSV rows.

Average CSV Columns

Find the average value of CSV columns.

Average CSV Rows

Find the average value of CSV rows.

Add Color to CSV

Use different colors for CSV data, quotes, and commas.

Animate a CSV File

Animate CSV data by showing column after column.

Fix a Broken CSV

Automatically fix a broken CSV.

Add Errors to CSV

Introduce random errors to a CSV file for fuzz testing.

Anonymize CSV Data

Hide personal or sensitive information in a CSV file.

Censor CSV Data

Mask data in a CSV file.

Hide a Message in a CSV

Hide a secret message in a CSV.

Encrypt CSV

Encrypt a CSV file and hide information in it.

Decrypt CSV

Decrypt a previously encrypted CSV file and make it readable.

Visualize CSV

Create a visual drawing that shows the CSV structure.

Create a CSV File

Create a new CSV file in the browser.

Unleash Zalgo on CSV

Distort a CSV file by infusing it with Zalgo characters.

Purge Zalgo from CSV

Neutralize the chaotic Zalgo and restore CSV integrity.

CSV Viewer

Preview the contents of a CSV file in an interactive editor.


Subscribe!

Subscribe to our updates. We'll let you know when we release new tools, features, and organize online workshops.

Enter your email here


Feedback. We'd love to hear from you! 👋