Random location generator

Random places, fairly chosen: anywhere on land, in one country, or within a distance of a point. Each comes with its country and nearest town, and they can be downloaded.

How to use it

  1. Choose where the points may fall: on land anywhere, in one country, near a place, or anywhere including the sea.
  2. Set how many points you want and press Generate.
  3. Read the coordinates, the country and the nearest town of each point. Click a row to fly to it.
  4. Download the points as CSV or GeoJSON.

5 practical uses

  1. Pick random survey or sample sites across a country or a region.
  2. Choose a random destination for a trip, a photo challenge or a game.
  3. Generate test points for a map, an app or a database.
  4. Run a geography quiz: name the country of a random point.
  5. Pick random spots within reach of home for a weekend outing.

The maths behind it

Uniform points on a sphere need the latitude drawn as φ = asin(2u − 1), not uniformly, because a band near the pole has less area than one near the equator. The longitude is uniform. A point is then kept only if a point-in-polygon test puts it on land or in the chosen country (rejection sampling). Points within a radius use d = r√u and a uniform bearing, so the disc is filled evenly.

Questions and answers

Are the points evenly spread?

Yes. They are drawn uniformly over the surface of the sphere, then kept only if they fall inside the chosen area, so every square kilometre has the same chance.

Why does a point in France land in South America?

French Guiana is part of France, and the country outline includes it. The same applies to other overseas territories.

Can I get a random address?

The page gives coordinates, the country and the nearest town. Paste the coordinates into the coordinates to address tool for the nearest address.

Embed this tool on your website

Paste this code where the tool should appear. It shows the tool alone, without this page's text, and links back here. It is free to use; the map data credit stays on the map.

<iframe src="https://waymorphic.com/tools/random-location-generator?embed=1" width="100%" height="760" style="border:0;border-radius:12px;max-width:100%" loading="lazy" allow="geolocation; fullscreen; clipboard-write" title="Random location generator – Waymorphic Map"></iframe>

Change height to suit your page. To open the tool with a place already set, add the settings from this page's address bar (the part after #) to the end of the src. The embedded tool asks the visitor's browser for their location only when they press the button, and the allow attribute lets that work inside the frame.