simplemaplab

Random Location Generator

By Marko Visic · Updated Oct 11, 2026

Generate a random place anywhere on Earth, on land, in a country or state, or near you, or pick a random town. Every point opens a full card: the country and region, nearest towns with distance and direction, elevation or ocean depth, local time and day or night, today’s sunrise and sunset, nearby Wikipedia, and links to open it in maps. Free, no sign-up.

Loading map…
🎲

Generate a random place on land. Select it to see where it is, the nearest towns, elevation, local time and sun, and links to open it anywhere.

Example

Example: today’s random place (Nov 5, 2026)

A fresh land point, seeded by today’s date, generated and looked up on the server — the same card the tool shows when you select a point (elevation needs the live terrain tiles, so it appears in the interactive card above).

Coordinates: -77.036923, -27.899787
Where it is: 🇦🇶 Antarctica, Antarctica
Landform: Coats Land (region), West Antarctica (region) — approximate
Continent: Antarctica
Nearest towns: Grytviken (1587 mi (2555 km) S), Stanley (1916 mi (3083 km) SSE), Puerto Deseado (2269 mi (3651 km) SSE), Comodoro Rivadavia (2414 mi (3885 km) SSE)
Local time zone: Antarctica/Rothera — daytime now

What you get for every random place

Select any point and its card fills in from these sources. Everything but elevation and the Wikipedia search is bundled with the site, so it loads fast and works offline-first.

FieldSource
Country and admin-1 region (state, province, department)Natural Earth 10m administrative polygons (public domain)
Sea or ocean name (for water points)Natural Earth 10m marine polygons (public domain)
Landform region and continentNatural Earth 10m physical polygons (public domain)
Nearest towns — population, distance (km/mi), compass directionGeoNames cities1000 (CC BY 4.0)
Elevation or ocean depth (approximate)AWS Terrain Tiles — USGS 3DEP, SRTM, GEBCO/ETOPO
Local time zoneIANA time zone database
Day or night now, today’s sunrise and sunsetAstronomy Engine
Nearby articles within 10 kmWikipedia GeoSearch (links only)

Random points done correctly — equal-area on the sphere

Most "random location generator" sites use the simplest possible math: pick a random latitude between -90° and +90°, pick a random longitude between -180° and +180°. Done. This is wrong.

Earth is a sphere, not a flat rectangle. The area of a 1° latitude × 1° longitude cell shrinks as you approach the poles, by a factor of cos(latitude). If you sample latitude uniformly, you generate points proportionally to lines of latitude — but each line at high latitude wraps a much smaller circumference than the equator. Result: random points pile up near the North and South Poles, with proportionally too few near the equator. Common online tools have this exact bug; a "random place on Earth" produced by a naive generator is about 2.9 times as likely per square kilometer at 70° N as at the Equator (1 / cos 70°).

The fix is to sample sin(latitude) uniformly, not latitude itself. The formula: lat = asin(2u − 1) × 180/π where u is uniform in [0, 1]. The asin compensates for the cos(lat) area element. The result is genuinely uniform by surface area on the sphere — and it is the math we use.

How to use the random location generator

A few steps. Defaults are sensible — most users only set the mode and tap Generate.

  1. Pick a mode. Anywhere on the sphere returns a uniformly distributed random point on Earth — about 71% of which will land in the ocean. Land only re-rolls until the point falls on land. In a country or state lets you pick a country and, if you like, one of its states, provinces or regions. Near me draws points within a radius of where you are. Random town picks a real town, filterable by country, state and population.
  2. Set how many points. The default is 1; the maximum is 100 per batch. For travel-planning style use cases (one random destination), 1 is right; for dataset seeding or geocaching challenges, 5–25 is typical; for stress-testing and analysis, go up to 100.
  3. Optionally set a seed. A seed makes the result reproducible: the same seed + same settings always produce the same points. Useful for sharing ("here are the 5 random spots, seed = trip-2026"), for testing, or for repeatable runs in research and education. Leave the seed empty for true Math.random output.
  4. Generate. Tap the green Generate button. Pins drop on the map, the coordinates list fills in, and the map auto-frames every pin. A single point opens its place card right away.
  5. Select a point to open its place card. Tap any pin or any row in the coordinates list. The card shows the country and region, the nearest towns with distance and direction, elevation or ocean depth, the local time and whether it is day or night, today’s sunrise and sunset, a Wikipedia-nearby button, and links to open the point in Google Maps, Street View and OpenStreetMap. Details load only for the point you select, so a batch of 100 stays fast.
  6. Re-roll, copy, or export. Tap "Re-roll" for another batch with the same settings (a fresh internal seed). Copy the whole list of coordinates in decimal or DMS, copy or share any single point by link, or export the batch as CSV or GeoJSON.

