GIS Tools

Language

Made withfor the GIS community

Vector Tile Packager

Convert GeoJSON to Mapbox Vector Tiles (MVT) for preview

Import & Export

Load GeoJSON

Configure for vector tiles

Original
Tile Preview

About Vector Tiles

  • β€’ Vector tiles split data into a grid for efficient rendering
  • β€’ Lower zoom = larger area, more generalization needed
  • β€’ The config file can be used with tippecanoe or similar tools
  • β€’ Preview shows how data will be clipped to tiles

What Are Mapbox Vector Tiles (MVT)?

Mapbox Vector Tiles (MVT) are a compact binary format for serving vector geographic data as tiles, the same way raster tiles work for satellite imagery. Each tile contains the geometry, attributes, and styling hints for a small slice of the world at a specific zoom level. The advantage over GeoJSON is that the client only downloads the tiles for the current view, not the entire dataset, making MVT the foundation of fast, smooth, infinitely-zoomable web maps in Mapbox GL JS, MapLibre GL JS, and OpenLayers.

The Vector Tile Packager on gis.tools is a free, browser-based tool that converts a GeoJSON file into a set of MVT tiles you can preview, inspect, and use for testing. Drop a GeoJSON in, set the zoom range, and the packager slices the data into tiles using the same algorithms as Mapbox's tippecanoe and geojson-vt libraries. Everything runs locally β€” no Mapbox account, no Mapbox uploads, no telemetry.

How Vector Tile Packaging Works

The packager uses a streaming GeoJSON reader to parse the input, then runs a tiling algorithm that:

  1. Determines the bounding box of each feature.
  2. Decides which tiles at each zoom level the feature touches.
  3. Clips the feature to each tile's boundary, with a small buffer to avoid visible seams.
  4. Encodes the clipped geometry into the MVT protobuf format.
  5. Optionally applies feature-density-based simplification for higher zoom levels.

The result is a directory of .pbf files (one per tile) organised in the standard {z}/{x}/{y} structure that web map renderers expect.

Tile Pyramid Structure

Web maps use a tile pyramid: zoom 0 is one tile covering the whole world; zoom 1 is four tiles; zoom 2 is sixteen; and so on. By zoom 14, the world is divided into 268 million tiles. The packager generates tiles only for the zoom range you specify and only for the area covered by your data.

Generalisation by Zoom

A fundamental MVT trick is that lower zoom levels show simplified geometry. A country boundary at zoom 0 doesn't need every coastal vertex; the packager applies the Douglas-Peucker algorithm with a tolerance proportional to the tile size at each zoom level.

Layer Encoding

A single MVT tile can hold multiple named layers (e.g., roads, buildings, water). The packager treats the input GeoJSON as one layer by default but can split features into multiple layers based on a property.

Practical Applications

Web Map Performance Testing

Developers building Mapbox GL or MapLibre maps need test data in MVT format to validate their styles. The packager produces tile sets locally for offline testing.

Self-Hosted Map Tile Servers

Operators running their own tile servers (Tegola, Martin, pg_tileserv, OpenMapTiles) can pre-generate tiles from a GeoJSON dataset and serve them statically.

Embedded Maps in Static Sites

A blog post or article that needs an interactive map can ship the MVT tiles alongside the HTML, no backend required.

Mobile Offline Maps

Mobile mapping apps that work offline need bundled tile sets. MVT is the most efficient vector format for the use case.

Style Development

Cartographers iterating on Mapbox style JSON need a known dataset to develop against. Generating MVT from a sample GeoJSON gives them that.

Educational Demos

Instructors teaching web cartography concepts use the packager to demonstrate how vector tiles differ from raster tiles and from full GeoJSON.

Bandwidth-Constrained Deployments

NGOs deploying maps in low-bandwidth regions benefit from MVT's compactness and efficient on-demand loading.

