What is PMTiles? The map format that turns 5,000,000 files into 1

What is PMTiles? The map format that turns 5,000,000 files into 1

A plain-English guide to the file format behind serverless maps — what it is, how it works, and why it makes hosting a map dramatically cheaper.

ELEMNT Review· ~10 min read


A country-scale digital map is traditionally stored as tens of millions of tiny files — one for every little square you see on screen. PMTiles takes every one of those files and folds them into a single archive that a web browser can read straight from cheap cloud storage, with no map server running anywhere. That one change is why a 50 GB basemap can ship as 1 file instead of 5,000,000.

If you have ever wondered how a modern web map manages to be fast and cheap at the same time, PMTiles is a big part of the answer. Here is what it actually is — no prior GIS background required.

First, what is a "map tile"?

Open any web map and you are not looking at one giant image. You are looking at a grid of small squares, each one loaded separately and stitched together in your browser. Each square is a tile.

Every tile has an address made of three numbers: a zoom level and an x/y position (you will see this written as z/x/y). Zoom out and a handful of tiles cover the whole world. Zoom in to street level and that same world is sliced into billions of tiles. Pan the map and your browser quietly fetches the new tiles that scrolled into view.

So a "basemap" is really a giant pyramid of tiles: a few at the top (zoomed out), many more at every level below.

The old way: a mountain of tiny files

For years, the standard approach was to store that pyramid the obvious way — one file per tile. A national basemap could be tens of millions of files sitting in a folder, or in cloud storage.

This works, but it is expensive and fiddly in three quiet ways:

  • You pay to put them up. Cloud storage charges a small fee for every file you upload. Multiply by millions.
  • You pay every time someone looks. Each tile a visitor sees is a separate request, and you usually need a tile server or a database sitting in front to find and hand out the right file.
  • It never stops costing. Listing, managing, and re-publishing millions of files is a permanent chore. Updating the map can mean rebuilding the whole cache over a weekend, and there is a server someone has to keep patched and awake.

Underneath all of it is one assumption from the 2000s: something has to run on a server to serve a map. PMTiles throws that assumption out.

What PMTiles actually is

PMTiles (short for Protomaps Tiles, an open format created by Protomaps) is a single file that holds the entire tile pyramid — every tile, plus a built-in index that records exactly where each tile sits inside the file.

Think of the index as a table of contents. Because it is baked into the same file, a reader can open the archive, check the contents, and jump straight to the bytes it needs. No database. No tile server. The storage bucket just hands over bytes.

It is also read-only by design — more on why that is a feature, not a limitation, below.

How it works — the reference-book trick

The clever part is a standard, decades-old web feature called an HTTP byte-range request.

Here is the everyday version. Imagine a 2,000-page reference book. You need one fact on page 1,150. You do not photocopy the entire book — you check the index, flip to page 1,150, and read it. A web browser reading PMTiles does exactly the same thing:

  1. It reads the first 16 kilobytes of the file. That small slice always contains the header and the index — the table of contents.
  2. It then asks storage for just the bytes of the one tile it needs, and gets them back.

That's it. The format guarantees that any tile can be found in at most two range requests, no matter how large the file is — whether the archive is 50 megabytes or the entire planet at 100 gigabytes. Every modern CDN and object store (Amazon S3, Google Cloud Storage, Cloudflare R2) supports byte-range requests natively, so there is nothing special to install.

Two small touches make it even faster, and you don't need to memorize them — just know they exist:

  • Neighbours stay together. PMTiles orders tiles along a path called a Hilbert curve, which keeps tiles that are next to each other on the map next to each other in the file. So a whole screen of tiles can often be grabbed in one efficient read instead of dozens.
  • Repeats are stored once. A vector basemap has a lot of identical tiles — every empty ocean square looks the same. PMTiles stores that blob once and points many tiles at it, which shrinks the file.

Why it matters — the math

Strip away the internals and the practical wins are simple:

Old tile pyramidPMTiles
Files to host (50 GB basemap)~5,000,0001
Tile server / database neededYesNo
How a tile is fetchedApp logic + lookupOne byte-range read
Caches on a CDNAwkwardNatively
Updating the mapRebuild the cacheSwap one file

Fewer moving parts means lower cost and far less to operate. There is no server burning money while it waits for traffic, and your hosting bill tracks cheap storage and bandwidth instead of per-request server time.

Where ELEMNT fits

ELEMNT is PMTiles-native. It serves PMTiles archives straight from object storage behind a global CDN edge — no tile server in the path — and it is drop-in compatible with MapLibre, the open-source map renderer, so existing maps keep working. On that architecture, ELEMNT's published serving cost works out to about $0.0000141 per tile.¹

The point of the format, and of building on it, is the same: you should be able to go from a single project to a billion tile requests without bill shock, without a room full of map servers, and without locking your data inside one vendor's walls. PMTiles is an open format — your data stays portable.

The honest caveat

PMTiles is immutable — read-only. You do not edit individual tiles inside an archive. To change a layer, you build a fresh archive and swap it in. That sounds like a limitation, but it is exactly the trade that keeps serving so cheap and simple: because the file never changes underneath you, any CDN can cache it aggressively and every read is safe to retry.

It is also a serving format, not a Swiss Army knife. PMTiles is for delivering maps fast and cheap. It is not a turn-by-turn navigation engine and not a live editing database — those are different jobs, handled by different tools alongside it.

The takeaway

PMTiles answers a question that used to require a server rack: how do you put a whole country's map in front of a browser, quickly, for almost nothing? The answer is one indexed file and a standard web feature that has been around since 1999 — no tile server required.


¹ Per-tile serving cost is ELEMNT's published architecture figure (≈$0.0000141/tile at 50M tiles/month), not a customer-reported result — ELEMNT is pre-launch. PMTiles technical claims are from the Protomaps PMTiles v3 specification and documentation.

Sources: PMTiles v3 specification & docs (Protomaps), PMTiles on GitHub, What's new in PMTiles V3.


What is ELEMNT?

ELEMNT is the cloud-native geospatial data platform — open formats (PMTiles, COG, Zarr, GeoParquet) served straight from object storage, OGC API-compliant, with transparent pay-per-use pricing and no vendor lock-in. From a single project to a billion tiles. Earth Traffic is one demo of what it can do.