Map Tile Calculator

Convert between coordinates, slippy map tiles, TMS rows and quadkeys — with resolution and tile counts.

The Map Tile Calculator runs entirely in your browser. Coordinates you enter are converted on your device, and no tiles or map requests are fetched.

Open the Coordinate Converter

About Map Tile Calculator

Web maps cut the world into a quadtree of 256-pixel tiles in the Web Mercator projection. At zoom z there are 2^z tiles per axis, numbered from the north-west corner — the XYZ scheme used by OpenStreetMap, Mapbox and almost everything else. TMS numbers the same grid from the south-west, which is why a layer sometimes appears vertically mirrored, and Bing interleaves the x and y bits into a single quadkey string. This calculator converts between all of them, reports the ground resolution and map scale at the tile's latitude, and counts how many tiles a bounding box needs across a zoom range, which is the number that decides whether an offline cache is sensible.

Features

How to use the Map Tile Calculator

  1. Enter a latitude, longitude and zoom to find the tile that contains it
  2. Or paste a z/x/y tile or a quadkey to go the other way
  3. Read the bounds, centre, resolution and scale for that tile
  4. Switch to tile count mode to size an offline cache for a bounding box

Example

Input

51.5074, -0.1276 at zoom 12

Output

XYZ 12/2046/1362 · TMS 12/2046/2733
Quadkey 031313131112 · 24.2 m per pixel

The same tile in three numbering schemes — mixing XYZ and TMS is why a layer occasionally appears upside down.

Common errors & troubleshooting

Frequently asked questions

How do I convert latitude and longitude to a map tile?
Longitude maps linearly across the grid; latitude goes through the Mercator formula first. At zoom z, x is (lon + 180) ÷ 360 × 2^z and y comes from the log-tangent projection — both floored to give the containing tile.
What is the difference between XYZ and TMS tiles?
Only the row numbering. XYZ counts rows from the north, TMS from the south, so a TMS row is 2^z − 1 − y. The columns are identical, which is why a mismatch shows up as a vertical flip rather than random tiles.
What is a quadkey?
Bing's tile identifier: one digit per zoom level, formed by interleaving the x and y bits. Each digit picks a quadrant of the previous tile, so the string doubles as the path down the quadtree.
How many tiles are there at each zoom level?
4^z. Zoom 0 is one tile, zoom 10 is just over a million, and zoom 18 is nearly 69 billion — which is why nobody caches a whole planet above about zoom 12.
What is the ground resolution of a map tile?
About 156,543 metres per pixel at the equator at zoom 0, halving with each level and shrinking with the cosine of latitude. At zoom 12 in London that works out to roughly 24 metres per pixel.

Related tools

All ArrayKit tools