Home / GIS and Open Map Data for Beginners

How to Download OpenStreetMap Data for Any Area

A street intersection in Barcelona photographed from directly above

Photo: Evans Joel / Pexels

OpenStreetMap is not only a map you look at; it is a database you can take home. Every road, building, path, and bench on the map can be downloaded as data, free, for your own projects: loading into QGIS, building an app, printing a custom map, or running an offline tool. The confusion for beginners is that there are three very different doors into the same database, and the right door depends on one question: how big is your area?

This guide starts with that decision, then walks each route with exact steps. The Coordinate Explorer on this page has a job in the first route: the Export tab asks for corner coordinates, and the explorer is how you read them off precisely.

Interactive map

Coordinate Explorer: Read Off Your Corner Coordinates

Before you export, click the top-left and bottom-right corners of the area you want. The explorer gives you the exact corner coordinates the Export tab asks for.

Decimal degrees40.689167, -74.044444
Latitude40.689167° N
Longitude74.044444° W
Degrees minutes seconds40° 41' 21.00" N, 74° 02' 40.00" W
Degrees decimal minutes40° 41.350' N, 74° 02.667' W
Plus code87G7MXQ4+M67

Map data © OpenStreetMap contributors. Coordinates are read from the map itself, in the WGS 84 system your phone uses.

Decide First: How Big Is Your Area?

Your areaYour routeWhat you get
A neighborhood, a campus, a small town centerExport tab on openstreetmap.orgOne .osm file of exactly that rectangle
A city region, a state, a whole countryGeofabrik download serverOne .osm.pbf extract file, updated daily
Only certain features, anywhere: all the cafes, all the cycle pathsOverpass TurboA file containing just those features
The entire planetPlanet.osmAbout 100 GB compressed; bring a real reason and a large disk

Choosing wrong has a signature frustration: the Export tab refuses areas that are too big, mid-click, after you have framed the perfect rectangle. Decide by size first and the frustration never happens.

Route 1: The Export Tab, for Small Areas

  1. Go to openstreetmap.org and zoom to your area.
  2. Click Export in the top bar. A blue rectangle appears over the map, with four numbers at the left: the coordinates of its left, top, right, and bottom edges. This rectangle is a bounding box, and the four numbers are its definition.
  3. Drag the map or the rectangle's edges to frame your area. For precision, click Manually select a different area and type the four numbers. This is where the explorer on this page earns its keep: click the top-left corner of your area in the explorer and copy its pair, then the bottom-right corner, and you have exact edges instead of eyeballed ones.
  4. Click the Export button. Your browser downloads a file named map.osm, containing every mapped feature inside the rectangle: roads with their names and types, buildings, paths, rivers, bus stops, all of it.
  5. If the site reports the area is too large, it will suggest the alternatives: that message is the size decision enforcing itself, and your next stop is Route 2 or 3.

The Export file is in OSM XML format, readable by QGIS and most GIS tools. For a neighborhood it arrives in seconds and is usually a few megabytes.

Route 2: Geofabrik, for Regions and Countries

A German company, Geofabrik, publishes free extracts of the OpenStreetMap database every day, sliced by continent, country, and region, as a public service that much of the mapping world quietly runs on.

  1. Go to download.geofabrik.de.
  2. Choose your continent, then your country, then the region or state if one is listed.
  3. Download the file ending in .osm.pbf. This is the same database content as XML, compressed into an efficient binary format, typically a tenth the size.
  4. Note the timestamp on the page: extracts are rebuilt roughly daily, so your file is the map as of last night, not last year.

A country file can run from tens of megabytes to several gigabytes for the largest. The .osm.pbf format opens directly in QGIS and in most professional tools. If your project only needs one city inside a big country file, download the country and cut your area out inside QGIS, or use Route 3 to fetch just the city.

Route 3: Overpass Turbo, for Only What You Want

Sometimes the area is large but the shopping list is small: every drinking water point in a province, every cycle path in a country, every bench in a park system. Overpass is the database's query engine, and Overpass Turbo is its friendly face.

  1. Go to overpass-turbo.eu. A map and a code panel appear; do not be put off by the code, because the wizard writes it for you.
  2. Click Wizard and type what you want in plain words, for example: amenity=cafe in your town, or highway=cycleway. The wizard builds the query.
  3. Run it. The map lights up with only the matching features.
  4. Click Export and choose your format: GeoJSON is the friendliest for web and GIS work, and raw OSM data suits the classic tools.

