Developers
Grid Cell Codes vs Geohash: A Conceptual Comparison
How grid-based location codes such as UPCS compare with geohash, plus codes and what3words-style systems in concept, and when each idea fits.
Updated 14 October 2026 · 2 min read
Location encoding systems turn a point on Earth into a short string. They share a goal but differ in structure, precision and intended use. This page compares the ideas conceptually and explains where UPCS fits.
Geohash
A geohash repeatedly divides the world into smaller rectangles and interleaves the results into a base-32 string. Longer strings mean smaller cells, and strings that share a prefix are near each other, which makes prefix search in a database convenient. It is designed for indexing and proximity, not for people to read aloud.
Open location code style systems
Some public systems encode latitude and longitude into a short alphanumeric code intended to be written and shared by people, with a precision that depends on code length.
Grid cell codes such as UPCS
A UPCS code, for example PK-1A2B-3C4D, identifies a fixed 3 m by 3 m grid cell, and begins with a two-letter country prefix. The same coordinates always give the same code. It is meant for people and systems to exchange as a precise delivery or meeting point, next to a normal address. It is not an official postal code and is issued by no government.
Comparison
| Aspect | Geohash | UPCS code |
|---|---|---|
| Main purpose | Indexing and proximity | Sharing an exact location |
| Country prefix | No | Yes, two letters |
| Cell size | Depends on length | 3 m by 3 m |
| Computed by you | Yes, from the algorithm | No, via the UPCS API |
| Works anywhere | Yes | Supported countries only |
Practical advice
- Use a geohash or a spatial index for your own proximity queries; see PostGIS and geospatial basics.
- Use UPCS codes for the value people see and share with couriers.
- Keep coordinates alongside codes: storing coordinates in a database.
- Get codes via generate or resolve, and turn them back with lookup. Do not reverse-engineer the format.
Frequently asked questions
Is a UPCS code a geohash?
No. A UPCS code has the CC-XXXX-XXXX format with a country prefix and corresponds to a 3 m by 3 m grid cell. It should not be treated as a geohash or decoded as one.
Can I convert between them myself?
Do not derive UPCS codes yourself. Use the API to get a code from coordinates, and the lookup endpoint to get coordinates from a code.
