PMTiles/MBTiles Inspector
Inspect PMTiles and MBTiles files: bounds, zoom levels, layer names
PMTiles Viewer and Inspector
This is a free, browser-based PMTiles viewer that lets you inspect PMTiles and MBTiles archives without installing any tools. Drop a .pmtiles or .mbtiles file in (or paste a remote URL), and the inspector reports the bounds, zoom level range, layer names, format type, vector schema, and tile count, then renders an interactive preview on the map. Whether you need to inspect PMTiles you produced yourself or audit one you downloaded, this tool gives you the full picture in a few seconds. Everything runs locally in the browser.
PMTiles is a single-file format for map tiles invented by Brandon Liu and Protomaps. It packs the same content as a directory of XYZ tiles into one file with an embedded directory, so it can be hosted on any static file server (S3, Cloudflare R2, GitHub Pages) and served via HTTP range requests. MBTiles is the older SQLite-based equivalent, popular for offline mobile maps. The inspector handles both formats and is the fastest way to verify a tileset before publishing it.
How PMTiles and MBTiles Differ
MBTiles wraps tiles in a SQLite database. The schema includes a tiles table with zoom_level, tile_column, tile_row, and tile_data columns, plus a metadata table holding name, format, bounds, and other properties. SQLite is universally supported but has the downside that random access requires reading the file into a database engine β clumsy for cloud hosting.
PMTiles solves the cloud hosting problem with a custom binary layout: a header, a root directory, leaf directories (for very large tile sets), and a tile data section. Clients use HTTP range requests to fetch only the bytes they need. A 10 GB PMTiles archive can be served from a static bucket and accessed efficiently by a web map.
Both formats can hold raster tiles (PNG, JPEG, WebP) or vector tiles (MVT). The inspector reports which.
How the Inspector Works
The inspector reads the file header to identify the format and schema version. For PMTiles, it parses the root directory and reports the tile count, byte ranges, and metadata block. For MBTiles, it queries the metadata table directly using sql.js (SQLite compiled to WebAssembly).
For remote URLs, the inspector uses HTTP range requests so you can inspect a tileset on someone else's server without downloading the whole thing. This is exactly how production PMTiles clients work.
Metadata Reported
The inspector reports:
- Format (vector, raster, or unknown)
- Tile format (MVT, PNG, JPEG, WebP)
- Bounding box (in WGS84)
- Centre point
- Min and max zoom levels
- Total tile count
- File size and average bytes per tile
- For vector tiles: layer names, geometry types, attribute schemas
- Compression type (gzip, brotli, none)
- PMTiles spec version or MBTiles schema version
Practical Applications
Tile Production QA
A team generating tiles with tippecanoe wants to verify the output before deploying it. The inspector confirms layer names, zoom ranges, and bounds match expectations.
Third-Party Tileset Audit
A developer integrating someone else's PMTiles into their app needs to know what's inside before writing the style. The inspector lays it bare.
Offline Mobile Map Verification
Mobile devs bundling MBTiles in their app verify the tile set covers the expected area and zoom range.
Bug Reporting
Filing a bug against a tile generator is much easier when you can attach a screenshot of the inspector showing the malformed tile or empty zoom level.
Cost Optimisation
Large PMTiles archives consume bandwidth. The inspector helps identify which zoom levels or layers are oversized so they can be regenerated with tighter bounds or simplification.
Style Development
When authoring a Mapbox/MapLibre style for a third-party tileset, you need the layer names and property schemas. The inspector shows them without writing test code.
Archive Recovery
For PMTiles or MBTiles files of unknown provenance, the inspector reveals the contents without having to set up a tile server.
Step-by-Step Workflow in gis.tools
- Open the PMTiles/MBTiles Inspector page.
- Drag a
.pmtilesor.mbtilesfile in, or paste a remote URL. - The inspector reads the metadata and reports the format, bounds, zoom range, and tile count.
- For vector tiles, expand the layer list to see geometry types and attribute schemas.
- Click Preview on Map to render the tileset on a basemap.
- Pan and zoom to verify rendering at different scales.
- Optionally export the metadata as JSON for documentation.
Worked Example
A developer is building a map of US infrastructure and wants to use a PMTiles file from the Overture Maps dataset. They paste the remote URL into the inspector. Within a few seconds, the metadata appears: format pmtiles, vector tiles with transportation, places, buildings, and landuse layers, zoom range 0β14, bounds covering the contiguous US, total file size 8.2 GB. The transportation layer has 12 attribute fields including class, subclass, name, and surface. The developer copies the layer schema, drops the file URL into a MapLibre GL style as a vector tile source, and immediately starts writing styling rules.
Common Pitfalls and Gotchas
- CORS restrictions β Inspecting a remote PMTiles requires the host to send permissive CORS headers. Many static hosts default to no CORS.
- Compression mismatch β Tiles may be gzip-compressed inside the archive; clients must decompress them, and a mismatch produces blank tiles.
- Schema version drift β PMTiles has evolved through several spec versions. Older tools may not read newer files.
- Empty zoom levels β A tileset declaring zoom 0β14 may not actually contain tiles at every level; the inspector flags gaps.
- MBTiles without metadata β Some older MBTiles files have minimal metadata; the inspector falls back to scanning the tiles table.
- Mixed tile formats β Raster and vector tiles in the same archive is unusual but possible; the inspector reports both.
- Bounding box drift β The declared bounds may exceed the actual tile coverage. Cross-check with the rendered preview.
Tips for Best Results
- For remote URLs, ensure the host supports HTTP range requests and CORS.
- Inspect both the metadata block and the rendered preview β the two should agree.
- Note the tile format (MVT vs raster) before writing a styling rule.
- For very large archives, expect the initial directory load to take several seconds.
- Cross-check layer schemas against your style spec to catch typos.
- Document the spec version of any PMTiles you produce so consumers know what to expect.
- Use the Vector Tile Packager to generate a fresh PMTiles for testing.
Comparison with Other GIS Approaches
The canonical PMTiles inspector is pmtiles.io from Protomaps, which provides a similar UI. The PMTiles CLI (pmtiles show) does the same in the terminal. For MBTiles, the canonical tool is the mbtiles Python library plus desktop viewers like MBView. The browser-based gis.tools inspector combines both formats in one UI and adds layer schema introspection that few other tools offer.
Performance Considerations
Metadata reads are fast because they only fetch the header and root directory β typically a few hundred kilobytes regardless of total file size. The rendered preview fetches tiles on demand based on the visible viewport, so panning and zooming feel snappy even for multi-gigabyte archives.
Data Privacy and Browser-Based Processing
For local files, everything runs in your browser tab. For remote URLs, the inspector makes HTTP range requests directly from your browser to the host β no proxy server in between.
Related GIS Concepts
HTTP Range Requests β The HTTP feature that lets clients fetch arbitrary byte ranges from a file, the foundation of cloud-hosted PMTiles.
Tile Pyramid β The multi-zoom data structure both formats organise their tiles around.
Mapbox Vector Tile Spec β The protobuf schema PMTiles and MBTiles vector archives use internally.
Protomaps β The open-source ecosystem that introduced PMTiles, including the CLI, viewer, and basemap.
Frequently Asked Questions
Can I inspect a PMTiles file hosted on S3?
Yes β paste the URL. The S3 bucket must have CORS enabled.
What's the difference between PMTiles and MBTiles?
PMTiles is optimised for static cloud hosting; MBTiles is a SQLite database better suited to local files.
Does the inspector modify the file?
No β it's read-only.
Can I extract individual tiles?
This tool focuses on inspection. For tile extraction, use the pmtiles CLI.
Related Tools on gis.tools
Related Tools
View All ToolsGeoJSON Validator & Fixer
Validate GeoJSON and fix common issues like ring winding and invalid coordinates
Import & ExportShapefile Viewer & Converter (to GeoJSON)
Convert Shapefile (.shp, .dbf, .prj) to GeoJSON format in your browser
Import & ExportWKT Viewer & WKB Converter
View and convert Well-Known Text (WKT) and Well-Known Binary (WKB) geometries
Import & ExportCSV to Points Layer
Build a points layer from CSV with latitude/longitude columns
Import & ExportMap Style Converter
Convert between Mapbox style JSON and simplified style schemas
Import & ExportAttribute Table Exporter
Export feature attributes to CSV or Excel format
Import & Export100% client-side processing - your data stays private and never leaves your device