Try It Out
Interactive Map
Click anywhere on the map to see its geohash!
Watch the Shrinking Box Animation
See how each character in a geohash narrows down the location on the map above.
Neighboring Geohashes
Geohashes that start with the same prefix are nearby. Here are the 8 neighbors of your current geohash:
Precision Levels
The more characters, the more precise the location:
| Characters | Approx. Area | Use Case |
|---|---|---|
| 1 | 5,000 km × 5,000 km | Continental region |
| 2 | 1,250 km × 625 km | Large country/state |
| 3 | 156 km × 156 km | Metropolitan area |
| 4 | 39 km × 19.5 km | City |
| 5 | 4.9 km × 4.9 km | Neighborhood |
| 6 | 1.2 km × 609 m | Village/District |
| 7 | 153 m × 153 m | Street block |
| 8 | 38 m × 19 m | Building |
| 9 | 4.8 m × 4.8 m | Room |
| 10 | 1.2 m × 0.6 m | Parking spot |
| 11 | 15 cm × 15 cm | Precise GPS location |
| 12 | 3.7 cm × 1.9 cm | Ultra-precise positioning |
Real-World Use Cases
Proximity Search
Finding nearby places is easy! All locations starting with 9q8y are in the same ~5km area. Just compare prefixes:
9q8yyk- Coffee shop A9q8yym- Coffee shop B (nearby!)9q8z12- Coffee shop C (different area)
Database Indexing
Instead of complex 2D spatial indexes, just use a regular B-tree index on geohash strings. Query for all records starting with a prefix!
SELECT * FROM places WHERE geohash LIKE '9q8y%'
Gaming
Games like Pokémon GO use geohashing to group nearby players and items efficiently without revealing exact coordinates.
URL Shortening
Instead of lat=37.7749&lng=-122.4194, just use 9q8yyk8yuv8y. Shorter URLs, same precision!
Data Clustering
Group data points by truncating geohashes: 9q8yyk8yuv8y → 9q8y creates automatic geographic clusters.
The Magic Behind Geohashing
- Start with the whole world: latitude (-90 to 90), longitude (-180 to 180)
- Divide longitude in half. Is your point in the left or right half? (bit: 0 or 1)
- Divide latitude in half. Top or bottom? (bit: 0 or 1)
- Repeat, alternating lon/lat, building a binary string
- Convert groups of 5 bits to base32 characters (0-9, a-z minus a,i,l,o)
Example: Encoding (37.7749, -122.4194)
Let's encode San Francisco step by step:
- Step 1: Longitude -122.4194 in range [-180, 180] → Left half (0) → New range [-180, 0]
- Step 2: Latitude 37.7749 in range [-90, 90] → Top half (1) → New range [0, 90]
- Step 3: Continue alternating... builds binary: 01001...
- Step 4: Convert to base32:
9q8yyk8yuv8y
Why Base32?
Uses characters that are unambiguous: 0123456789bcdefghjkmnpqrstuvwxyz
Excluded: a, i, l, o (to avoid confusion with 0, 1)