This question already has an answer here:

I downloaded a file .osm. I want to have the same file but with extension .xml To do that, I downloaded osmconverter but the problem is, as states in wikipedia I can convert the .osm file into specific formates and .xml is not one of them.

Please let me know how to do that because I need to do further processing on the file and it must be .xml

marked as duplicate by PolyGeo Jan 19 '16 at 8:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


The *.osm file is a *.xml file. There is no need to convert it. Open the file within an editor of your choice and you will see the xml structure. If your application needs a file with *.xml ending simply rename it or use the *.osm file as an input. Both should be fine.

  • ok..but i downloaded this file from geophabrik bremen-regbez-latest.osm and i cant open it – Elpha Jan 19 '16 at 7:14
  • 1
    Did you unzip the osm.bz2 file? After unzipping you should be able to open it. Which tool are you using? – zehpunktbarron Jan 19 '16 at 7:37
  • 1
    I wonder where you downloaded that from. download.geofabrik.de/europe/germany/bremen.html offers .osm.pbf and .osm.bz2. While the first is a compressed pbf format, the second is a zipped version of the original XML format. It is 24 MB large, so maybe too large for a text editor. There is no subregion defined for Bremen. – AndreJ Jan 19 '16 at 7:38
  • @zehpunktbarron i unzipped the .bz2 file using 7z and it gives me one file of type .osm and i tried to open the .osm file with my editor to rename it to bremen.xml but the editior say it is too big – Elpha Jan 19 '16 at 7:43
  • 1
    If you just want to rename the file you don't need to open it. I just recommended you to open it so you could see the structure of the file. right-clicking on the file and renaming it should be fine. However, depending on your application *.osm is a *.xml file which normaly doesn't have to be renamed. – zehpunktbarron Jan 19 '16 at 7:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.