How to open .OSM files on Windows
To open .OSM files on Windows, in QGIS, use the OpenStreetMap tools and choose the option to load OSM data from a file (the file should be an OpenStreetMap XML .osm file).
Step-by-step instructions
- In QGIS, use the OpenStreetMap tools and choose the option to load OSM data from a file (the file should be an OpenStreetMap XML .osm file).
- If you are working with data processing tools, open/import the .osm file using GDAL-supported software that can read OpenStreetMap .osm.
Common issues
The file opens as plain text instead of a map layer
.osm is XML. If you open it in a text editor, you will see XML elements (including an <osm> root), not a rendered map. To view it as geographic data, you must import it using OSM-aware GIS tools.
- Open the file using a GIS tool that supports OpenStreetMap OSM XML (for example, QGIS’s OpenStreetMap tools that load OSM from file).
- If you are using a GDAL-based workflow, ensure you are reading it with the OpenStreetMap driver support for .osm.
Import fails or appears empty
Some tools expect a valid OSM XML structure (with nodes/ways/relations under an <osm> element). If the file is incomplete, truncated, or not actually OSM XML, imports can fail or show no features.
- Open the file in a text editor and confirm it is OSM XML (look for an <osm> root element and elements like <node>, <way>, and <relation>).
- If the file came from an API response or download, re-download the data and try importing again.
Performance problems with large .osm files
OSM XML is verbose; large extracts can be slow to open and memory-intensive in desktop GIS tools compared with more compact representations.
- If possible for your workflow, use software that supports efficient OSM handling and conversion via GDAL’s OpenStreetMap support.
- Work with smaller geographic extracts (download a smaller area) and then load/import again.
Security note
OSM XML is data (nodes/ways/relations and tags), not an executable format, but it can still be a risk to open untrusted files in complex parsers due to potential XML parsing vulnerabilities in third-party tools.