mapbench
Interactive toolCoordinates

Geohash Encoder

Geohashes are short strings that identify map cells — handy for databases and proximity keys.

By Aryan Khan, Founder & Editor · Updated October 2026

✓ No account required✓ Worldwide✓ No installation required
Tool workspace
Enter your inputs and review the result
Loading tool…

For example, Times Square encodes as dr5ru7 at six characters — and every point starting dr5ru shares its ~1.2 × 0.6 km cell, which is exactly how databases fake 'nearby' with a string prefix.

Simple workflow

How to use Geohash Encoder

A coordinate, compressed into a sortable string:

The Geohash Encoder encodes coordinates as geohash strings — short base-32 codes that identify map cells, with cell size set by the string's length. Enter the point and read its geohash — the key format databases use for proximity lookups and shareable place references.

  1. 1Enter lat/lng or a geohash.
  2. 2Copy the result.

What people use Geohash Encoder for

1. Database proximity keys

Store the hash beside the point; prefix queries fetch the neighbourhood. The encoder lets you mint and inspect keys while designing — the H3 Hex Index Helper is the hexagonal alternative.

2. Debugging location data

A stored hash decodes to its cell here in spirit — mismatched hashes beside known coordinates expose swapped axes in legacy data.

3. Shareable rough locations

A 4–5 character hash shares a neighbourhood without sharing an address — precision as a dial, turned by string length.

4. Cache and tile keys

Cell strings name cached areas tidily. The encoder shows which cell a point's cached data lives under.

Worked examples

Example · The canonical test vector

57.64911, 10.40744 encodes to u4pruydqqvj — the worked example from the geohash literature, reproduced here as a correctness receipt for the algorithm.

Example · Prefix means proximity (mostly)

Times Square dr5ru7 and a point across the park in the same cell share the prefix; two points metres apart across a cell border share almost nothing. Prefix search must fetch neighbouring cells too — the classic geohash caveat, stated on its own page.

Geohash is a spatial indexing tool, not a universal address format

Geohash converts latitude and longitude into a compact string whose prefixes tend to group nearby cells. That property is useful for databases, caching, rough proximity filtering and partitioning location data. More characters represent a smaller cell, but increasing string length does not improve the accuracy of the coordinate that was encoded.

Geohash has edge effects: two physically close points can sometimes have very different prefixes when they fall on opposite sides of a cell boundary. Use it as an indexing aid, then calculate real distance when proximity decisions matter. Plus Codes and MGRS solve related but different problems and should not be treated as interchangeable identifiers.

How to interpret the result

The most common errors come from using a correct result to answer the wrong geographic question. Keep these points in mind for Geohash Encoder:

  • Sanity-check every pasted pair by eye on a map before using it: latitude/longitude swaps land you in the ocean so reliably that 'the Null Island bug' has a name. A two-second visual check costs nothing and catches most transcription errors.
  • Match precision to source: consumer GPS earns about five decimals; quoting six or seven implies a survey you didn't do. Rounding deliberately is honesty, not loss.

Limits & appropriate use

Coordinates are lossless in principle and lossy in practice, and every loss is human: swapped axes, wrong hemispheres, datum relics, precision theatre. The converters eliminate the notation problem completely — DMS, UTM, MGRS and Plus Codes are exact translations on WGS84 — but they cannot eliminate the provenance problem: a number without its datum and its source is a rumour. Old NAD27-era documents, hand-typed sheets and seven-decimal CSVs each carry their own failure signature, and the honest tool answers with validation errors and visible pins rather than silent corrections.

The practical boundary is therefore organisational, not mathematical: teams that standardise storage (decimal, WGS84, sane precision) and ritualise the map check enjoy a lossless system; teams that don't accumulate expensive folklore. For work beyond consumer frames — control points, machine guidance, legal description — the escalation is geodetic: licensed surveyors, published transformations and national datums. Everything between a pasted waypoint and that door is exactly where this toolset lives.

  • Datum-critical legacy data → published grid transformations (NTv2/HTDP).
  • Control points and machine guidance → licensed geodetic survey.
  • Aviation/marine charts → the chart's own datum and notation, verbatim.

Data & methodology

