# MBTiles — MBTiles (vector content)

> MBTiles (MBTiles (vector content)): Single-file SQLite container for vector map tiles on a Web Mercator grid, used for offline and portable maps. Specs, software and free sample files; convert MBTiles to 39 formats online.

- Page: https://beta.mygeodata.cloud/formats/mbtiles

> MBTiles files can also contain raster data. [Read about MBTiles raster](https://beta.mygeodata.cloud/formats/mbtiles-raster) — SQLite-based single-file container for pre-rendered PNG or JPEG map tiles in a Web Mercator tile pyramid. [Convert MBTiles raster](https://beta.mygeodata.cloud/converter/mbtiles-raster)



## What is a MBTiles file?

MBTiles is a specification published by Mapbox for storing map tiles in a single SQLite database file. This entry covers its vector side, where each tile holds vector geometry rather than an image. The database contains a metadata table of name/value pairs describing the tileset. A tiles table is indexed by zoom_level, tile_column and tile_row and holds the tile content in a tile_data blob. Rows follow the TMS scheme, so the y index is flipped relative to the XYZ scheme used by most web maps. For vector tilesets the format value is pbf, and a json metadata entry lists the vector layers and their fields.

Because it is a single file, MBTiles is convenient for offline maps, mobile apps and tile servers. Data is fixed to the Web Mercator tile grid and stored at discrete zoom levels. It is therefore a delivery format rather than an editable data source: geometries are clipped to tiles and generalised per zoom level.

Vector MBTiles files are usually produced by a data publisher or web-mapping team and handed to people who run tile servers, build mobile apps or need an offline basemap. The file is a ready-to-serve package, not a working dataset. Check the zoom range, the layer and field list in the json metadata, and the y-axis (TMS versus XYZ) before use. Source data cannot be fully restored from it.

### Technical details

| | |
|---|---|
| Full name | MBTiles (vector content) |
| Data type | Vector · Database & container |
| File extension | .mbtiles |
| Files | Single file |
| Media type | application/x-sqlite3 |
| Geometry types | Point, LineString, Polygon |
| Multiple layers | Yes |
| Mixed geometry in a layer | Yes |
| Attribute names | — |
| Coordinate system | Always Web Mercator tiling scheme (EPSG:3857) |
| Converter support | Read & write |
| Typical software | QGIS, GDAL/OGR, Tippecanoe, TileServer GL, MapTiler, Martin |
| Specification | https://github.com/mapbox/mbtiles-spec |

### Specifications & references

- https://github.com/mapbox/mbtiles-spec
- https://gdal.org/en/stable/drivers/raster/mbtiles.html

### Sample MBTiles files — free download

- [Basemap vector tiles (z10–14)](https://beta.mygeodata.cloud/static/landing/samples/v1/mbtiles_vector_generic/st-helena-basemap.mbtiles) — MBTiles database with Mapbox Vector Tiles, zoom 10–14, layers island, landcover, waterways, contours, roads, buildings and places. (476 kB, EPSG:3857)

### Convert MBTiles to other formats

- [MBTiles to KMZ](https://beta.mygeodata.cloud/converter/mbtiles-to-kmz)
- [MBTiles to KML](https://beta.mygeodata.cloud/converter/mbtiles-to-kml)
- [MBTiles to GeoPDF](https://beta.mygeodata.cloud/converter/mbtiles-to-geopdf)
- [MBTiles to SHP](https://beta.mygeodata.cloud/converter/mbtiles-to-shp)
- [MBTiles to DXF](https://beta.mygeodata.cloud/converter/mbtiles-to-dxf)
- [MBTiles to GeoJSON](https://beta.mygeodata.cloud/converter/mbtiles-to-geojson)
- [MBTiles to GPX](https://beta.mygeodata.cloud/converter/mbtiles-to-gpx)
- [MBTiles to GPKG](https://beta.mygeodata.cloud/converter/mbtiles-to-gpkg)
- [MBTiles to SQLite](https://beta.mygeodata.cloud/converter/mbtiles-to-sqlite)
- [MBTiles to XLSX](https://beta.mygeodata.cloud/converter/mbtiles-to-xlsx)
- [MBTiles to CSV](https://beta.mygeodata.cloud/converter/mbtiles-to-csv)
- [MBTiles to TopoJSON](https://beta.mygeodata.cloud/converter/mbtiles-to-topojson)
- [MBTiles to SVG](https://beta.mygeodata.cloud/converter/mbtiles-to-svg)
- [MBTiles to MapInfo](https://beta.mygeodata.cloud/converter/mbtiles-to-mapinfo)
- [MBTiles to DGN](https://beta.mygeodata.cloud/converter/mbtiles-to-dgn)
- [MBTiles to Parquet](https://beta.mygeodata.cloud/converter/mbtiles-to-parquet)
- [MBTiles to FGB](https://beta.mygeodata.cloud/converter/mbtiles-to-fgb)
- [MBTiles to GML](https://beta.mygeodata.cloud/converter/mbtiles-to-gml)

## Frequently asked questions

### Why does my vector MBTiles show up upside down or in the wrong place?

MBTiles stores rows in the TMS scheme, where the y index counts from the bottom, while most web maps use XYZ, where it counts from the top. If a client or script does not flip y, tiles are requested from the wrong rows and appear misplaced or missing.

### Can I open an MBTiles file without GIS software?

Yes. It is a SQLite database, so any SQLite tool can read the metadata and tiles tables. The tile_data blobs of a vector tileset are encoded as pbf, so they need a vector tile decoder or a GIS application to be read as geometry.

### Is the geometry in an MBTiles file identical to my original data?

No. Features are clipped at tile borders and generalised for each zoom level, and attributes may be reduced when the tiles are built. Converting back to another vector format gives tile-based geometry, not the original source data.

### What is a MBTiles file?

MBTiles is a specification published by Mapbox for storing map tiles in a single SQLite database file. This entry covers its vector side, where each tile holds vector geometry rather than an image. The database contains a metadata table of name/value pairs describing the tileset. A tiles table is indexed by zoom_level, tile_column and tile_row and holds the tile content in a tile_data blob. Rows follow the TMS scheme, so the y index is flipped relative to the XYZ scheme used by most web maps. For vector tilesets the format value is pbf, and a json metadata entry lists the vector layers and their fields.

Because it is a single file, MBTiles is convenient for offline maps, mobile apps and tile servers. Data is fixed to the Web Mercator tile grid and stored at discrete zoom levels. It is therefore a delivery format rather than an editable data source: geometries are clipped to tiles and generalised per zoom level.

### How do I open a MBTiles file?

MBTiles files can be opened in QGIS, GDAL/OGR, Tippecanoe, TileServer GL and MapTiler. Without any software you can preview and convert them online in MyGeodata Cloud.

### What can I convert MBTiles to?

Popular conversions are KMZ, KML, GeoPDF, SHP, DXF and GeoJSON. In total the Converter writes MBTiles data to 39 formats.

### How do I create a MBTiles file?

Convert existing data to MBTiles — for example from GeoPDF, KML, KMZ, GPKG and DXF. Upload the file, choose MBTiles as output and download the result.

### Which coordinate system does MBTiles use?

MBTiles always uses Web Mercator tiling scheme (EPSG:3857).

### Is a MBTiles file vector or raster?

A MBTiles file can store vector data or raster data, depending on how it was created. This page describes the vector variant; the other variant has separate specifications and conversion options.

