Every offline map in every app is, underneath, the same artifact: a pack of map tiles, small images or vector chunks arranged by zoom level, bundled for a device to read without a network. App users download those packs from the app's menu and never think about their manufacture. But sometimes the map you need offline does not exist in any app's catalog: your own survey layers, your organization's data, a basemap styled your way for a field project. Then the pipeline reverses, and you make the pack yourself. Desktop QGIS is the workbench for that job, and its Processing Toolbox contains the tool by name: Generate XYZ tiles (MBTiles). This guide runs it properly, which mostly means understanding two things before you click: the zoom math, because each added zoom level roughly quadruples the tile count, and the law of other people's tiles, because the most convenient source is one you are not allowed to bulk-download.
Home / GIS and Open Map Data for Beginners
Offline Maps in QGIS: Generate Your Own MBTiles Tile Pack

Photo: Alpha En / Pexels
Make the Tile File: The QGIS Checklist
Check off each step as you finish it. Your progress stays on this page.
0 of 7 complete
0% done
The Tool: Generate XYZ Tiles (MBTiles)
Open the Processing Toolbox in QGIS and find Generate XYZ tiles (MBTiles), in the raster tools. Its inputs are few and each one matters. The extent is the rectangle of the world your pack will cover, drawn on the map or taken from a layer; everything outside it simply will not exist offline. The minimum and maximum zoom levels set the range of scales the pack contains, from the regional overview down to street level or finer. The tile format, PNG or JPEG, trades quality and transparency against size: JPEG is smaller and fine for photographic basemaps, PNG preserves crisp linework and supports transparency for overlay layers. The output is a single file with the .mbtiles extension, which is the standard container the field apps and libraries expect. Set the inputs, run the tool, and QGIS renders your current project's layers, as styled, into the pack. What you style is what the field gets, so compose the project as a field map first, legible at arm's length in sunlight, and generate second.
The Zoom Math That Decides Everything
Tile pyramids obey a ruthless rule: each additional zoom level divides the world into four times as many tiles over the same ground, so the tile count for your area roughly quadruples with every level you add. Going from a maximum zoom of 14 to 16 is not a small refinement; it is about sixteen times the deepest-level tiles, and the file grows accordingly. This is why extent and maximum zoom are one decision, not two. A small area, a field site, a single valley, can afford deep zooms. A province cannot, unless the pack is meant for a laptop rather than a phone. Work the decision backwards from the field need: what is the closest anyone will genuinely zoom in the field, reading a boundary, a plot corner, a sampling point, and set the maximum there, not one level deeper for luck. Then set the extent with the same discipline: the area of operations plus its access roads and a margin, not the whole district because drawing a bigger box was easier. Every offline pack that failed in the field by being too large to transfer, too slow to copy, or never finished rendering at all, failed at this arithmetic, in this dialog, before it was ever a file.
Which Sources You May Lawfully Tile
Here is the section that keeps your project honest. Rendering your own layers, your survey, your organization's data, imagery you hold rights to, into tiles is unambiguously yours to do. Downloading someone else's tile service in bulk to manufacture your pack is a different act, and the largest source has a rule about it in plain language: the OpenStreetMap Foundation's Tile Usage Policy forbids bulk downloading of tiles from tile.openstreetmap.org. That tile server is a donated community resource meant for browsing, not a wholesale feed, and tools pointed at it in bulk get blocked, correctly. The lawful routes to an OpenStreetMap-based pack are the data routes: download the OpenStreetMap data itself, as our building footprints guide and the wider download guide describe, style it in QGIS as your own layers, and tile your rendering. Commercial basemap providers, in turn, license offline use under their own terms, some plans include it, some forbid it, and the terms of your plan are the answer, not a forum post. The principle generalizes cleanly: tile what is yours or what the terms explicitly allow, and treat any workflow whose first step is scraping a tile endpoint as a policy violation with a progress bar.

