An MBTiles file is an SQLite 3 database with the tables below. This page follows the MBTiles specification 1.3 from Mapbox, read 2026-11-12. It says a file may set SQLite’s application ID to the officially assigned magic number; the value is not given in the specification.
metadata table
Two text columns, name and value: one row per key.
| Key | Need | Value |
|---|---|---|
name | must | Name of the tile set. |
format | must | pbf (gzip-compressed Mapbox Vector Tiles), jpg, png, webp, or an IETF media type for other formats. |
bounds | should | left,bottom,right,top in WGS 84 degrees. |
center | should | longitude,latitude,zoom: the default view. |
minzoom, maxzoom | should | Lowest and highest zoom levels present. |
attribution | may | HTML attribution text. |
description | may | Text. |
type | may | overlay or baselayer. |
version | may | A revision of the tile set itself (not of the specification), as a number. |
json | must for pbf | A JSON object with vector_layers and optionally tilestats. |
Each entry of vector_layers has id (the layer name in the
tiles), fields (an object from attribute name to type:
Number, Boolean or String), and optionally
description, minzoom and maxzoom. Other keys may
be added freely.
tiles table or view
| Column | Type | Meaning |
|---|---|---|
zoom_level | integer | Zoom, 0 for the whole world in one tile. |
tile_column | integer | Column, from 0 at the west edge. |
tile_row | integer | Row in the TMS scheme: 0 at the south edge. |
tile_data | blob | The tile image or vector tile. |
Tiles use the global-mercator (spherical Mercator) tile profile, with rows in the
TMS scheme, numbered from the south: for a web map (XYZ) row y counted
from the north, tile_row = 2zoom − 1 − y. A file may have a
unique index on zoom, column and row, and may use SQLite views that give the same
results instead of plain tables.
UTFGrid tables
Optional, for interactive raster maps:
grids:zoom_level,tile_column,tile_row,grid(a gzip-compressed UTFGrid JSON blob).grid_data:zoom_level,tile_column,tile_row,key_name,key_json(JSON for each key in the grid).