The modes — and when to use each

ModeWhat it doesLand vs oceanBest for
Anywhere on the sphereUniformly distributed point anywhere on Earth — ocean, ice cap, populated land, all weighted by surface area.~71% in ocean, ~29% on landPure mathematical curiosity, math-class demos, surface-distribution visualisation.
Land onlyRe-rolls until the point falls inside a country polygon (Natural Earth 1:50m / 1:50,000,000-scale). Ocean, sea, and small unmapped islands are skipped.0% (ocean rejected)Travel inspiration, geography quizzes, picking a random place on terra firma.
In a country or stateGenerates points only inside a chosen country’s polygon. Use the 🎲 button for a random country pick.0% (area interior only)Marketing geofences, geocaching within a region, education focused on one country or state.
Near mePoints within a radius of your location (area-uniform inside the circle), optionally land-only. Your location stays in your browser.Land-only by defaultNearby day trips, local scavenger hunts, testing something close to home.
Random townA real town chosen at random, filterable by country, state and minimum population. Every matching town is equally likely.Always a populated placeTravel picks, classroom geography, a random city for a prompt.

What people use this tool for

Six common jobs, and the card field or option that does the work in each.

Travel ideas — "where should I go next?"

Pick "Land only" with count = 1 and generate. The place card names the country and region and lists the nearest towns with distance and direction, so a bare coordinate becomes a real destination you can picture. Street View (nearest panorama) and the Wikipedia-nearby button tell you what is actually there. Honest inspiration — more varied than a curated "best of" list.

Geography games

Generate 5 random countries with the 🎲 button, or drop 20 random points on land and have players name each country and guess what is nearby. The card hides nothing: the country flag, admin region, continent and nearest towns all become the answer key. Equal-area sampling means Russia, Canada, China, the USA and Brazil come up most, tiny states rarely — geography in proportion to real land area.

Exploring somewhere new

Treat one random point as a doorway. The card’s landform line ("Colorado Plateau", "Sahara"), the elevation or ocean depth, and the day-or-night and sunrise/sunset fields sketch the place before you ever open a map. The "Open in" links jump straight to Google Maps, Street View and OpenStreetMap; the night-side toggle on the map shows whether it is light there now.

Test data for apps and maps

Seed test data with a reproducible batch — the same seed and settings always return the same points, so CI runs don’t flake. Points are equal-area uniform, antimeridian-safe and validated against country polygons. Export CSV (id, lat, lng, country, ISO 2) or GeoJSON that drops straight into QGIS, Mapbox or Leaflet. The coordinates list copies in decimal or DMS in one click.

Teaching latitude and longitude

Generate a point and switch the coordinates list between decimal degrees and DMS to show the two notations side by side. The card’s nearest-town distances (in km and miles with a compass direction) make bearings concrete, and the day/night plus sunrise/sunset fields connect longitude to local time. The "Explore this point" links open the same coordinate in the elevation and time-zone tools.

Writing prompts

Roll a random place and let the card set the scene: a country and region, the nearest town, whether it is day or night right now, and the landform it sits in. Writers and worldbuilders use the seed to keep a prompt reproducible — the same seed re-creates the same place list — and the Wikipedia-nearby button turns a coordinate into real detail to research.

How the tool actually works

1. Sphere sampling

Two uniform random numbers u, v ∈ [0, 1]. Latitude: lat = asin(2u − 1) × 180/π (range -90° to +90°, weighted equal-area). Longitude: lng = -180 + v × 360 (uniform). The math is one of the standard Marsaglia methods for sphere-uniform sampling.

2. Land-only filter (rejection sampling)

