How to download a map from OpenStreetMap: all the ways
"How to download a map from OpenStreetMap" sounds simple, but there are several ways, each with its own limits. Let's honestly go through all the working paths — from a button on the website to an API — and when to choose which.
1. Export straight from osm.org
On openstreetmap.org there's an Export button: draw a box on the map and download the fragment as .osm (XML).
- Pros: nothing to install, fast for a small area.
- Cons: a hard limit on the area size (for a large one the site refuses — "You requested too many nodes"). The format is raw
.osmXML, which still needs opening in GIS or converting.
Good if you need a small piece in the native OSM format.
2. Overpass API
The Overpass API is a powerful query language for OSM data. Through overpass-turbo.eu you can request exactly the objects you need ("all cafes in this area", "all buildings", "primary roads") and export to .osm, GeoJSON or GPX.
- Pros: precise selection by tags, flexible, free.
- Cons: you need to learn the query syntax; public servers have time and size limits and refuse or time out on large selections.
Good for developers and anyone who needs specific objects rather than "the whole map".
3. Geofabrik and planet.osm (large regions)
For a whole country or region, people take ready dumps:
- Geofabrik — regularly updated per-country and per-region extracts in
.osm.pbfand shapefile. -
planet.osm — the whole planet in one file (tens of gigabytes in
.pbf). -
Pros: huge volumes, official regular updates.
- Cons: this is raw data for processing, not a ready map;
.pbfmust be read in osm2pgsql/QGIS, filtered and styled. planet.osm is only for those with a server and space for it.
Good for importing a whole region into your own database.
4. The QuickOSM plugin in QGIS
If you work in QGIS, the QuickOSM plugin pulls OSM data straight into the project by query (it uses Overpass under the hood): pick a tag key/value and an area — get a layer.
- Pros: data straight as a QGIS layer, handy for GIS tasks.
- Cons: the same Overpass limits; slow for large areas. More on loading maps into QGIS is in How to load a map into QGIS.
5. Ready export in the format you need (our path)
All the ways above give either raw .osm/.pbf or a limited selection you still have to turn into a working file. If you need a ready map of an area straight in the format you need — select the area on osm2cdr and download it in one of 124 formats: the layers (roads, buildings, water, greenery) are already parsed and styled.
- GeoJSON or GeoPackage — for GIS;
- Shapefile — classic GIS exchange;
- DXF — for CAD;
- plus SVG, PDF, PNG, GeoTIFF and dozens of others.
It's free and takes seconds — no Overpass syntax and no .pbf processing.
For developers: a REST API
If the export needs to be automated, osm2cdr has a REST API: request an area and format, a key in the X-API-Key header, poll the task status, download the result. Python and JavaScript examples are in Map Export API for developers. A general overview of working with OSM data for developers is in OpenStreetMap for developers.
What to choose
| Task | Way |
|---|---|
| A small piece in native OSM | Export on osm.org |
| Specific objects by tags | Overpass API / QuickOSM |
| A whole region into your database | Geofabrik / planet.osm |
| A ready map in the format you need | Export on osm2cdr (124 formats) |
| Automation | osm2cdr REST API |
In short
- osm.org Export — fast, but a small area and raw
.osm. - Overpass / QuickOSM — precise selection by tags, but limits and syntax.
- Geofabrik / planet.osm — whole regions, but raw
.pbffor processing. - A ready map straight away — export in 124 formats; automation — a REST API.