OSM File Converter

Convert OpenStreetMap XML files to GeoJSON, Shapefile, KML, and GPX. Extract and transform crowd-sourced geographic data for use in any GIS or mapping application.

Start Converting

What is the OSM Format?

The OSM format refers to the native XML data format used by OpenStreetMap, the world's largest collaborative mapping project. OpenStreetMap is often described as "the Wikipedia of maps" — a free, editable map of the entire world built by a community of over 10 million registered contributors.

OSM XML files (typically carrying the .osm extension) store geographic data using three fundamental element types: nodes (points with latitude/longitude), ways (ordered lists of nodes forming lines or polygons), and relations (logical groupings of nodes, ways, and other relations representing complex features like multi-polygon boundaries, route networks, or turn restrictions).

Each element can carry an arbitrary number of tags — key-value pairs that describe what a feature represents. For example, a way might be tagged highway=residential and name=Oak Street, or a node might carry amenity=restaurant and cuisine=italian. The OpenStreetMap tagging system is community-driven and remarkably detailed, covering everything from road surfaces to opening hours.

OSM data can be downloaded for specific regions from services like Geofabrik, BBBike, or the Overpass API. Converting OSM files to standard GIS formats like GeoJSON or Shapefile makes this vast dataset accessible for spatial analysis, cartographic projects, and application development.

Key Features of OSM Data

  • Global coverage: OpenStreetMap contains data for every country on Earth, with particularly dense coverage in Europe, North America, and parts of Asia.
  • Rich attribute tagging: Hundreds of established tag keys covering roads, buildings, land use, points of interest, public transport, natural features, and much more.
  • Continuously updated: Thousands of edits are made every hour by the global community, keeping the data more current than many commercial datasets.
  • Open Data License: OSM data is available under the Open Database License (ODbL), allowing free use with attribution for both commercial and non-commercial purposes.
  • Topological structure: Ways share nodes at intersections and boundaries, enabling routing, network analysis, and topologically correct polygon construction.
  • Multi-polygon relations: Complex areas with holes (lakes with islands, buildings with courtyards) are modelled using relation objects that reference multiple ways.
  • Metadata: Each element carries version history, contributor information, and changeset references for full edit traceability.

Convert FROM OSM

Transform OpenStreetMap data into standard geospatial formats for analysis and mapping.

Note: OSM is a source-only format in MapfileConverter. You can convert OSM data to other formats, but converting other formats to OSM is not supported — OpenStreetMap data should be edited through the OSM ecosystem (iD editor, JOSM, etc.).

Common Use Cases for OSM Data

Custom Basemap Creation

Extract road networks, buildings, water bodies, and land use from OSM to create tailored basemaps for web applications, print maps, or embedded navigation systems.

Routing & Navigation

Convert OSM road networks to GeoJSON or Shapefile for use in custom routing engines like OSRM, Valhalla, or GraphHopper for vehicle, cycling, or pedestrian navigation.

Humanitarian Mapping

Organisations like the Humanitarian OpenStreetMap Team (HOT) use OSM data for disaster response, converting extracts to Shapefile or GeoJSON for field operations in QGIS.

Points of Interest Extraction

Extract restaurants, shops, hospitals, schools, and other POIs from OSM data for location intelligence, market analysis, or mobile app development.

Urban Analytics & Research

Researchers convert OSM building footprints, road networks, and green spaces to analyse urban form, walkability, accessibility, and infrastructure distribution.

Offline Maps for GPS Devices

Convert OSM trail and path data to GPX format for loading onto Garmin or other GPS devices, especially useful for hiking and cycling in areas with poor cellular coverage.

Frequently Asked Questions

Where can I download OSM data files?

You can download OSM extracts from Geofabrik (country and region extracts), BBBike Extract (custom bounding box), or use the Overpass API to query specific features.

What is the difference between .osm and .pbf files?

Both contain the same OpenStreetMap data. .osm is an XML text format that is human-readable but large. .pbf (Protocol Buffer Binary Format) is a compressed binary format that is 5-10x smaller and faster to parse. MapfileConverter accepts the .osm XML format.

Will all OSM tags be preserved during conversion?

Yes. When converting OSM to GeoJSON or Shapefile, all tags on each element are converted to feature properties/attributes. For Shapefile output, tag key names may be truncated to 10 characters due to the dBASE limitation.

Can I use converted OSM data commercially?

Yes. OpenStreetMap data is licensed under the Open Database License (ODbL). You can use it for commercial purposes as long as you provide attribution to OpenStreetMap contributors and share any modifications to the database under the same licence.

Why can I not convert other formats TO OSM?

The OSM format represents a topological database with shared nodes, versioning, and changeset metadata that cannot be meaningfully created from simple geometry files. To add data to OpenStreetMap, use the official editing tools (iD, JOSM) and follow the community's import guidelines.

Ready to Convert Your OSM Data?

Upload an OSM XML file and convert it to GeoJSON, Shapefile, KML, or GPX in seconds — free, private, and processed entirely in your browser.

Open the Converter