Geohash Map — explore geohash cells and precision levels
Visualize geohash cells on a real map. Pan and zoom to draw the base-32 grid at any precision, tap a cell to read its hash, and share the exact view with a link. Everything runs in your browser — no coordinates are uploaded.
How geohash works
A geohash turns a coordinate into a short text key. It repeatedly bisects the world — halving
longitude, then latitude, then longitude again — recording a 1 or 0
each time. Interleaving those two bit streams traces a Z-order (Morton) curve,
and every 5 bits become one base-32 character (digits and lowercase letters,
with a, i, l, o removed to avoid
look-alikes).
The useful consequence is the prefix property: a longer geohash is always
contained inside its shorter prefixes, so 9q8yy7 sits inside 9q8yy
sits inside 9q8. A prefix match is a cheap "is this point in that box" test, and
truncating a hash zooms out to a coarser cell.
The boundary caveat (read this before you rely on prefixes)
The prefix property has a sharp edge that surprises people. The grid is a fixed lattice, so proximity in space does not guarantee proximity in the string. Two points a metre apart that happen to fall on opposite sides of a cell boundary can share a short prefix — or none at all.
A point just west of the prime meridian near London encodes to
gcpuzz; a point just east of it encodes to u10hbp. They are
neighbours on the ground but share zero characters, because the meridian is a
top-level cell boundary. So "different prefix" never means "far away." To find real
neighbours you must compute the eight adjacent geohashes explicitly rather than trusting
string similarity — which is exactly why a proximity search usually queries a cell plus its 8
neighbours.
Geohash length → approximate cell size
Each character adds 5 bits and shrinks the cell by 32×, alternating between splitting longitude and latitude — which is why odd lengths are wider than tall. Sizes below are approximate and measured at the equator; because cells are latitude/longitude rectangles, real ground width narrows as you move toward the poles.
| Length | Approx cell size (equator) | Rough scale |
|---|---|---|
| 3 | ~156 km × 156 km | a small country / region |
| 4 | ~39 km × 20 km | a metro area |
| 5 | ~4.9 km × 4.9 km | a town / district |
| 6 | ~1.2 km × 0.6 km | a neighbourhood |
| 7 | ~153 m × 153 m | a city block |
| 8 | ~38 m × 19 m | a building |
| 9 | ~4.8 m × 4.8 m | a room / parcel |
Geohash across the stack
Geohash's biggest advantage is that it is just a string, so it drops into infrastructure you already run:
- Redis.
GEOADDstores members by longitude/latitude and, under the hood, indexes them with a 52-bit geohash in a sorted set;GEOSEARCHthen does radius and box queries against that ordering. You can also read the standard hash back withGEOHASH. - Elasticsearch / OpenSearch. A
geo_pointfield can be indexed with geohash prefixes, and the geohash-grid aggregation buckets documents into cells of a chosen precision — handy for server-side heatmaps and clustering. - PostGIS.
ST_GeoHash(geometry, precision)encodes a point (or a geometry's centroid/box) to a geohash string, so you can add a cheap text bucket column alongside real geometry columns and index or group on it.
Encode and find neighbours with ngeohash
import ngeohash from 'ngeohash';
// point → geohash (lat, lng, precision)
const hash = ngeohash.encode(37.77, -122.42, 6); // "9q8yy7"
// the box this hash covers: [minLat, minLng, maxLat, maxLng]
const bbox = ngeohash.decode_bbox(hash);
// the 8 surrounding cells — use these, not string similarity
const around = ngeohash.neighbors(hash); Have a geohash and want it as a polygon, WKT, or GeoJSON? Paste it into the universal geometry inspector — it detects geohash, draws the cell, and re-exports it in any supported format.