The Short Answer
A geohash is a short string of letters and numbers — something like "u4pruyd" — that identifies a specific rectangle of land anywhere on Earth. It is a clever way of compressing latitude and longitude into a compact code you can text, tweet, or type from memory. The longer the code, the smaller the rectangle and the more precise the location.
The magic is in the prefix: places near each other share the start of their geohash. Two coffee shops on the same block will have codes that begin with the same six or seven characters. That single property makes geohashes incredibly useful for searching, sorting, and grouping locations — which is why they quietly power features in ride-sharing apps, delivery systems, and location databases.
How a Geohash Is Built
Under the hood, a geohash is just latitude and longitude woven together. The algorithm takes your coordinates and repeatedly divides the world in half — first splitting longitude into east and west halves, then latitude into north and south halves, alternating back and forth. Each split writes down a 0 or a 1 depending on which half your point falls in.
Those bits get grouped into chunks of five and translated into characters from a 32-character alphabet (digits plus most lowercase letters, skipping a, i, l, and o to avoid confusion with numbers). The result reads like a tiny password but decodes back to a bounding box around your original point.
You do not need to do any of this by hand — a free geohash converter encodes and decodes instantly. But knowing the mechanism explains everything else about how geohashes behave, including their quirks.
Reading One: Length Means Precision
Every extra character zooms in. Here is roughly what each length pins down:
- 1 character — a huge slice of the planet, thousands of miles across. Useful for nothing except trivia.
- 4 characters — about the size of a metro area, roughly 25 miles across. Good enough to say "somewhere in the Denver area."
- 6 characters — a neighborhood, under a mile across. This is the sweet spot for "nearby" searches.
- 8 characters — about the size of a house and yard, roughly 125 feet. Precise enough for a delivery drop-off.
- 10+ characters — a parking spot, within a few feet. About as precise as consumer GPS gets.
Notice the pattern: each character you add narrows things down by roughly a factor of 32. Need to share a meeting spot? Seven or eight characters does it. Storing millions of check-ins in a database? Five or six keeps things fast without wasting space.
The Clever Trick: Shared Prefixes
This is the property that made the geohash famous. Because of how the code is constructed, nearby locations share leading characters. Chop the last character off any geohash and you get the larger box containing it. Chop two and you zoom out again.
Databases love this. Want every restaurant within a mile of a user? Compute the user's geohash, grab everything in the database whose code starts with the same prefix, and you have your candidates with a simple text comparison — no fancy spatial math required. It is not a perfect circle (boxes have corners), but as a fast first filter it is brilliant, and systems refine from there.
The flip side, worth knowing: two points very close together can occasionally have completely different geohashes if they happen to fall on opposite sides of a major grid boundary. It is rare, it is a known quirk, and robust systems check neighboring boxes to compensate.
Where Geohashes Actually Get Used
You have benefited from geohashes without knowing it. Ride-sharing apps use them to match you with nearby drivers — your phone's location becomes a short code, and the system looks for drivers whose codes share the prefix. Food delivery services carve cities into geohash cells to assign orders to the right kitchen and courier.
Beyond that, they show up anywhere locations need indexing: social apps finding "people near you," games spawning events in your area, logistics companies clustering stops into efficient routes, and databases that need location search without a dedicated spatial index. They also make decent short links — some map services encode positions into URLs the same way, so a link carries the location right in the address bar.
Geohash vs Plus Codes vs what3words
Three systems, one goal — a short code for any place — with different philosophies:
- Geohash is the elder statesman: open, free, and built for machines. Great for databases and developers. Its codes look technical, which they are.
- Plus Codes (Google's open system) were designed for human addresses, especially where street addresses do not exist. A code like "7FG5+RW" is shorter for the same precision and avoids easily confused characters. Try the Plus Codes converter to see the difference.
- what3words assigns three dictionary words to every 10-foot square on Earth. Very human-friendly ("filled.count.soap" style), but it is a proprietary system owned by a company, while the other two are open.
For technical work — indexing, APIs, data pipelines — geohash and Plus Codes are the usual picks, and both are free to use however you like. For giving directions to a person, all three beat reading out raw coordinates.
Making Your Own in Seconds
Theory is nice, but try it on a place you know. Open a geohash converter, type an address or drop a pin, and watch the code appear. Then start deleting characters from the end and notice how the box grows — that is the prefix property happening live.
Now do the reverse: paste a geohash back in and see it decode to coordinates you can drop into any map. Going both directions a couple of times builds the intuition that no amount of reading provides. If you work with other grid systems too, a Maidenhead locator converter shows how ham radio operators solved a similar problem with a different flavor of code.
The Edge Cases Nobody Mentions
Geohashes are simple, but they have two quirks worth knowing before you build anything serious on them.
First, the boundary problem mentioned earlier: adjacent places across a major grid line get wildly different codes. A robust "nearby" search always checks the eight neighboring cells, not just the matching prefix. Libraries for this exist in every major language — do not hand-roll it.
Second, precision is rectangular, not square, and the rectangles get skinnier near the poles. At the equator a geohash cell is close to square; near the Arctic it is a thin sliver. For most city-scale uses this does not matter, but if you are doing precise work in northern Canada or Scandinavia, be aware the cells are not the shape you picture.
Neither quirk is a dealbreaker. They are just the kind of thing that saves you a debugging afternoon if you learn them now instead of later.
A Worked Example: From Address to Code
Let us walk through what actually happens when you encode a real place. Imagine a bakery in downtown Austin, Texas, at roughly 30.2672° N, 97.7431° W.
The encoder starts with the whole world: longitude from -180 to 180, latitude from -90 to 90. First it splits longitude in half. Is -97.74 in the western half (-180 to 0)? Yes — write down 1. Then it splits latitude: is 30.27 in the northern half (0 to 90)? Yes — write down 1. Then back to longitude, splitting the western half again: is -97.74 east or west of -90? West — write 0.
This halving continues, alternating longitude and latitude, building a long string of bits. Every five bits become one character. After the first five bits you have one character covering a huge region; after ten, a smaller one; and so on. The bakery's full code ends up around nine characters, pinning it to a box a few dozen feet across — close enough for a delivery driver.
Decoding reverses the process: each character becomes five bits, the bits rebuild the halving decisions, and you recover the bounding box. The center of that box is the "location" of the geohash. Notice the elegant symmetry: the code never stores the original coordinates at all, just the series of yes-or-no answers that locate the box.
How Developers Actually Use Geohashes
If you build software, the geohash earns its keep in three patterns you will see everywhere.
First, proximity search. A food app needs "restaurants near me" to answer in milliseconds across millions of listings. Storing each restaurant's geohash and querying by text prefix turns a hard geometry problem into a fast string comparison. The app then measures exact distances only for the shortlisted candidates.
Second, caching map tiles and data. A weather app can cache forecasts per geohash cell instead of per exact coordinate. Two users standing fifty feet apart share the same 6-character cell, so one cached forecast serves both. Shorter codes mean bigger cells and fewer cache entries; longer codes mean fresher, more local data.
Third, compact storage and URLs. A geohash is far shorter than a lat/long pair with full decimal precision, so it trims database columns, API payloads, and share links. Some services build entire short-URL schemes on this idea: the link itself encodes where it points.
None of this requires special libraries — encoding and decoding are a few dozen lines in any language, and the algorithm has been public since 2008.
Could Geohashes Replace Street Addresses?
It is a tempting idea: instead of a street address, just hand someone a geohash. In places with reliable addressing — most US cities, western Europe — the answer is no, and it is not close. Street addresses are baked into mail delivery, emergency dispatch, and everyone's mental map. Nobody is texting a geohash to order a pizza in Chicago.
But across large parts of the world, street addresses do not exist or do not work. Think of rural routes outside Flagstaff, new developments on the edge of Austin, or fast-growing neighborhoods where the streets have no names yet. There, a short code beats "turn left at the big oak tree" every time.
This is exactly the gap Plus Codes were designed to fill — they read more like an address than a geohash does, and they are what Google Maps shows in places without street numbers. Try encoding the same spot in the Plus Codes converter and compare the two. For giving directions to a human being, the Plus Code usually wins on readability.
Emergency services are the most serious use case. A hiker lost in the Cascades with a dying phone battery can read out an 8-character geohash faster and more reliably than latitude and longitude — fewer digits to garble, and the dispatcher can type it straight into a map. Some search-and-rescue teams already train for exactly this scenario.
So no, geohashes will not replace your home address. But as a backup addressing system for the places street names never reached — and as a compact distress signal when it matters most — they are quietly excellent.
Try It on a Place You Know
The best demo is personal: encode your home, your office, and your favorite park. Compare the codes. Notice how the shared prefix grows as the places get closer together, and how quickly the code distinguishes two ends of the same street.
Then share one with a friend — text them an 8-character geohash and see if they can decode it with the same geohash converter. It feels a little like passing notes in a secret code, except the code is an open standard anyone can read. Once you have played with it, you will start noticing short location codes everywhere — and now you will know exactly what they are.
