Web Map Kit for QGIS

Web Map Kit › QGIS to PMTiles

How to export QGIS layers to PMTiles vector tiles

PMTiles packs a whole set of vector tiles into one file that a browser can read piece by piece. No tile server, no database: upload one file and your map loads only what's on screen.

By M, certified GIS professional · 30 September 2026

Short answer. In QGIS, run Processing → Vector tiles → Write Vector Tiles (MBTiles), then convert the result with the free pmtiles tool: pmtiles convert layers.mbtiles layers.pmtiles. Or use tippecanoe on GeoJSON exports. Or let the Web Map Kit plugin do it in one click, including your styling, a ready web viewer and the upload.

Why PMTiles?

Method 1: QGIS's vector tile writer + the pmtiles tool

  1. Open Processing → Toolbox and search for Write Vector Tiles (MBTiles).
  2. Add your layers, set the minimum and maximum zoom (for a city, roughly 10–16; for a country, 4–12; for the world, 0–8) and choose an output .mbtiles file.
  3. Install the pmtiles command-line tool (a single download) and convert:
pmtiles convert layers.mbtiles layers.pmtiles
pmtiles show layers.pmtiles      # check zoom levels and layer names

What you don't get: the QGIS styling. The tiles hold geometry and attributes only; you write the colours again as a MapLibre style.

Method 2: tippecanoe

For very large datasets, tippecanoe gives the most control over simplification and feature dropping, and writes PMTiles directly. Export each layer from QGIS as GeoJSON (in EPSG:4326), then:

tippecanoe -o layers.pmtiles -zg --drop-densest-as-needed \
  -L roads:roads.geojson -L buildings:buildings.geojson

tippecanoe runs on macOS and Linux (on Windows, through WSL). As with method 1, the styling is up to you.

Method 3: Web Map Kit (styling, viewer and upload included)

Web Map Kit is our QGIS plugin ($17 once). It does methods 1 and 2's work inside QGIS and then goes further:

See it on real data: 35,000 power plants and US tornado paths since 1950, both one PMTiles file each.

See Web Map Kit · $17 once

Hosting and showing a PMTiles file yourself

  1. Upload the file to storage that supports range requests. On Cloudflare R2, connect a public domain to the bucket and add a CORS rule allowing GET and HEAD from your site.
  2. Show it with MapLibre GL JS and the pmtiles JavaScript library:
<script src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>
<script src="https://unpkg.com/pmtiles/dist/pmtiles.js"></script>
<script>
  const protocol = new pmtiles.Protocol();
  maplibregl.addProtocol("pmtiles", protocol.tile);
  const map = new maplibregl.Map({
    container: "map",
    style: { version: 8, sources: {
      data: { type: "vector", url: "pmtiles://https://maps.example.com/layers.pmtiles" } },
      layers: [{ id: "roads", type: "line", source: "data", "source-layer": "roads",
                 paint: { "line-color": "#0f766e", "line-width": 1.5 } }] }
  });
</script>

The source-layer names are your layer names from the export step (check them with pmtiles show).

Questions

Can QGIS export PMTiles directly?

QGIS writes vector tiles to MBTiles (or a folder of tiles); converting MBTiles to PMTiles takes one pmtiles convert command. Web Map Kit does both steps inside QGIS.

Do I need a tile server?

No. PMTiles is read with HTTP range requests from any static hosting that supports them.

Which zoom levels should I use?

Go as deep as your data's detail needs and no deeper: every extra zoom level roughly quadruples the number of tiles. Streets and parcels need 15–16; countries and regions 8–10.

Is PMTiles the same as MBTiles?

Both hold the same tiles. MBTiles is a SQLite database and needs a server to read it; PMTiles is designed to be read straight from static storage.