Generate a sphere-uniform point. Run a point-in-polygon test against all 241 country features in Natural Earth’s 1:50,000,000 cultural-vectors set. If the point falls inside a country polygon, accept it. If not (ocean / unmapped), retry up to 250 times. Empirically the first attempt succeeds ~29% of the time, so the average count of attempts for a single accepted point is about 3.4. Even at 100 batch size, total runtime is well under a second.

3. In-a-country sampling

Compute the bounding box of the country polygon (minimum and maximum lat/lng). Sample a point inside the bounding box using the same equal-area latitude transform within the latitude band. If the point falls inside the country polygon, accept; otherwise reject and retry up to 600 times. For most countries, 1–3 attempts succeed; for awkwardly shaped countries (Chile, Norway, Indonesia), 5–15 is typical.

4. Pseudorandom number generation

With no seed: native Math.random() (different on every page-load). With a seed: we hash the seed string with the 53-bit cyrb53 hash, then feed the result into mulberry32 — a small, statistically robust 32-bit PRNG. Same seed + same settings = same points, every time. Different seeds produce statistically independent point sets.

5. The place card (loaded on selection)

Details load only for the point you select, never for a whole batch, so a run of 100 points stays fast. When you pick a point, the card calls our own place lookup — a compact build of Natural Earth admin-1, marine and landform polygons plus GeoNames towns, served from the site — to name the country and region, the sea for an ocean point, the landform, the continent, and the nearest towns by distance and direction. Elevation (or ocean depth) comes from AWS Terrain Tiles; the time zone from the same lookup the Time Zone Finder uses; day/night and today’s sunrise and sunset from Astronomy Engine. The Wikipedia-nearby search runs only when you tap its button.

6. Near me (points around you)

Pick an angular distance whose cosine is spread evenly from the center out to the chosen radius — this is what makes every ring of the circle get its fair share of area, instead of crowding the middle — and a uniform compass bearing, then step that far along the great circle from where you are. With “Land only” on, a point that falls on water is re-rolled until it lands on land. Your location stays in your browser; nothing about it is sent anywhere, and only a point you open is looked up for its details.

7. States, provinces and regions

To draw inside one first-level area fairly, each separate piece of the area is weighted by its true surface area; a piece is chosen in proportion to that weight, a point is drawn uniformly by area inside its bounding box, and it is kept only if it falls within the area’s actual shape (holes excluded). Because the point is drawn in the same shape the card reads from, a point drawn in Texas is labeled Texas.

8. Random town

Every town that matches your filters — country, state or province, and minimum population — is equally likely, and a batch never repeats one. The towns come from the free GeoNames dataset (CC BY 4.0), 171,161 populated places in all, so the picks cluster where towns are dense rather than spreading evenly across the map.

SimpleMapLab vs other random location generators

Honest comparison with the major free random location tools online. Each tool wins different scenarios.

The pole bias bug — why most random location tools are wrong

You can see the bug for yourself: take any generator that picks a latitude uniformly between -90° and +90°, generate a few thousand points, and plot them on a globe. They pile up in two visible blobs at the North and South Poles, with the equatorial belt looking suspiciously empty — the signature of sampling latitude instead of sin(latitude).

The math reason: if you pick latitude uniformly, the probability of being in the latitude band [70°, 80°] is the same as [0°, 10°] — namely 1/18. But polar latitude bands are weighted by cos(latitude), so the surface area of [70°, 80°] is dramatically smaller than [0°, 10°]. The same number of points are squeezed into much less area near the pole — much higher density.

Visually: a "random place on Earth" produced by a naive generator overrepresents high-latitude countries (Russia is the closest to the pole and the most over-counted) versus their actual surface area share. Antarctica is wildly overrepresented. The Pacific Ocean is underrepresented because most of it is near the equator.

Our fix is the asin(2u − 1) transformation. After this transformation, a random point is genuinely uniform over the sphere’s surface area — Russia comes up in proportion to its actual share, the equator gets its fair turn, and the South Pacific is honestly represented.

Which country comes up most often in "Land only" mode?

For a uniformly distributed point on land, the probability of any country is its share of the total land area. The biggest land areas (and their approximate land-area share):

Generate 100 land-only points, and on average ~50 will fall in those top ten countries. The remaining ~50 are spread across the other 185 countries. Vatican City (0.49 km²) has a 0.0000003% chance per random pick — you would need to generate ~300 million points before one lands inside it.

Related tools and resources

