XYZ and TMS tile numbering
Converts a map tile's z/x/y between the scheme, which counts rows from the north, and , which counts them from the south.
That tile is TMS 14/4551/10207.
- XYZ
- TMS
Provenance
- Computed by
- indexing.tile.xyz-tms 1.0.0, core 0.1.0
- Model
- S2 geometry and Web Mercator tile arithmetic, as the general S2 and tile tools compute them
- Accuracy
- Exact for indexes and tokens; S2 areas to the precision of the cell's spherical polygon
- Notes
- None
- Cites
- OpenStreetMap Wiki, Slippy map tilenames; Microsoft, Bing Maps Tile System
Something look off?
How we got thisFormula, worked example, sources, and proof
Model: S2 geometry and Web Mercator tile arithmetic, as the general S2 and tile tools compute them
Accuracy: Exact for indexes and tokens; S2 areas to the precision of the cell's spherical polygon
When to use this: Use this when tiles move between systems that number rows differently: web maps and most tile servers use XYZ, while MBTiles files and older TMS servers count from the south. Enter the tile as zoom/x/y and say which scheme it is in. The tool returns it in the other scheme, and both forms side by side. Only the row number changes.
Limitations: The conversion flips the row within the zoom level, y' = 2^zoom − 1 − y, so the zoom must be right for the answer to be. It cannot tell which scheme a tile was written in; a tile that looks wrong on the map is often in the other one, which the tile bounds tool can show. A quadkey has no such ambiguity.
Worked example: An XYZ tile over Pittsburgh at zoom 14. Source: S2 and slippy-map conventions, computed by the core. It is golden test vector v001, and every build checks the tool still gives its answer within its tolerance.
You enter
- y convention of the input
- xyz
- Tile
- 14/4551/6176
You get
- Converted tile
- TMS 14/4551/10207
- XYZ
- 14/4551/6176
- TMS
- 14/4551/10207
Review: Not yet independently reviewed by a GIS professional.
Last verified: 2026-09-18, when a maintainer last confirmed this tool's sources at the issuer. See the sources ledger.
Status: version 1.0.0, core 0.1.0. See this tool in the verification report.
Changes
- 2026-10-14, changed: The focused S2 operations (cell area, hierarchy, token, and vertices), held to s2sphere, and the XYZ-TMS and quadkey tile conversions, held to the slippy-map and quadkey definitions, are now stable, with a new invariants test for areas, parents, corners, and round trips. Results are unchanged. Changelog
Checked against: 21 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.
Sources
- Slippy map tilenames, OpenStreetMap Wiki, Current wiki page. Lon./lat. to tile numbers, tile numbers to lon./lat., resolution and scale.
- Bing Maps Tile System, Microsoft, Online documentation. Tile coordinates and quadkeys; ground resolution = cos(lat) × 2π × 6,378,137 / (256 × 2^level).
Terms
- TMS: Tile Map Service
- A web map tile numbering like XYZ, but with rows counted from the south edge. Source: Slippy map tilenames
- XYZ: XYZ web map tiles
- The common web map tile numbering, zoom/x/y, with rows counted from the north edge. Source: Slippy map tilenames
TMS — Tile Map Service
A web map tile numbering like XYZ, but with rows counted from the south edge.
Source: Slippy map tilenames
XYZ — XYZ web map tiles
The common web map tile numbering, zoom/x/y, with rows counted from the north edge.
Source: Slippy map tilenames