ForHosting KIT · Travel & geography

Bing Maps quadkey decoder

Turn a Bing Maps quadkey back into the tile it names: 213 is column 3, row 5 at zoom 3, ready to use as the path 3/3/5. Handy for checking a cache key or moving tiles to an XYZ server. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Quadkey
213
You get
X
3
Y
5
Zoom
3
Z
3

A Bing Maps quadkey is a compact base-four address for one square in the global Web Mercator tile pyramid used by Bing Maps, Azure Maps, and many compatible tile caches. Instead of three separate integers for zoom, column, and row, a single string of digits zero through three encodes the full path from the root tile down to a leaf.

How a Bing Maps quadkey becomes tile X, Y, and zoom

The Microsoft Bing Maps Tile System builds a square pyramid in Web Mercator. At zoom one the world splits into four child quadrants labeled zero, one, two, and three; each deeper zoom appends another digit by subdividing the parent. Reading the string from left to right therefore walks from the coarsest bit to the finest bit of the tile indices.

Zoom equals the string length: a three-character key such as two one three is always zoom three, and a sixteen-character key is always zoom sixteen. To recover X and Y, initialize both coordinates to zero, then for each bit position from most significant to least significant apply a binary mask of one shifted left by the remaining depth. Digit zero leaves both bits clear, digit one sets the X bit, digit two sets the Y bit, and digit three sets both bits.

After every digit has been applied, X and Y are ordinary non-negative integers in the half-open range from zero through two to the zoom minus one, matching the familiar z slash x slash y scheme used by OpenStreetMap-style servers once you know the zoom. Classic documentation checks include the key two one three decoding to X equals three and Y equals five at zoom three, and the single digit one decoding to X equals one and Y equals zero at zoom one.

What you send and what you get back

Send one required string under the field quadkey. The value must be a non-empty sequence of the digits zero, one, two, and three only; spaces are trimmed at the edges, but internal whitespace and letters fail validation. Use the free browser form when you are inspecting a suspicious cache key from a Bing or Azure Maps URL and need the XYZ triple immediately.

Call the identical contract from scripts when you migrate a quadkey store to an XYZ tile CDN, generate answer keys for GIS coursework, or assert that a fixed landmark quadkey still maps to the same column and row after a library upgrade. Pair this decoder with a separate encoder or lat-lon-to-tile landing when your workflow needs the inverse direction rather than overloading a single form.

Where Bing quadkey decoding shows up in real work

Map platform engineers constantly receive Bing or Azure Maps tile URLs that embed a quadkey path segment and need the equivalent column and row for an XYZ cache, a debug overlay, or a comparison against OpenStreetMap tiles of the same pyramid cell. Backend services that historically stored only quadkeys for compact primary keys still need a trusted closed form to join against slippy-map shards, warm CDN regions, or export GeoJSON features keyed by z slash x slash y.

Curriculum authors teaching web mapping and GIS want students to see base-four quadrant labels produce integer indices without a silent clamp or floating-point projection step. Logistics and privacy pipelines that keep coarse pyramid keys can decode a batch of quadkeys into bounding tile indices for analytics while keeping the conversion pure and offline.

If you later need the inverse encode of X Y zoom into a quadkey, lat lon to slippy tile indices, or great-circle destination points, treat those as separate search intents and landings rather than overloading this Bing Maps quadkey decoder page.

Migrate Bing quadkeys to XYZ tile paths

Decode stored Bing or Azure Maps quadkey primary keys into z/x/y for CDN warm-up, OpenStreetMap-style caches, and cross-provider tile comparisons.

Debug imagery URLs and cache keys

Paste a quadkey from a production tile URL and instantly recover tile X, Y, and zoom to open the matching pyramid cell in another map client.

What is a Bing Maps quadkey?

A base-four string of digits 0–3 that encodes the path from the root tile to a leaf in the Bing Maps / Azure Maps Web Mercator pyramid. Its length is the zoom level.

What happens if the quadkey has a digit other than 0–3?

Only digits 0, 1, 2, and 3 are legal. Failed validation is not charged.

Does this convert latitude and longitude to a tile?

No. This landing only decodes an existing quadkey into X, Y, and zoom. Lat/lon to slippy tile is a different search intent and tool.

What does it cost?

The browser tool is free and runs locally.

How does the zoom level relate to the length of a quadkey?

They are the same number. A three-digit key such as 213 is always zoom 3, and a sixteen-digit key is always zoom 16. A key can be up to 30 digits long.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/geo/quadkey-decode

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/geo/quadkey-decode \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"quadkey":"213"}'
{
  "quadkey": "213"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "geo.quadkey_decode",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Digits outside zero to three, empty strings, and absurdly long keys fail with a clear invalid_input message rather than inventing a silent wrap.

How a Bing Maps quadkey becomes tile X, Y, and zoom

Empty input and any character outside the four legal digits are rejected with invalid_input before any index is computed.

What you send and what you get back

Common aliases such as quadKey and qk are accepted at parse time while the response always echoes the canonical field name. Length is the zoom level and must stay at most thirty so that two to the zoom remains a practical integer tile count for Worker and browser use. On success the response returns the cleaned quadkey string, integer x and y tile indices, zoom and a mirrored z field, the axis length n equals two to the zoom, a tile_path string in z slash x slash y form, the method tag bing_maps_quadkey, and a compact formula string for documentation. Pricing for successful API calls is the published base of $0.002 per item; validation failures such as a digit five in the middle of the key do not consume prepaid balance.

Where Bing quadkey decoding shows up in real work

Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance.

GIS homework and golden fixtures

Generate stable X/Y/zoom triples from textbook quadkeys so instructors, auto-graders, and regression suites share one Bing Tile System ground truth.

How is zoom related to the string?

Zoom equals the number of characters. For example, "213" is always zoom 3 and decodes to tile X=3, Y=5.

Read the full KIT documentation →