Style for the Field, Not the Desk
The pack renders your project as styled, and field styling is a different discipline from desk styling, worth a deliberate pass before you generate. On a monitor, in a chair, a map can carry hairline boundaries, ten classes of soft color, and eight-point labels. In the field, on a phone at arm's length in direct sun with gloves nearby, that map is soup. Restyle a copy of the project for the pack: boundaries thick enough to survive glare, a palette of few and saturated colors that stay distinct when the screen dims to save battery, labels sized for the smallest screen in the team and set with halos so they read over busy imagery, and detail that simplifies honestly at low zooms instead of collapsing into ink. The deepest test is social as much as visual: hand the test pack to the person who will actually stand in the field with it, in daylight, and watch them find three features without your narration. Every hesitation is a styling bug with a known address. Fix the style file, regenerate, and retest; the generate step is cheap, and the field day is not.
The Vector Tile Option
Raster tiles are pictures; vector tiles are data, drawn by the device at view time, which makes them smaller for the same ground and crisp at every zoom. QGIS knows this world too: since version 3.32, the Processing Toolbox includes a Download vector tiles algorithm, which fetches vector tiles for an extent and zoom range from a source that offers them and assembles them for offline use. The choice between the routes is a choice about your field app and your data. If the target app reads MBTiles raster packs and your map is a styled composition of many layers, the Generate XYZ tiles route bakes your composition into exactly what the field sees. If your source is published as vector tiles and your app renders them natively, downloading the vector tiles preserves their flexibility. Either way the same two governors apply: the zoom math, because vector tiles multiply by level too, and the source's terms, because a download tool existing in QGIS does not amend anyone's usage policy.
Test the Pack Before It Matters
A tile pack is not done when the tool finishes; it is done when it survives its field test. Load the .mbtiles file back into QGIS as a layer and pan across your extent at the deepest zoom: the corners and edges are where extent mistakes show, a field site clipped by a too-tight rectangle announces itself immediately. Then load the pack in the actual target app on the actual device, with connectivity off, and perform the field tasks: find the site, zoom to working depth, read the labels in bright light if you can arrange it. Packs fail this test in instructive ways, a basemap styled for a desktop monitor that turns to soup on a phone, labels sized for print, the deepest zoom level rendering beautifully over ground nobody visits while the access road sits outside the extent. Every one of those is a five-minute fix at the desk and a ruined day in the field, which is the entire argument for testing.
How This Differs From QField
One boundary deserves stating, because the two workflows are cousins and are constantly confused. Our QField offline maps guide covers packaging a QGIS project for QField, QGIS's field companion: the project, its editable layers, and its basemaps travel together so fieldworkers can collect and edit data against the full project. That is a project-packaging workflow for data collection. This article is a tile-manufacturing workflow: it produces one portable tile file, readable by many apps, containing a rendered map and nothing editable. If your field team needs to edit the project's own data in the field, you want the QField route. If they, or anyone with a generic map app, need your map as a backdrop with the network off, you want the MBTiles pack made here. Both begin in the same QGIS project; they diverge at the question of what the field is for.
Related Guides
This guide does not stand alone. The GIS and open map data guides below take up the questions it leads into:
- Google Maps in QGIS: The Two Working Routes, and the Licensing Catch You Must Know: You can put Google Maps and Google satellite imagery behind your data in QGIS in about a minute, two ways: an XYZ Tiles connection, or the...
- QGIS Atlas: One Layout, Forty Maps, or However Many Features You Have: Atlas is the QGIS print layout feature that turns one designed map into a series: point the layout at a coverage layer, set the map item to...
- New Layer From Selection in QGIS: Turn Chosen Features Into Their Own Dataset: A selection is an answer, but it evaporates: close the project, clear the highlight, and the features you so carefully isolated are anonymous again.
Frequently Asked Questions
What is an MBTiles file?
MBTiles is the standard container format for offline map tiles: a single file holding a pyramid of tiles across zoom levels, plus the metadata describing them. QGIS's Generate XYZ tiles tool writes it, and a wide range of field and mobile mapping apps read it, which is what makes it the natural output when you manufacture your own offline map.
How big will my offline tile pack be?
It depends on extent and maximum zoom, and the governing rule is that each added zoom level roughly quadruples the tile count over the same ground. A tight extent at moderate zoom is a small file; a wide extent pushed one zoom deeper is many times larger. No honest fixed size exists, so decide from the field need: the deepest zoom anyone will truly use, over the ground they will truly cover.
Can I make an offline pack from OpenStreetMap tiles?
Not by bulk-downloading the tile.openstreetmap.org service: the OpenStreetMap Foundation's Tile Usage Policy forbids bulk tile downloads, and the servers enforce it. The lawful route is to download OpenStreetMap data itself, style it as your own layers in QGIS, and generate tiles from your rendering, or to use a provider whose terms explicitly permit offline packs.
What is the difference between raster tiles and vector tiles for offline use?
Raster tiles are pre-rendered images: what you style in QGIS is exactly what the field sees, in an MBTiles pack. Vector tiles carry the geometry and are drawn by the device, so they stay crisp at any zoom and can be restyled, but the target app must know how to render them. QGIS supports both routes, including a Download vector tiles algorithm present since version 3.32.
How is this different from using QField?
QField packaging sends an editable QGIS project to the field for data collection. An MBTiles pack sends a rendered map backdrop that many apps can display offline. Choose QField when the team must edit project data in the field; choose a tile pack when they need your map as a reference with no network.
Photo credits: Alpha En (Pexels); Gustavo Fring (Pexels). Photos are served from this site; follow the credit to the library page for the original.