Real-time Technology Glossary

An ever-growing repository of technical terms around real-time technology and beyond.

What is Geohashing?

Geohashing is a geocoding method used to encode geographic coordinates (latitude and longitude) into a short string of digits and letters delineating an area on a map, which is called a cell, with varying resolutions. The more characters in the string, the more precise the location.

How Does Geohashing Work?

Geohashes use Base-32 alphabet encoding (characters can be 0 to 9 and A to Z, excl "A", "I", "L" and "O”). Imagine the world is divided into a grid with 32 cells. The first character in a geohash identifies the initial location as one of the 32 cells. This cell will also contain 32 cells, and each one of these will contain 32 cells (and so on repeatedly). Adding characters to the geohash sub-divides a cell, effectively zooming in to a more detailed area.


The precision factor determines the size of the cell. For instance, a precision factor of one creates a cell 5,000km high and 5,000km wide, a precision factor of six creates a cell 0.61km high and 1.22km wide, and a precision factor of nine creates a cell 4.77m high and 4.77m wide (cells are not always square).


Use Cases for Geohashing

Geohashing was originally developed as a URL-shortening service but it is now commonly used for spatial indexing (or spatial binning), location searching, mashups and creating unique place identifiers.

A geohash is shorter than a regular address, or latitude and longitude coordinates, and therefore easier to share, remember and store.

  • Social Networking - Chat with people near you within a particular cell, and to create chat apps.
  • Proximity Searches – Find nearby locations, and identify places of interest, restaurants, shops and accommodation establishments in an area.
  • Digital Travels – Geohashers go on global expeditions to meet people and explore new places. The twist: the destination is a computer-generated geohash and participants in this turnkey travel experience have to write up and post their story on the internet.
  • Custom Interactive Apps - Geohashing can be used to create real-time, interactive apps.

You can try it out here. Use the coordinates 40.748440989 and -73.985663981 for a view of the area around the Empire State Building in New York. Change the precision factor to increase or decrease the resolution (size of the cell), or use the geohash dr5ru6j2c5fqt for a 13-digit precision factor to zoom right in.

You might also like

Geolocation Tracking Tutorial

Geolocation Tracking Tutorial

In this tutorial you’ll discover how to build a geolocation tracking app that allows users to share locations and send messages in real-time. You will develop a geolocation tracking application that allows participants to locate and interact with each other, based on PubNub's Javascript SDK.

Learn More
Geolocation Demo

Geolocation Demo

Geolocation connects users around the world empowering them to share information and experiences in real-time from any device. This demo shows how you could use PubNub to share your location

Experience the Demo

Ready To Get Started?

Contact Sales