AZ Tools

Geohash Encoder

Convert

Geohash is a hierarchical spatial index that encodes a lat/lng pair into a short string of base-32 characters. Each additional character refines the cell by a factor of 32, so precision 5 gives ~5 km cells, precision 8 gives ~38 m cells, and precision 12 gives ~3 cm cells. The format is widely used for proximity search in databases (Redis GEO, MongoDB, Elasticsearch), tiling, and IoT location batches. This tool encodes a coordinate to any precision 1-12, decodes back with the bounding box, and shows all 8 neighboring cells (useful for proximity queries that need to check adjacent cells).

Cities
Geohash
wydm9qy89
Center coordinate
37.566483, 126.977985
Bounding box
S 37.566462, W 126.977963
N 37.566504, E 126.978006
8 neighbors + center
NW
wydm9qy8b
N
wydm9qy8c
NE
wydm9qy8f
W
wydm9qy88
center
wydm9qy89
E
wydm9qy8d
SW
wydm9qy82
S
wydm9qy83
SE
wydm9qy86

Cell size halves alternately by character. Precision 9 (~5 m) is good for delivery; 5 (~5 km) for city-scale proximity.

How to use

  1. Encode mode: enter lat/lng (decimal degrees, e.g. `37.5665, 126.978`) and pick precision.
  2. Decode mode: paste a geohash; you get the center coordinate and bounding box.
  3. Neighbors are computed automatically — useful for 'find points near X' queries that should also check the 8 surrounding cells.

Frequently asked questions

What's the alphabet?
Base-32 with characters `0-9bcdefghjkmnpqrstuvwxyz` — the letters `a`, `i`, `l`, `o` are excluded to reduce ambiguity (looks like 4, 1, 1, 0). This is the standard Niemeyer alphabet used by every geohash library.
How precise is each level?
Cell size halves alternately in longitude and latitude per character. Approximate cell widths at the equator: 1→5000 km, 3→156 km, 5→4.9 km, 7→153 m, 8→38 m, 9→4.8 m, 12→3.7 cm. Cells get narrower toward the poles.
Why are neighbors useful?
Geohash cells form a grid. A point near a cell boundary may have its nearest neighbor in an adjacent cell — so 'find points within 1 km' shouldn't just query the target cell, it should query the 3×3 block. The neighbor function gives you the 8 surrounding hashes to OR into your query.

Related tools