BYTETOOLS

Geohash Encoder

Convert latitude and longitude to a geohash at any precision from 1 to 12 characters, with the ground size of each cell shown alongside.

9

Each extra character shrinks the cell. Precision 5 is roughly a neighbourhood, 8 is about the size of a building, and 12 is centimetre-scale.

Geohash

dr5regw3p

This cell covers 3.6 m east-west by 4.8 m north-south at this latitude. Any point inside it encodes to the same string.

9
Characters
3.6 m
Cell width
4.8 m
Cell height
dr5re
Prefix (precision 5)

Every precision from 1 to 12

PrecisionGeohashCell widthCell height
1d4,604.5 km5,003.8 km
2dr926.2 km625.5 km
3dr5119.6 km156.4 km
4dr5r29.6 km19.5 km
5dr5re3.7 km4.9 km
6dr5reg926 m610.8 m
7dr5regw115.7 m152.7 m
8dr5regw328.9 m19.1 m
9dr5regw3p3.6 m4.8 m
10dr5regw3pp90.4 cm59.6 cm
11dr5regw3ppy11.3 cm14.9 cm
12dr5regw3ppyz2.8 cm1.9 cm

What is the Geohash Encoder?

A geohash squeezes a latitude/longitude pair into a single short string like dr5regw3p, where every extra character narrows the cell it represents.

  • Standard base-32 geohash encoding at precision 1 to 12
  • Shows the real ground width and height of each cell in metres
  • Side-by-side table of every precision for the same point
  • Accepts decimal degrees or DMS coordinate input
  • Highlights the shared prefixes that make proximity queries work
  • 100% client-side — coordinates never leave the browser

How to use the Geohash Encoder

  1. 1

    Enter the latitude and longitude you want to encode (decimal degrees or DMS).

  2. 2

    Drag the precision slider to choose how many characters the geohash should have.

  3. 3

    Read the geohash and the ground size of the cell it covers.

  4. 4

    Copy the hash, or copy the full precision table as CSV for your documentation.

About the Geohash Encoder

A geohash squeezes a latitude/longitude pair into a single short string like dr5regw3p, where every extra character narrows the cell it represents. That property makes geohashes excellent database keys: nearby places share a prefix, so a simple string comparison becomes a cheap proximity filter in Redis, Elasticsearch, DynamoDB or plain SQL.

This encoder converts your coordinate at whatever precision you choose and, crucially, shows how big the resulting cell actually is on the ground at that latitude. It also lists every precision from 1 to 12 side by side so you can pick the shortest string that still meets your accuracy requirement.

It is useful for backend engineers designing location indexes, data analysts bucketing points for aggregation, and anyone debugging why two nearby records ended up with different keys. Encoding happens entirely in your browser — the coordinate is never uploaded.

Frequently asked questions

What is a geohash?

A geohash is a short base-32 string that encodes a latitude/longitude box rather than an exact point. Each character adds five bits of precision, alternating between longitude and latitude, so a longer hash means a smaller cell.

How accurate is a geohash at each precision?

Roughly: 4 characters is about 20 km, 5 is about 2.4 km, 6 is about 610 m, 7 is about 76 m, 8 is about 19 m and 9 is about 2.4 m. Cells get narrower toward the poles, so this tool shows the real size at your specific latitude.

Why do nearby locations sometimes have completely different geohashes?

Because the grid has hard edges. Two points a metre apart but on opposite sides of a cell boundary share no prefix at all — which is why proximity searches usually query the target cell plus its eight neighbours rather than trusting the prefix alone.

Which letters are used in a geohash?

The base-32 alphabet is 0-9 plus the lowercase letters b through z, excluding a, i, l and o because they are easy to confuse with other characters. Any string containing those four letters is not a valid geohash.

What is a geohash used for?

Mostly for indexing and bucketing location data. Storing a geohash column lets a database answer "what is near here?" with a prefix or range scan instead of expensive geometry maths, and truncating the hash is an easy way to aggregate points into tiles.

Is my coordinate sent to a server?

No. Encoding is pure client-side JavaScript, so nothing is transmitted or logged. You can encode sensitive asset or customer locations without them ever leaving your device.

Related tools