Overpass answers from the live database, so results are current to the minute. It is also a shared public service with fair-use limits; run modest queries, and for a whole country's worth of a common feature, download the Geofabrik file and filter it locally instead.

A laptop screen displays a world map
A laptop screen displays a world map

The Formats, and What Opens Them

FormatWhat it isOpens with
.osm (XML)The database in readable text form; large but universalQGIS, JOSM, most GIS tools
.osm.pbfThe same content, binary and compressed; the working standardQGIS, most professional tools and libraries
GeoJSONA web-friendly format of features and propertiesQGIS, web maps, code editors, spreadsheets with help
Shapefile (.shp and friends)The older GIS standard, offered by some export servicesQGIS and every legacy GIS

For the tutorial path on this site, any of the first three will do: QGIS tutorial for beginners opens downloaded data the same way it opened a typed table, except the table now has a hundred thousand rows and somebody else typed it.

The License: Free, With One Duty

OpenStreetMap data is published under the Open Database License, the ODbL. In plain terms: you may use the data for anything, including commercial products, and if you publish work built on it you must credit the source and, for derived databases, share alike under the same license. The credit line is short and standard. Copy it onto your map, your app, or your document:

© OpenStreetMap contributors

That line is not a courtesy; it is the license's condition, and it is also simply true: the data exists because millions of volunteers, including the ones in our mapathon article, drew it. Maps made from the data carry the credit on their face, usually in a corner, the way the maps on this site credit their sources in the photo and data lines.

What to Do With the File

A downloaded area becomes useful when it meets a tool. In QGIS it becomes layers you can style, filter, and print, the natural second project after the tutorial. In a spreadsheet-minded workflow, exports converted to GeoJSON and then CSV become tables of places with coordinates, the raw material of a thousand small research projects. In an app, an .osm.pbf extract is what offline map tools are built from; the country files behind offline maps start life exactly here. And if your download reveals that your own street is mapped thinly or wrongly, the loop closes pleasantly: the fix is an edit, and how to add a place to OpenStreetMap teaches it in an evening.

Storage and Sanity: Handling Big Files Without Tears

A few working habits keep downloads painless. Keep one folder per project, with the raw download untouched inside it under a name that includes the date, because the first question about any map, asked months later, is which snapshot it came from. Never edit the raw file; make your working copy and edit that, so any disaster is one re-download or one re-copy away from recovery. Watch the uncompressed size: a modest .osm.pbf can expand several-fold when a tool loads or converts it, and the XML version of a country can reach tens of gigabytes, which is why the binary format exists. And remember that an extract is data, not a picture: opening a country file in a text editor to peek at it is technically possible and practically a way to freeze your afternoon. Open it in QGIS, where it becomes a map, which is what you wanted all along. The beginners who thrive with downloaded data are not the ones with the biggest disks; they are the ones whose folders answer questions before the questions are asked.

Related Guides

This guide does not stand alone. The GIS and open map data guides below take up the questions it leads into:

Frequently Asked Questions

Is downloading OpenStreetMap data legal and free?

Yes. The data is published under the Open Database License specifically so anyone can download and use it, including commercially. Your duties are attribution, the © OpenStreetMap contributors line, and share-alike if you publish a derived database.

Why did the Export tab refuse my area?

Because the Export tab serves small rectangles only; larger requests would strain a shared public service. The refusal message points you to the right doors: Geofabrik for regions and countries, Overpass for selected features.

What is a bounding box?

The rectangle that defines an area by its four edges: the smallest and largest latitude and longitude. Downloads, exports, and many map queries are specified as bounding boxes, which is why the explorer on this page, which reads exact corner coordinates off a live map, is the natural companion tool.

How current is the data I download?

Geofabrik extracts are rebuilt roughly daily. Overpass queries answer from the live database, current to the minute. The Export tab is also live. In every route, your file is a snapshot of the moment you downloaded it, and it will not update itself.

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

Content, none; costume, everything. The .osm file is the data as readable XML text. The .osm.pbf file is the same data in a compressed binary format, far smaller and faster for tools to read. Choose .pbf for anything large.

Can I download the whole planet?

You can: the file is called planet.osm, published weekly, and it runs to roughly 100 GB in compressed .pbf form as of 2025, per the OpenStreetMap wiki. Almost nobody needs it. If you think you do, you almost certainly need one country's extract and a good filter.

Photo credits: Evans Joel (Pexels); Monstera Production (Pexels). Photos are served from this site; follow the credit to the library page for the original.