For a single point picked by area or population: Find Cities in Radius and Find ZIP Codes in Radius. For the country at any GPS point: What Country Am I In?. For elevation at a random point: Elevation Finder. For time zone at a random point: Time Zone Finder. For drawing distance circles around a random pick: Map Radius Tool. For the antipode of a random point: Antipode Finder. For coloring a map with a random country pick: Color a Map.

Frequently asked questions

The tool generates uniformly distributed random points on the sphere using the formula lat = asin(2u − 1) × 180/π, lng = -180 + v × 360 (where u and v are uniform [0,1] random numbers). For "Land only" mode, it rejects points that fall outside any country polygon (Natural Earth 1:50m / 1:50,000,000-scale boundaries) and re-rolls. For "In a country" mode, it samples within the country’s bounding box and rejects points outside the polygon.
Because Earth is a sphere, the area of a 1° latitude band is not constant — it shrinks as you approach the poles by a factor of cos(latitude). If you sample latitude uniformly between -90° and +90°, you cluster points near the poles (because there is less area there but the same probability). The asin transformation compensates for the cos(lat) area element so the result is genuinely uniform by surface area. Almost every "random location generator" online gets this wrong.
About 29%. Earth’s surface is 71% ocean and 29% land; for a uniformly distributed point, the probability of landing on land matches the land share. So in "Anywhere on the sphere" mode with 100 points, you should expect roughly 29 on land and 71 in ocean. In "Land only" mode the tool re-rolls until it gets a hit, so 100% of the output is on land.
Very accurate for the interiors of countries. We use Natural Earth 1:50,000,000 boundaries, which are the de-facto cartographic standard for world maps. For points in the open ocean (no country), the result is "unmapped". For very small islands (Tuvalu, Nauru, etc.) and disputed border zones, polygons may be missing or simplified — the tool reports "ocean / unmapped" in those cases.
Yes. States, provinces and other first-level areas work. Choose "In a country or state", pick a country, then pick a state, province or region, and every point is drawn equal-area inside that area, so each square mile has the same chance. There are 4,395 states, provinces and other first-level areas across 194 countries. For cities there are no reliable boundary shapes, so "Random town" instead picks real towns, filterable by country, state and minimum population.
A seed makes generation reproducible. The same seed and the same settings always produce the same points (in Near me, for the same center). This is useful for: sharing a specific batch with someone ("seed = trip-2026"), running deterministic tests in software, repeatable classroom exercises, or saving a result you can reproduce later. Leave the seed empty for fresh randomness using the browser’s Math.random.
We hash the seed string with a 53-bit cyrb53 hash, then feed the result into the mulberry32 pseudorandom number generator. Mulberry32 is a small, fast, statistically robust PRNG suitable for non-cryptographic use. (Do not use this tool to generate cryptographic keys.) Different seeds produce statistically independent point sets.
For long thin countries (like Chile or Norway) or countries with lots of islands (like Indonesia or the Philippines), the country’s bounding box has a lot of "wasted" area outside the actual country. The tool samples within the bounding box and rejects points outside the polygon — so for the most awkwardly-shaped countries it can take 5–10 attempts per accepted point. Even so, generating 100 points usually completes in under a second.
Antarctica is in the Natural Earth dataset. "Land only" includes Antarctica (it is land). "In a country" treats Antarctica as one entry; it is technically not a country (governed by the Antarctic Treaty System). The Russian Federation has the largest land area, then Antarctica, then Canada, USA, China, Brazil, Australia. Equal-area sampling reflects this — Russia and Antarctica come up about 11% and 9% of the time respectively under "land only" with random country distribution.
Yes — CSV and GeoJSON are both available after generation. CSV is best for spreadsheet analysis or dataset use; GeoJSON drops directly into mapping tools like QGIS, Mapbox, Leaflet, or our own Color a Map and Map with ZIP Codes tools. Each point has id, lat, lng, country, and ISO 2-letter code in the export.
The coordinates are real geographic positions on Earth. Whether there is a "place" there in the human sense — a town, a road, a building — is a separate question. Select any point to open its place card: it names the country and region, lists the nearest towns with distance and direction, and offers a Wikipedia-nearby search. Many generated points land in remote forest, desert, or open water with the nearest town tens or hundreds of kilometers away; that is genuinely what the result tells you.
From a bundled extract of the free GeoNames "cities1000" dataset (every populated place with a known population of 1,000 or more). For the selected point we compute the great-circle (haversine) distance to each nearby town using a 1° grid index, then show the three closest plus the nearest place with a population of 100,000 or more if it is not already in the list. Each is given with its population, distance in kilometers and miles, and a 16-point compass direction from the town to the point.
The region and marine names come from Natural Earth’s small-scale (1:10m) physical polygons, simplified further so the data is light enough to load quickly. Those polygons are generalized — a coastline or a desert edge can be off by a few kilometers — so near a boundary the named landform or sea is a close guide rather than a survey-grade answer. We label it "approximate" for that reason. The country and admin-1 region are taken from more detailed administrative polygons and are reliable well inside a border.
The "Street View (nearest panorama)" link asks Google Maps for the closest available panorama to the coordinate. Street View only exists where a camera car or contributor has been, which for remote random points can be the nearest road, trail or town — sometimes many kilometers away. That is a property of Street View coverage, not of the coordinate: the point itself is exactly where the card says it is.
Depth (and land elevation) comes from AWS Terrain Tiles, which use GEBCO/ETOPO bathymetry over the oceans. That is a coarse global model — tens of meters of vertical error are normal in the deep sea, and small features are smoothed out — so treat the depth as an approximate figure, not a sounding. It is good enough to tell an abyssal-plain point from a continental shelf, which is what most people want from a random ocean coordinate.
Yes. "Anywhere on the sphere" returns a true uniform random point — ~71% of the time it will be in the ocean. The pin still drops on the map (over the water); the country card shows "Ocean / unmapped". This is the mathematically honest result. For travel and most practical use, switch to "Land only".
The tool supports anywhere on the sphere, land only, inside a country or one of its states, provinces or regions, within a radius of where you are, and a random real town. Custom polygons (drawn shapes, uploaded GeoJSON) aren’t supported. To approximate one, generate a large batch and filter the exported CSV or GeoJSON in a GIS tool.
Different goals. The area modes give every square mile the same chance, so most points land far from any town, while Random town gives every town the same chance, so picks cluster where towns are dense. "Random ZIP code" or "random city" picks from a finite list — outputs are always populated places weighted by, say, population or count. This tool generates random POINTS — most of them in remote, uninhabited locations. If you want random populated places (cities, ZIPs), see our Find Cities in Radius and Find ZIP Codes in Radius tools.
Yes. The math is public-domain. Natural Earth boundary and physical data is public domain. GeoNames town data (used for nearest-town distances) is licensed CC BY 4.0, which allows commercial use with attribution. Wikipedia content is linked, not copied. No API key, no rate limit, no watermark. Crediting GeoNames and Natural Earth is appreciated for derived works.
Data sources & methodology