Step-by-Step Workflow in gis.tools

  1. Open the Vector Tile Packager page.
  2. Drag a .geojson file into the drop zone.
  3. Set the minimum and maximum zoom levels (typical: 0–14).
  4. Optionally configure the layer name and any property-based layer splitting.
  5. Click Generate Tiles β€” the packager produces a downloadable archive of .pbf files.
  6. Preview the result on the built-in tile viewer to verify rendering.
  7. Download the archive and serve from a web server, CDN, or static hosting.

Worked Example

A cartographer is building a custom map of public art installations across a city. Her GeoJSON has 1,200 point features. She drops it into the packager, sets the zoom range to 10–16 (city to street level), names the layer art_pieces, and generates the tiles. The output is a 480 KB archive containing 314 tiles. She uploads the tiles to her static site host, references them from a MapLibre GL style as https://example.com/tiles/{z}/{x}/{y}.pbf, and the map loads smoothly on every device.

Common Pitfalls and Gotchas

  • Over-tiling at high zooms β€” Generating tiles up to zoom 18 for a continent-scale dataset produces millions of tiles, most of them empty.
  • Wrong CRS β€” MVT assumes Web Mercator (EPSG:3857). Reproject before packaging.
  • Feature simplification artefacts β€” Aggressive simplification at low zooms can produce sliver gaps.
  • Property name collisions β€” Mapbox style spec is case-sensitive; mismatched property names break the styling.
  • Antimeridian crossing β€” Features that cross 180Β° longitude need special handling.
  • Empty tiles β€” Areas with no data still generate empty tile entries; the packager can skip these to save space.
  • Buffer size β€” Too small a buffer creates visible seams; too large wastes bytes.

Tips for Best Results

  • Choose a zoom range that matches your data's scale β€” don't generate zoom 18 tiles for country boundaries.
  • Validate the GeoJSON with the GeoJSON Validator & Fixer before packaging.
  • Use the GeoJSON Simplifier for additional control at low zooms.
  • For multi-layer maps, prepare your GeoJSON with a layer property and use property-based splitting.
  • Reduce file size further with the Coordinate Precision Reducer.
  • Verify the output with the PMTiles/MBTiles Inspector if you're packaging into a single file.
  • Test on real network conditions to confirm load performance.

Comparison with Other GIS Approaches

Mapbox's tippecanoe is the industry-standard CLI tool for generating MVT, with a vast feature set. PostGIS has ST_AsMVT for serving tiles directly from a database. Tegola and Martin are server-side tile generators. The browser-based gis.tools packager is the simplest option for one-off tile generation without installing a tippecanoe binary or running a database.

Performance Considerations

Tile generation is CPU-intensive but parallelisable. The browser handles up to a few hundred megabytes of GeoJSON before slowing down. For very large datasets, use tippecanoe on the command line.

Data Privacy and Browser-Based Processing

The entire packaging operation runs in your browser tab. No data is uploaded; no telemetry is collected. The generated tiles are downloaded directly to your machine.

Related GIS Concepts

MVT Specification β€” The Mapbox-defined protobuf schema for vector tiles, now widely adopted.

Tippecanoe β€” Mapbox's reference implementation of GeoJSON-to-MVT conversion.

PMTiles β€” A single-file alternative to directories of .pbf tiles, with HTTP range request support.

MBTiles β€” An older single-file SQLite-based tile container, common in offline mobile maps.

Frequently Asked Questions

What's the difference between MVT and PMTiles?

MVT is the tile format. PMTiles is a single-file container that stores MVT tiles plus metadata. The PMTiles/MBTiles Inspector handles the container side.

Can I use the tiles with Leaflet?

Leaflet doesn't natively render MVT, but plugins like Leaflet.VectorGrid can.

What zoom range should I use?

Match your data's scale: 0–6 for global, 6–10 for country, 10–14 for city, 14–18 for street level.

Can I generate raster tiles from GeoJSON?

Not with this tool β€” it produces vector tiles. For raster tiles from raster data, see the GeoTIFF Tiles Preview.

Related Tools on gis.tools

100% client-side processing - your data stays private and never leaves your device