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
- Latitude and longitude to XYZ tile at any zoom, and back again
- TMS row conversion for layers that count from the south
- Quadkey encoding and decoding for Bing-style tile services
- Tile bounds, centre point and ground width in metres
- Resolution in metres per pixel and the 1:N map scale at that latitude
- Parent and child tiles for walking the quadtree
- Tile counts for a bounding box across a whole zoom range
- URL template filling with {z}/{x}/{y}, {-y}, {q} and {s} placeholders
How to use the Map Tile Calculator
- Enter a latitude, longitude and zoom to find the tile that contains it
- Or paste a z/x/y tile or a quadkey to go the other way
- Read the bounds, centre, resolution and scale for that tile
- 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
- The tile layer appears vertically mirrored. — XYZ and TMS have been mixed. They share the x column but count rows from opposite ends, so the fix is either flipping y or switching the URL template to the {-y} placeholder.
- Latitudes near the poles produce odd tiles. — Web Mercator cuts the world off at about 85.05 degrees so the map is square. Anything beyond that is clamped to the edge tile, which is why polar data needs a different projection.
- A cache download is enormous. — Tile counts quadruple with every zoom level. Check the per-zoom breakdown here before starting — one extra level often costs more than all the levels below it combined.
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
- Geohash Converter — Encode latitude/longitude to a geohash and decode a geohash back to coordinates, with bounding box and neighbors.
- Coordinate Converter (DMS & Decimal) — Convert coordinates between decimal degrees, DMS and degrees-decimal-minutes, both ways, in your browser.
- GeoJSON Bounding Box — Get the bounding box, centre, area and length of any GeoJSON, in both coordinate orders.
- Distance Between Coordinates — Measure the great-circle distance between two latitude/longitude points in km, miles and nautical miles, with bearing and a map.
- MGRS Converter — Convert between latitude/longitude and MGRS (Military Grid Reference System) coordinates, both ways, in your browser.
- Plus Codes Converter — Convert between latitude/longitude and a Plus Code (Open Location Code) both ways, with the covered bounding box and cell size.
All ArrayKit tools