Random GPS Coordinates Generator

Valid latitude/longitude pairs for geospatial testing

Ad placeholder (leaderboard)

This tool generates random GPS coordinate pairs in decimal degrees for seeding maps, exercising geospatial queries, and demoing location features. Unlike naive generators, it samples latitude in a way that distributes points evenly across the surface of the globe, and it can roughly constrain results to land, ocean, polar regions, or a custom rectangle.

How it works

A common mistake is to pick latitude uniformly between -90 and 90 degrees. Because the circumference of each latitude circle shrinks toward the poles, that approach crowds points near the poles. The correct method samples latitude from the arcsine distribution:

u = random(0, 1)
lat = asin(2u - 1)  // in radians, then convert to degrees
lon = random(-180, 180)

Land and ocean modes use rejection sampling against a small set of continental bounding boxes: a candidate point is kept only if it falls inside (land) or outside (ocean) those boxes. Polar mode restricts latitude to beyond the Arctic and Antarctic circles, and bounding-box mode draws directly inside your chosen rectangle.

Tips and notes

  • For evenly distributed world points, leave the mode on “Anywhere” — it uses the correct spherical sampling.
  • The land/ocean classifier is intentionally coarse; treat its results as plausible, not authoritative.
  • Increase the decimal places when you need street-level precision; six decimals is roughly 0.1 metre at the equator.
Ad placeholder (rectangle)