Introduction
MBTiles is a format for a set of map tiles in a single file, created by Mapbox. Web maps are drawn from small square tiles, one set for each zoom level, and a whole region can need millions of them. Keeping them in one file makes a tile set easy to copy, to serve and to use offline in mobile apps.
The tiles can be images, PNG, JPEG or WebP, or vector tiles, which hold the map’s shapes and are styled when they are drawn.
Structure
An MBTiles file is an SQLite 3 database, so it
starts with SQLite format 3. It has two parts:
- a
metadatatable ofnameandvaluepairs, giving the tile set’s name, format (such aspngorpbf), bounds, centre and zoom levels; for vector tiles ajsonentry lists the layers - a
tilestable with the columnszoom_level,tile_column,tile_rowandtile_data, the tile itself as a blob
Rows are numbered from the bottom of the map, in the TMS scheme, so the row is flipped
compared with the usual web map numbering. Vector tiles are stored gzip-compressed.
Many files make tiles a view over other tables so that identical tiles,
such as open sea, are stored only once. The
tables and metadata page gives every
table, column and metadata key.
Not described
Re-checked on 2026-11-13 against MBTiles 1.3; every rule of the specification is on the tables page.
Known, not yet covered
- Reference: the “geostats” format of
tilestatsas documented in themapbox-geostatsrepository (the page gives the structure from the specification’s example only), the Mapbox Vector Tile format insidepbftiles, and the UTFGrid format in thegridstables; each is a separate specification.
Links
Software
- QGIS – free GIS that opens MBTiles as map layers (Windows, macOS, Linux)
- Tippecanoe – builds vector tile sets from GeoJSON (macOS, Linux)
- TileServer GL – serves map tiles from MBTiles files
Developers
- GDAL – geospatial library with an MBTiles driver (C, C++)
Reference
- MBTiles specification – Mapbox’s specification on GitHub