Convert India Income Tax Return XML file to CSV for use with spreadsheets

The Indian Income Tax department has been very friendly and proactive and provided income tax payers in India to file electronic returns. The returns can be filed using the respective excel spreadsheet files from

The ITR returns files are like actually xls spreadsheets that you need to open and fill in your tax figures. The files generate an XML file that is to be uploaded onto the income tax website at

Many people would like to know what data was generated by the xls file. Since it is all in XML, you can open it in a text editor like Wordpad and have a look at it’s contents. All key fields are surrounded in tags. Therefore, the file will not readily convert in tools like LibreOffice, OpenOffice, MS Office where XML is not fully supported. But all is not lost. You can use XML to CSV converters to generate a CSV file and then open the CSV file in your favourite Office Suite. Below is the method to do this:

    1. Download the XML2CSV converter from It is a Java program, so should work on any operating system.
    2. Next, unzip it to your computer (preferably, in it’s own folder).
    3. Copy the XML file generated by the Income Tax xls return files like ITR2*.xls into the xml2csv-conv folder.
    4. At the command prompt like C:> or $ based on your operating system, type the command:
      java -jar xml2csv-conv.jar MNOPQ1234R_ITR2_2012.xml myfile.csv   <enter>
      MNOPQ1234R_ITR2_2012.xml is the income tax return XML file generated by the income tax ITR spreadsheets
      myfile.csv is the output csv file.
    5. You will now be able to open myfile.csv in Excel, LibreOffice or any Office Suite of your choice.

As a pre-requisite, you should have the Java Runtime installed on your computer. If it is not installed, you will know when you run the command at 4 above.