# MBTiles raster — MBTiles (raster tiles)

> MBTiles raster (MBTiles (raster tiles)): SQLite-based single-file container for pre-rendered PNG or JPEG map tiles in a Web Mercator tile pyramid. Specs, software and free sample files; convert MBTiles raster to 50 formats online.

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

> MBTiles files can also contain vector data. [Read about MBTiles](https://beta.mygeodata.cloud/formats/mbtiles) — Single-file SQLite container for vector map tiles on a Web Mercator grid, used for offline and portable maps. [Convert MBTiles](https://beta.mygeodata.cloud/converter/mbtiles)



## What is a MBTiles raster file?

MBTiles is a specification defined by Mapbox for storing map tiles in a single SQLite database file. In its raster form, each tile is a pre-rendered image, usually PNG or JPEG, addressed by zoom level, column and row. The format is used to package basemaps, orthophotos and other rendered imagery for offline use on mobile devices, for serving tiles from a lightweight tile server, and for moving large tile sets as one file.

The database contains a tiles table, or an equivalent view, holding the image blobs, and a metadata table with name–value pairs such as format, bounds and zoom range. Tiles follow the spherical Web Mercator (EPSG:3857) grid, with rows numbered in the TMS scheme from the bottom. Pixel data is limited to what the image payload supports: 8-bit RGB with JPEG, or RGB and RGBA with PNG. Original analytical values, such as elevation or reflectance, are therefore not preserved.

MBTiles raster files are usually exchanged by people who publish basemaps or orthophotos, or who need map imagery on a phone without a network connection. The file is a SQLite database, so it can become very large and is best copied as a whole. Check the zoom range and bounds in the metadata, and the tile image format, before sharing or converting it.

### Technical details

| | |
|---|---|
| Full name | MBTiles (raster tiles) |
| Data type | Raster · Tiles & pyramids |
| File extension | .mbtiles |
| Files | Single file |
| Media type | — |
| Bands | Typically RGB; RGBA if PNG. |
| Pixel types | 8-bit unsigned (via PNG/JPEG payload) |
| Compression | PNG (lossless), JPEG (lossy) |
| Coordinate system | Always Web Mercator tiling scheme (EPSG:3857) |
| Converter support | Read & write |
| Typical software | QGIS, GDAL/OGR, MapTiler, TileServer GL, Global Mapper, Mobile Atlas Creator |
| 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 raster files — free download

- [Sentinel-2 true colour (raster tiles)](https://beta.mygeodata.cloud/static/landing/samples/v1/mbtiles_raster/st-helena-sentinel2-rgb.mbtiles) — Sentinel-2 L2A true-colour image of Saint Helena from 20 April 2024 (S2A_29LRC_20240420_0_L2A), 8-bit RGB with a contrast stretch, 10 m pixels (1812×1524), UTM zone 30S. Web Mercator JPEG tiles with overviews. (776 kB, EPSG:3857)
- [Shaded relief (raster tiles)](https://beta.mygeodata.cloud/static/landing/samples/v1/mbtiles_raster/st-helena-relief.mbtiles) — Colour shaded relief of Saint Helena (hypsometric tint × multidirectional hillshade) from Copernicus DEM, 20 m, 8-bit RGB, UTM zone 30S. Web Mercator PNG tiles with overviews. (872 kB, EPSG:3857)

### Convert MBTiles raster to other formats

- [MBTiles raster to JPG](https://beta.mygeodata.cloud/converter/mbtiles-raster-to-jpg)
- [MBTiles raster to TIF](https://beta.mygeodata.cloud/converter/mbtiles-raster-to-tif)
- [MBTiles raster to PNG](https://beta.mygeodata.cloud/converter/mbtiles-raster-to-png)
- [MBTiles raster to HFA](https://beta.mygeodata.cloud/converter/mbtiles-raster-to-hfa)
- [MBTiles raster to KMZ raster](https://beta.mygeodata.cloud/converter/mbtiles-raster-to-kmz-raster)
- [MBTiles raster to XYZ](https://beta.mygeodata.cloud/converter/mbtiles-raster-to-xyz)
- [MBTiles raster to JP2](https://beta.mygeodata.cloud/converter/mbtiles-raster-to-jp2)
- [MBTiles raster to BIL](https://beta.mygeodata.cloud/converter/mbtiles-raster-to-bil)
- [MBTiles raster to DEM](https://beta.mygeodata.cloud/converter/mbtiles-raster-to-dem)
- [MBTiles raster to GRD](https://beta.mygeodata.cloud/converter/mbtiles-raster-to-grd)
- [MBTiles raster to GeoPDF raster](https://beta.mygeodata.cloud/converter/mbtiles-raster-to-geopdf-raster)
- [MBTiles raster to WEBP](https://beta.mygeodata.cloud/converter/mbtiles-raster-to-webp)
- [MBTiles raster to ENVI](https://beta.mygeodata.cloud/converter/mbtiles-raster-to-envi)
- [MBTiles raster to RST](https://beta.mygeodata.cloud/converter/mbtiles-raster-to-rst)
- [MBTiles raster to AAIGrid](https://beta.mygeodata.cloud/converter/mbtiles-raster-to-aaigrid)
- [MBTiles raster to GIF](https://beta.mygeodata.cloud/converter/mbtiles-raster-to-gif)
- [MBTiles raster to BMP](https://beta.mygeodata.cloud/converter/mbtiles-raster-to-bmp)
- [MBTiles raster to GPKG raster](https://beta.mygeodata.cloud/converter/mbtiles-raster-to-gpkg-raster)

## Frequently asked questions

### Why does my MBTiles tile appear upside down or in the wrong place?

MBTiles numbers rows in the TMS scheme from the bottom, while many web maps use XYZ numbering from the top. Software that mixes the two flips the tile row, so the Y value must be converted as 2^zoom − 1 − y.

### Can I get elevation or original pixel values back from a raster MBTiles file?

No. Tiles hold PNG or JPEG images that were already rendered to 8-bit values, so analytical values such as elevation or reflectance are not preserved. Use the original source raster for analysis.

### Should I choose PNG or JPEG tiles inside MBTiles?

PNG is lossless and supports transparency through an alpha channel, which suits maps with sharp lines and text. JPEG is lossy but usually produces much smaller files for photographic imagery such as orthophotos, and it has no transparency.

### What is a MBTiles raster file?

MBTiles is a specification defined by Mapbox for storing map tiles in a single SQLite database file. In its raster form, each tile is a pre-rendered image, usually PNG or JPEG, addressed by zoom level, column and row. The format is used to package basemaps, orthophotos and other rendered imagery for offline use on mobile devices, for serving tiles from a lightweight tile server, and for moving large tile sets as one file.

The database contains a tiles table, or an equivalent view, holding the image blobs, and a metadata table with name–value pairs such as format, bounds and zoom range. Tiles follow the spherical Web Mercator (EPSG:3857) grid, with rows numbered in the TMS scheme from the bottom. Pixel data is limited to what the image payload supports: 8-bit RGB with JPEG, or RGB and RGBA with PNG. Original analytical values, such as elevation or reflectance, are therefore not preserved.

### How do I open a MBTiles raster file?

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

### What can I convert MBTiles raster to?

Popular conversions are JPG, TIF, PNG, HFA, KMZ raster and XYZ. In total the Converter writes MBTiles raster data to 50 formats.

### How do I create a MBTiles raster file?

Convert existing data to MBTiles raster — for example from TIF, MAP, JPG, PNG and HFA. Upload the file, choose MBTiles raster as output and download the result.

### Which coordinate system does MBTiles raster use?

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

### Is a MBTiles file vector or raster?

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

