You might run into a situation where you need to convert a CSV format file to XML. I know I have and I've used PHP and various CSV to XML related functions to accomplish that.

But you also might be interested in some other types of CSV to XML converters available.

I looked around and found several csv to xml converter programs which you might find useful.

One nice web based csv to xml converter is the Creativyst®  CSV to XML Converter which allows you to paste your CSV file content into a form, and then after clicking a button, it will output XML.


This is useful if you don't want to mess around with programming.

What's more, the Creativyst®  CSV to XML Converter allows you to specify the element ID's of the XML output.

The Creativyst®  CSV to XML Converter is a free online csv to xml converter and can be found at


If you need a more heavy duty CSV to XML converter, you might find that this XSLT based csv to xml converter that works as an addon to a software called Kernow would do the trick.

On Linux and Unix like systems, you could use a little command line program called csv2xml to convert CSV files to XML. 

csv2xml is a really simple program, and it's simple to use. From the author:

As the name suggest, csv2xml is a simple csv to xml converter. It reads csv files from standard input, and output a valid xml file on standard output. csv2xml - A csv to xml converter. (accessed March 23, 2010).

Another option for converting csv to xml is to just open the csv file in Microsoft Excel or in Openoffice, and then save the file in XML format.

All of the above methods of csv to xml conversion have their glitches. One reason for that is there is that CSV and XML files don't always follow a consistent format.