Download a city's tiles as one package: MBTiles, PMTiles and how to open them

2026-09-225 min read
MBTilesPMTilesтайлыAndroidoffline mapsQGIS

The task sounds simple: download a city's tiles as one package — a single file rather than a thousand images — and then open them on a phone or in a browser. There are two containers for that: MBTiles and PMTiles. Let's see how they differ, which one fits your task, how to pick zoom levels so the file doesn't balloon, and how to open the result on Android and on a desktop.

What "tiles as a package" means

A map on the web and in mobile apps is made of tiles — square 256×256 pixel pieces cut per zoom level. Normally they sit on a server as separate files and are fetched as you pan. "Downloading as a package" means collecting the area and zoom levels you need into one container you can carry with you:

  • MBTiles — an SQLite database with a tiles table inside. One file, works offline, the native format for several mobile apps.
  • PMTiles — one file with an internal index, read via HTTP Range requests. Put it on any static hosting and the web map pulls only the bytes it needs — no tile server required.
  • An XYZ tile folder — the classic z/x/y.png structure. Handy when you want to serve the files from your own nginx or feed them to a third-party tool.

One limit decides the choice more often than anything else: the PMTiles export is capped at zoom 12 and will not deliver anything above it, while MBTiles goes z10–z16 and deeper. If you need streets, courtyards and labels of small objects (z13 and beyond), take MBTiles; PMTiles stays the option for overview web maps up to z12.

Raster and vector tiles

Raster tiles are ready-made images: what's drawn is what you see. They're heavier, but they open literally everywhere and need no style.

Vector tiles store geometry and attributes, and the client draws them according to a style. They're lighter, scale without blur, and labels can be translated and recoloured — but you need an engine that supports them (MapLibre, MapTiler, QGIS). For an offline base layer in a hiking app raster is simpler; for an interactive web map vector wins.

How to pick zoom levels and avoid gigabytes

The key rule: each next zoom level has four times as many tiles. A z10–z14 range over a city is a reasonable file, while z10–z18 over the same area can be dozens of times heavier and take noticeably longer to build.

Rough guidance by task:

  1. Area overview and districts — up to z12–z13.
  2. Streets and blocks, city navigation — z14–z16.
  3. Individual buildings and labels of small objects — z17–z18, but only over a small part of the city, not the whole of it.

Anything deeper than z12 is available only in MBTiles and in the XYZ tile folder: PMTiles tops out at z12.

Start with a narrow range and look at the result: widening it is cheaper than waiting for a giant package to be rebuilt.

How to download a city's tiles

  1. Select the city or district boundary on the map.
  2. Choose the container: MBTiles for offline and mobile, PMTiles for the web, an XYZ tile folder for your own server.
  3. Set the zoom range and detail level.
  4. Download the file — inside is current OpenStreetMap data for the selected territory.

How to open it on Android

MBTiles is the native offline map format for several apps, and usually it's enough to drop the file into the right folder:

  • OsmAnd — import the .mbtiles as a base layer or overlay from the maps menu;
  • Locus Map — put the file into the app's maps folder and it appears in the list of sources;
  • OruxMaps — the oruxmaps/mapfiles folder, the app picks up the contents by itself.

On iOS the choice is narrower, but Guru Maps and Cartograph work with MBTiles. A detailed walk-through of the options is in MBTiles: how to open it on desktop and Android.

How to open it on a desktop and on the web

QGIS is the universal option: Layer → Add Layer → Add Raster Layer for raster MBTiles or Add Vector Tile Layer for vector ones.

tileserver-gl or MapTiler — if the tiles have to be served over HTTP into your own Leaflet or MapLibre map.

PMTiles needs none of that: the file goes onto S3, R2, GitHub Pages or plain static hosting, and the library on the page requests the pieces it needs. How that works and why it needs no backend is in PMTiles: a cloud-native tile format. Technical details of the SQLite container are in the MBTiles deep dive.

Easier — get a ready package straight away

Hunting for someone else's tile dumps is risky: the data date, coverage and zoom range are all unclear. On osm2cdr.ru you set the area and zooms yourself and get a fresh package from OpenStreetMap data — MBTiles for offline or PMTiles for the web. It takes seconds and needs neither a server nor MOBAC.

In short

  • MBTiles is a single SQLite file, the best option for offline and Android; PMTiles is a single file for the web with no tile server.
  • Zooms: MBTiles goes z10–z16 and deeper, PMTiles only up to z12; if you need z13 and above, take MBTiles.
  • Every next zoom quadruples the tile count: take z10–z16 for a city, z17–z18 only for a small patch.
  • Android: OsmAnd, Locus Map, OruxMaps; desktop: QGIS, tileserver-gl, MapTiler.
  • A ready package for your own area — MBTiles, PMTiles or XYZ tiles.
← All articles