MapTools
coordinatesFree · No signup

Geohash Converter — Encode & Decode

Encode any latitude/longitude into a geohash string and decode geohashes back to coordinates with bounding-box visualization.

Encode coordinates

Lat/long → geohash

Geohash

dr5regw

Longer codes = smaller areas. Share this string instead of raw coordinates.

Decode geohash

Geohash → lat/long

Center: 40.712585, -74.009399
Box: 40.7098–40.7153, -74.0149–-74.0039

All conversions run on the WGS84 ellipsoid entirely in your browser. Encoded strings are handy for compact storage, database keys, and sharing locations without long decimal coordinates.

Runs entirely in your browser — your inputs never leave this page.

How this tool works

  1. 1

    Applies the standard geohash base-32 algorithm: latitude and longitude ranges are bisected alternately, with each bit narrowing the bounding box until the requested precision is reached.

Common uses

  • Geospatial database indexing
  • Compact coordinate sharing in URLs
  • Proximity search bucketing

Frequently asked questions

A geohash is a short string of letters and numbers that represents a rectangular area on Earth. Longer strings mean smaller, more precise areas.

More in Coordinates & Projections

View all →
Worked example

An Austin Food-Truck Developer Groups Check-Ins by Geohash Prefix

A developer in Austin, Texas is building a small app that shows which food trucks are open near you. Storing full latitude and longitude for every check-in is overkill, so she encodes each truck's location as a geohash — a short string of letters and digits that stands for a rectangular patch of ground. She tests the idea in the Geohash Converter before writing any database code.

First she decodes the most famous geohash in the world, u4pruydqqvj, which the converter places at 37.4215, -122.0837 — the Google campus in Mountain View, California. She writes the ladder of box sizes on a sticky note, because it is the part everyone gets wrong: five characters cover a square about 3 miles (4.9 km) on a side, six characters shrink that to a box roughly three-quarters of a mile long, seven characters land at about 500 feet (153 meters) across — a stadium and its parking lots — and eight characters get down to about 125 by 63 feet, a single restaurant and its patio. Each added character divides the area by 32, which is why just two extra characters turn a city district into a doorstep. Twelve characters pin the spot to a box only a few feet across. Then she shortens the string and watches the bounding box grow: every character she removes makes the box roughly 32 times larger in area.

For her app she settles on 6-character hashes. A 6-character geohash covers a box about 0.75 miles by 0.38 miles (1.2 km by 0.6 km) — roughly a neighborhood, which is exactly the 'near you' radius her users mean. Two trucks parked on the same block always share the same 6-character prefix, so finding nearby trucks becomes a simple text search: match the prefix, then check the few candidates precisely.

She also sees the trap to avoid. Two trucks can stand 50 feet apart across a box boundary and share no prefix at all, so her search must also check the eight neighboring boxes — the converter's map view makes those neighbors obvious by drawing the box edges. With that detail handled, the geohash column in her database stays short, fast, and private enough that no user's exact doorstep is ever stored. That privacy trick only works because of how she stores the data: the app keeps the full hash on the phone, sends the server a five-character version for counting visits by district, and never uploads the longer string at all. Five characters point to a few square miles of Austin — enough to know the downtown trucks out-sell the airport ones, not enough to know where any single customer ate lunch. It is a rare case where using less precision is not a compromise but the entire point.

Common mistakes to avoid

  • Assuming nearby points always share a prefix. Geohash boxes have hard edges. Two points a few feet apart can fall in different boxes with completely different strings, so a prefix-only search silently misses them.
  • Using a hash that is too short for the job. A 4-character hash covers an area about 24 miles wide — useless for finding lunch. Match the length to the job: city, neighborhood, block, or doorstep.
  • Treating similar strings as similar places across the equator or date line. The alphabet order follows the grid, not geography, in a few edge cases near the poles and the 180-degree line. Verify with the map before trusting string tricks there.

Pro tips

  • Memorize one anchor length: 6 characters is about a neighborhood, 7 is about a large park or campus, 8 is about a building lot.
  • Store one hash length longer than you display, so you can tighten or widen the search area later without re-collecting data.
  • When debugging, decode your hash and look at the drawn box — most 'wrong location' bugs are just a box that is bigger than you imagined.
Geospatial Engineering Reference & Field Manual

Coordinates, Datums & Field Surveying: Finding Anything on Earth

Latitude and longitude are just the beginning. Learn the datums, grids, and projections behind every coordinate — and why mixing them up can move your point by hundreds of feet. Written for Geohash Converter — Encode & Decode and the everyday mapping tasks around it.

1

Latitude & Longitude: The Global Address

Latitude measures how far north or south you are, from 0 at the equator to 90 at the poles. Longitude measures east or west from Greenwich, England, from 0 to 180. Together they name every spot on Earth with two numbers — the closest thing geography has to a universal address.

Coordinates come in three dialects. Decimal degrees write New York as 40.7128, -74.0060 — the format computers prefer. Degrees-minutes-seconds splits the same point into 40°42'46"N, 74°0'22"W, the traditional navigator's format. Degrees-decimal-minutes sits in between. All three describe the identical point; converters just translate the notation.

Precision has a simple scale. One degree of latitude is about 69 miles everywhere. Each decimal place you add zooms roughly tenfold: two decimals place you within half a mile, four decimals within 30 feet, and six decimals within 4 inches — more precision than consumer GPS can actually deliver.

Watch the signs. In decimal format, southern latitudes and western longitudes are negative. Forgetting the minus sign on a Chicago longitude (-87.6) teleports your point to central China. It is the most common coordinate mistake in existence.

2

Datums: The Invisible Foundation

Coordinates are meaningless without a datum — the mathematical model of the Earth they refer to. The global standard is WGS84, the datum your phone's GPS uses. But much American mapping still references NAD83, tuned for North America, and the two disagree by a few feet in places.

A few feet sounds trivial until it is not. Property lines, utility trenches, and runway thresholds all live in that margin. Mixing a WGS84 coordinate into a NAD83 dataset shifts every point slightly — usually harmless on a web map, potentially expensive on a construction site.

Older maps add more ghosts. The 1927 North American Datum (NAD27) can differ from modern coordinates by up to 300 feet in some regions. If you are digitizing a decades-old paper map or reading coordinates from a historic document, confirm the datum before trusting the numbers.

Europe went through the same evolution. Many countries mapped on national datums for a century before adopting the European ETRS89 system. Cross-border datasets must declare their datum or inherit silent errors.

This page shows the first two chapters. Read the complete this category field guide →