Also available in: Español · Português · Français · العربية
Geohash converter
Encode and decode geohashes, see the cell each one names, and get the eight neighbouring cells you need for a proximity search.
What is a geohash?
A geohash writes a latitude and longitude as one short string, like u09tunquc. It works by repeatedly halving the world: is the point in the eastern half or the western, the northern or the southern, and so on, alternating between the two axes. Each answer is a bit, the bits are grouped in fives, and each group becomes one character from a 32-character alphabet.
Because the halving is progressive, a shorter hash names a bigger box. Four characters cover about twenty kilometres, nine cover a few metres. And crucially, truncating a hash gives exactly the hash of the same place at that lower precision — u09tunquc always sits inside u09tun, which always sits inside u09.
That last property is why geohash is used at all. It means a plain string index can answer a spatial question: to find things near a point, look for rows whose geohash starts with the same prefix. No spatial database, no special index type, just a text column and a LIKE query. The alphabet leaves out a, i, l and o for the same reason a postcode does — those are the characters people misread.
How to use it
- Enter coordinates, or paste a hash. Both directions work. The place buttons include the North Pole, which is where neighbour calculations usually break.
- Pick a length. The panel shows the cell the hash names, its bounds, and its real size in metres at that latitude — cells get narrower toward the poles while their height stays the same.
- Take the neighbours with you. The grid shows the eight cells touching yours. For a proximity search you need all nine, and the section below is the measurement that explains why.
The prefix trick works one way only
Two geohashes sharing a prefix really are close together — that direction is guaranteed by the construction, and it is what makes the technique work. The reverse is not true, and this is where geohash proximity searches quietly go wrong. Two points can be a metre apart and share no prefix at all, if the boundary of a cell happens to run between them.
The usual telling of this is the dramatic version: a metre apart, nothing in common. That is true and it is also rare — measured over random pairs, points 100 metres apart share nothing about 0.01% of the time, one in ten thousand. Quoting that number makes the problem sound like an edge case worth ignoring.
The real cost is much larger and entirely systematic. We measured what a single-cell prefix search actually finds: of the points genuinely within 300 metres, a six-character prefix query returns 68.9% of them. At seven characters and 60 metres it returns 65.8%. At five characters and 1500 metres, 72.6%. In every case roughly a third of the neighbours are simply missing, because they sit across a boundary — not one in ten thousand, but one in three.
The fix is the grid on this page. Search the cell and its eight neighbours, and the same measurement returns over 99%. That is why any serious use of geohash for proximity computes the neighbours, and why a tool that only encodes is giving you half of what you need.
Honest limits, and how this was checked
Cells are not squares and not equal in size. A geohash cell is a rectangle in degrees, so its width in metres shrinks as you move away from the equator while its height does not change. The tool reports both at the latitude you are actually looking at rather than quoting one global figure, and at high latitudes the difference is dramatic.
The neighbours here are computed geometrically: decode the cell to its bounds, step one whole cell out, and re-encode. That is provable from the encoder rather than transcribed from the traditional base-32 border tables, and it makes the edges testable. North of the top row and south of the bottom row genuinely have no neighbour, and the tool reports nothing rather than wrapping to a cell on the other side of the planet. East and west do wrap, because longitude does.
The correctness checks are structural rather than a table of expected answers, since geohash has no single normative document. Five thousand random points round-trip through encode and decode and land inside the cell their own hash names; truncating a hash equals encoding at that precision, across two thousand points at every length; the neighbour relation is symmetric, so the cell east of mine has me as its western neighbour. The recall figures above are recomputed by the test suite rather than trusted as constants.
What this does not do: it will not tell you the distance between two hashes, because a shared prefix bounds that only loosely, and it draws no map — that would mean fetching tiles from someone else's server and telling them where you are looking.
Why is it free?
It is bit-shifting on two numbers, running in your browser. There is no server, no map tile and no account.
Nothing you type is uploaded, stored or logged — worth saying plainly, because the input is a location.