ForHosting KIT · Travel & geography

Geohash bounding box

The geohash 9q8yy decodes to a cell from 37.749023438 to 37.79296875 latitude and -122.431640625 to -122.387695312 longitude, centred on 37.770996094, -122.4096679685. Paste any hash of 1 to 12 characters to get the box, corners and centre. 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
Geohash
9q8yy
You get
Precision
5

A geohash packs a geographic point into a short base-32 string by interleaving longitude and latitude bits and slicing the world map into nested rectangles. Each longer character refines the cell until the string represents a precise bounding box rather than a single coordinate. This capability decodes any valid Gustavo Niemeyer geohash into that rectangle: minimum and maximum latitude and longitude, named corner points, and a center suitable for map markers and spatial queries. Invalid characters outside the geohash alphabet fail with a clear invalid input error and are not charged.

What a geohash bounding box is and how to supply the string

A geohash is a hierarchical spatial index invented for proximity search and map tiling. The alphabet uses ten digits and twenty-two letters, skipping a, i, l, and o so strings stay readable and avoid confusion with digits. Decoding starts from the full WGS84 world rectangle from longitude minus one hundred eighty to plus one hundred eighty and latitude minus ninety to plus ninety.

Each character contributes five bits; bits alternate longitude then latitude, and each bit chooses the lower or upper half of the current interval. After all characters are consumed, the remaining interval is the cell that the geohash uniquely identifies. Length may range from one to twelve characters: short hashes cover large regions useful for coarse filters, while longer hashes tighten the box toward street-level cells.

Reading bbox fields, corners, center, and precision

Convenience corners sw, ne, nw, and se restate the same extents as latitude and longitude pairs for mapping libraries that expect southwest and northeast markers or polygon vertices. The center field is the arithmetic midpoint of the latitude and longitude intervals, which is the usual map pin location when you only need one point inside the cell.

Use bbox alone when you build SQL BETWEEN filters or R-tree queries; use corners when drawing a rectangle overlay; use center when dropping a single marker for a hashed location from a database column. Precision tells you how coarse the cell is: one character spans a huge continental slice, while eight or more characters often sit at neighborhood scale depending on latitude. Validation failures never invent coordinates; they fail closed so spatial joins cannot silently widen.

Spatial database filters

Turn stored geohash keys into min/max lat-lon ranges for BETWEEN clauses, tile loads, and coarse candidate sets before a precise distance check.

Map debugging and teaching

Paste a geohash from logs or homework and immediately see the cell rectangle, corners, and center without installing a GIS desktop suite.

How do I get a bounding box from a geohash?

The response includes bbox min/max latitude and longitude plus corner and center points.

What characters are allowed in a geohash?

Digits 0-9 and letters bcdfghjkmnpqrstuvwxyz (case-insensitive). Letters a, i, l, and o are not used.

Does this encode coordinates into a geohash?

No. This capability only decodes an existing geohash into its WGS84 bounding box. Encoding lat/lon is a separate product intent.

Is the geohash bounding box calculator free?

The browser tool runs free on your device.

What precision lengths are supported?

Geohash strings from 1 to 12 characters. Longer strings refine the cell; precision in the response equals the character count after normalization.

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/geohash-bbox

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/geohash-bbox \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"geohash":"9q8yy"}'
{
  "geohash": "9q8yy"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "geo.geohash_bbox",
  "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.

The algorithm is pure deterministic bisection with no network calls, so map backends, logistics tools, and GIS pipelines can pin the JSON in tests.

What a geohash bounding box is and how to supply the string

Send the required field geohash as a JSON string; aliases hash and gh are accepted when your client already uses those names. Case is ignored and the response echoes a lowercase normalized value. Empty strings, missing fields, lengths outside the range, and any character not in the base-thirty-two alphabet raise invalid_input with a message that names the bad character and its position when possible. Because the path is pure arithmetic, identical geohashes always produce identical JSON with no wall clock, random seed, or external geocoder involved.

Reading bbox fields, corners, center, and precision

On success the response includes geohash, precision equal to the character length, and a bbox object with min_lat, min_lon, max_lat, and max_lon in decimal degrees. Those four numbers are the closed WGS84 extent of the cell after bit bisection, rounded to a stable digit count that grows gently with precision so values remain JSON-friendly without false precision noise. The method label is always geohash_base32_bisection so downstream code can assert the algorithm without sniffing shapes.

API usage, pricing, map workflows, and practical limits

Send a JSON body with the required geohash string and call the free in-browser geohash bounding box tool for teaching, debugging stored hashes, and quick visual checks without installing geospatial libraries. Use the prepaid API when a logistics platform, delivery router, tile cache, or analytics pipeline needs a stable contract under KIT balance at $0.002 per successful item; validation failures never consume balance after the engine rejects the request. Pair this endpoint with reverse-geocoding or tile fetch steps in your own stack when you need place names or imagery: this product only expands the hash geometry. Length is capped at twelve characters to cover practical map precisions while keeping Worker isolate work bounded. Authors shipping SDKs can map min_lat and max_lon directly into Leaflet, MapLibre, or Google Maps LatLngBounds constructors—the same rectangle every standard geohash library computes when it exposes a bounding box API.

Logistics and IoT pipelines

Devices or warehouse systems emit geohashes; backends expand them to bounding boxes for zone checks, heatmaps, and routing envelopes via a stable prepaid API.

Read the full KIT documentation →