Sphere sampling: equal-area transform lat = asin(2u − 1), lng = -180 + v × 360, with cyrb53 + mulberry32 pseudorandom generation (non-cryptographic). Land filter: ray-casting point-in-polygon against Natural Earth 1:50m country boundaries (public domain). Place card: country, admin-1 region, sea, landform and continent from Natural Earth 10m administrative, marine and physical polygons (public domain, simplified); nearest towns from GeoNames (CC BY 4.0). Elevation and ocean depth: AWS Terrain Tiles (USGS 3DEP, SRTM, GEBCO/ETOPO). Time zone: the IANA time zone database via the same lookup used by our Time Zone Finder. Day/night, sunrise and sunset: Astronomy Engine. Nearby places: Wikipedia GeoSearch (links only, fetched when you tap the button). Map basemap: OpenFreeMap Liberty vector tiles. The anywhere, land-only, whole-country and Near me draws run entirely in your browser; the state, province and random-town draws are answered by the site, which holds their larger datasets. Your own location never leaves your browser, and a point’s coordinates leave the page only when you open it, to fetch its place details, time zone and Wikipedia results. Exports are built in your browser as file downloads.

More SimpleMapLab tools

What Country Am I In?

Identify the country at any GPS, address, or map click.

Antipode Finder

Find the exact opposite side of the Earth from any location.

Bearing & Compass Calculator

Compass bearing between two points — true and magnetic.

Elevation Finder

Find altitude of any point on Earth from a random GPS pick.