How to use the web mercator tile coordinate converter
- To find a tile, choose Place to tile, enter the latitude, longitude and zoom level.
- To find the area of a tile, choose Tile to bounds and enter the tile X, tile Y and zoom level.
- Read the tile address as zoom/x/y, the size on the ground and the corner coordinates.
- Use the address in a tile server URL pattern.
Formula
n = 2 to the power zoom
x = floor((longitude + 180) / 360 x n)
y = floor((1 - ln(tan(lat) + 1 / cos(lat)) / pi) / 2 x n)
Meters per pixel = 156,543.03 x cos(lat) / 2 to the power zoom, for 256 pixel tiles
Latitude is limited to about 85.05 degrees, where the map becomes a square.
The Eiffel Tower at zoom 14
At 48.8584 north, 2.2945 east and zoom 14 the tile is 14/8296/5636. At that latitude each pixel covers about 6.29 meters, and the tile is 0.02197 degrees of longitude wide.
At zoom 0 the whole world is one tile, 0/0/0, and a pixel at the equator is 156,543.03 meters. Each zoom level doubles the tiles along each side and halves the meters per pixel.
How the tile grid works
Most web maps cut the world into square images in a grid. At zoom 0 there is one tile. At each next level every tile is split into four, so zoom 14 has 16,384 tiles across. The x number counts east from the 180 degree west line, and y counts south from the top edge at about 85 degrees north. This is the same scheme used by many tile servers, which request images by their zoom, x and y.
The projection stretches distances as you move away from the equator, so one pixel covers fewer meters at high latitudes. The tool shows the scale at the latitude of your point, or at the center of the tile.
Check the scheme before using it
Some services number rows from the bottom instead of the top. This tool uses the common top-left origin. For other location encodings see the Geohash Encoder and Decoder and the Geographic Bounding Box Calculator. The Coordinate Format Converter changes degrees, minutes and seconds into decimals, and the Great-Circle Distance Calculator measures real distances, which the projection distorts.
Assumptions and limits
- Tiles are 256 by 256 pixels with the origin at the top left.
- The earth is modeled as a sphere of radius 6,378,137 meters, as in the standard web projection.
- The place shown is an example. Use your own coordinates.
- Zoom levels run from 0 to 22.
Frequently asked questions
Why is latitude limited to 85.05?
The projection stretches without limit toward the poles. The map is cut where it becomes a square, near 85.05 degrees.
What are meters per pixel used for?
To estimate how much ground a map image covers at a given zoom and latitude, for example when choosing a level for a task.
Can I get the corners of a tile?
Yes. Choose Tile to bounds to see the west, east, north and south edges and the center.
Does it work with 512 pixel tiles?
The addresses are the same idea, but the scale per pixel is halved. Divide the meters per pixel by two.