The converter encodes latitude and longitude as a base-32 geohash. Entered geohashes resolve to the centre of their represented cell, so decoded coordinates do not recover an exact original point.

For source details, licences and model limitations, see Data Sources and Methodology.

Key terms worth knowing

Plus Code
Open Location Code: keyless short codes for any spot, by open math.
Datum
The reference shape model (WGS84 for GPS) that coordinates are angles against.

Editorial guidance: MapBench explains the method and limitations so the tool can be used as a transparent reference, not as a black-box answer. For legal boundaries, safety-critical routing, surveying, engineering, regulated decisions or official statistics, verify the result with the responsible authority or a qualified professional.

Category: Coordinates. Results are intended for everyday analysis and planning unless a page explicitly states otherwise.

Method, assumptions & limits

This tool’s method
The converter encodes latitude and longitude as a base-32 geohash. Entered geohashes resolve to the centre of their represented cell, so decoded coordinates do not recover an exact original point.
Before relying on the answer
Record the coordinate order, signs, format and datum where specified. In GeoJSON, positions are longitude first; many input forms ask for latitude first.
What the result cannot establish
A format conversion preserves the source measurement's uncertainty. Extra digits do not improve the original GPS fix.

Coverage: Worldwide. Search, basemap and external data requests may use third-party services; browser-based does not mean every operation is offline. Read the source and licence notes, calculation methodology and privacy policy. If a result looks inconsistent, report a correction with the inputs and mode used.

Common questions

Frequently asked questions

Clear answers about the calculation, accuracy and appropriate use.

Cell size?

Longer hashes are smaller cells.

Same as Plus Code?

No — different grid system.

Which datum do these coordinate tools use?

MapBench location tools generally use WGS84 latitude and longitude, the same global reference system commonly used by GPS and web maps.

Do more decimal places always mean better accuracy?

No. More digits increase numeric precision, but they cannot improve the accuracy of the original GPS, survey or source data.

Can I copy the result into GIS software?

Usually yes. Check the format, axis order and datum expected by the destination software before importing.

What cell size do I get?

Chosen by string length — the table on this page maps characters to cell dimensions. Longer is smaller, by a factor of 32 per character (8×4 per step in ground terms, roughly).

Is it the same as a Plus Code?

No — different systems (Google's Open Location Code versus the public-domain geohash). Both turn coordinates into strings; their alphabets, cells and ecosystems differ.

The border problem?

Neighbouring points across a cell edge share no prefix. Production proximity search queries the 8 surrounding cells as well — the encoder's cell view makes the fix intuitive.

Decode a hash?

The cell a hash names can be read back to its bounds — encoders in this family show the cell for any hash you bring.

Who invented it?

Gustavo Niemeyer, 2008, released into the public domain — one of the internet's quiet load-bearing ideas.

Case sensitivity?

Geohashes are lowercase by convention (the alphabet excludes ambiguous letters); systems store them lowercase.

Privacy of short hashes?

A 4-character hash is a region-sized fuzz — the string-length dial is a legitimate privacy control, sized by the table.

Sorting property?

Lexicographic order approximates spatial order (a Z-order curve) — good enough for prefix scans, which is the entire trick.

Related tools and resources

Hexagons: the H3 Hex Index Helper; grids: the MGRS Converter; points: the Coordinate Converter.

Keep measuring

More free tools

How this page is maintained

Sources, methodology & editorial trust

Data & privacy
  • ✓ Browser-first processing where supported
  • ✓ External sources are documented
  • ✓ No account required for public tools
  • ✓ Review data sources
Method & review

Calculations are documented with their assumptions, limitations and source context rather than presented as unexplained answers.

Editor & category

Reviewed and maintained by Aryan Khan, Founder & Editor of MapBench.

Coordinates
Browse all Coordinates →

Part of our coordinates hub

Geohash Encoder sits in the coordinates cluster, alongside 63 other tools that answer neighbouring questions with different methods or datasets.

You may also need

When this answer is only part of the job, these clusters cover the next step.

Read the guide behind this tool

Understanding GPS Coordinates: Formats, Datums and Precision — A practical guide to latitude/longitude: what decimal degrees and DMS really mean, why datums matter, and how many decimal places you actually need.