simplemaplab

Random Location Generator

Generate a random place on Earth — anywhere on the sphere, on land only, or inside a specific country. Free tool. Mathematically honest equal-area uniform distribution, batches up to 100 points, optional seed for reproducibility, CSV and GeoJSON export.

Loading map…
🎲

Generate a random point on land (any country, any landmass). Points are equal-area uniform — Antarctica gets less, the equator more.

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 roughly 4× more likely to land at 70°N latitude than at the equator.

The fix is to sample sin(latitude) uniformly, not latitude itself. The formula: lat = asin(2u − 1) × 180/π where uis 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

Five 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 inside a country boundary. In a country lets you pick any of 195 countries and generates a point inside its polygon.
  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 result list shows each location with country flag, country name, and lat/lng. The map auto-frames all pins.
  5. Re-roll, copy, or export. Tap "Re-roll" to generate another batch with the same settings (uses a fresh internal seed). Tap "Reveal place" on any card to fetch the human-readable place name from OpenStreetMap. Click any pin on the map to see its details. Export the whole batch as CSV or GeoJSON.

The three 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 50 m). Ocean, sea, and small unmapped islands are skipped.0% (ocean rejected)Travel inspiration, geography quizzes, picking a random place on terra firma.
In a countryGenerates points only inside a chosen country’s polygon. Use the 🎲 button for a random country pick.0% (country interior only)Marketing geofences, geocaching within a region, education focused on one country.

What people use this tool for

Seven recurring patterns we see in the analytics.

Travel inspiration and "where should I go next?"

Pick "Land only" with count = 1, generate, and let the universe choose. The tool surfaces a single random country + lat/lng — Tap "Reveal place" to see the nearest city or town. People use this for weekend-trip ideas, bucket-list inspiration, "throw a dart at the world" challenges, and anti-FOMO travel planning. The randomness is more honest than a curated "best of" list.

Geocaching, orienteering, and outdoor challenges

Generate 10 random points on land within your country, get coordinates, and use them as challenge waypoints. Or do "rolling geocaching" — generate one random point at a time, attempt to reach it, then re-roll. The tool exports clean CSV/GeoJSON that loads into Garmin, Gaia GPS, AllTrails, and most outdoor-mapping apps.

Geography quiz and education

Generate 5 random countries (use the 🎲 next to the country dropdown), or generate 20 random points on land and ask students to identify each country. Equal-area uniformity means the activity surfaces less-famous countries in proportion to their land area — Russia, Canada, China, USA, Brazil, Australia, India, Argentina come up most; Vatican City, Monaco, Tuvalu rarely. Honest geographic exposure.

Marketing geofencing and spatial AB testing

Need to test a marketing email by geographic randomization? Generate 50 random points within the United States, use them as geofence centres, and split your audience by proximity. Reproducible via seed so you can re-run the experiment with the same set. Export as GeoJSON for ingestion into your geo-targeting platform.

Software development — generating test data

Building an app that handles GPS coordinates? Seed test data with a few hundred random points (split CSV exports across batches of 100). The points are equal-area uniform, antimeridian-safe, and validated against country polygons — much higher quality than just rolling lat/lng grids by hand. Reproducibility via seed means your CI tests do not flake.

Art, conceptual projects, and creative prompts

Photographer projects ("photograph one random place on Earth every week for a year"). Writing prompts ("describe a day in this random country"). Public-art interventions ("plant a tree at this random coordinate"). The tool surfaces both the coordinate and the country with flag, which makes the creative output instantly contextual.

D&D / TTRPG world-building and procedural generation

Worldbuilders and DMs use random-location tools for procedural maps, hex-crawl design, and "where does the next adventure happen?" prompts. The seed input means a campaign can have a stable randomness — re-using the same seed re-creates the same world point list. Pair with the bearing tool and the antipode finder for a full spherical geometry kit.

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. Reverse geocoding (on demand)

We do not auto-call OpenStreetMap Nominatim for every result — that would burn the public rate limit on batch generations. Instead, you can tap "Reveal place" on any single card to enrich that one point with a human-readable name (city, region, nearest feature). The country flag and country name are always shown, since those come from the polygon test and are free.

SimpleMapLab vs other random location generators

Honest comparison with the major free random location tools online. Each tool wins different scenarios — the table is a feature checklist, not a value judgement.

FeatureSimpleMapLabrandom-place.comgeomidpoint.comWolfram AlphaRandom APIs
Free, no sign-upLimited / paid
Equal-area uniform sphere distribution
Land-only filter (point-in-polygon)Limited✓ (paid)
"In a country" mode (195 countries)✓ (paid)
Seed-based reproducibility
Batch up to 100 pointsUp to 10Up to 51 only✓ (paid)
CSV + GeoJSON exportLimitedAPI only
Country flag + country name on each result
Reverse geocoded place name (on demand)✓ (paid)
No watermark, no rate limitHeavy adsHeavy adsMath output onlyAPI key required

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

A test we ran on three popular "random GPS coordinates" sites: generated 10,000 points each, plotted them on a globe. The naive sites all show the same pattern — points pile up in two visible blobs at the North and South Poles, with the equatorial belt looking suspiciously empty.

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 the surface area of [70°, 80°] is dramatically smaller than [0°, 10°] (by a factor of 1/cos(70°) − 1/cos(80°) ≈ 5.7×). So the same number of points are squeezed into 5.7× less area near the pole — much higher density.

Visually: a "random place on Earth" produced by a naive generator overrepresents Russia (the country closest to the pole) by a factor of ~3 vs its 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 50 m 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.
For US states, this tool returns points inside the country (USA) polygon — not narrowed to a state. To get a random place in a US state, you can post-filter by drawing a bounding box on a separate state-shape tool, or generate a large batch and filter manually by lat/lng. We may add a "in a state / region" mode in a future version.
A seed makes generation reproducible. The same seed + same mode + same count + same country always produces the same points. 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. Click "Reveal place" on any result to call the OpenStreetMap reverse-geocoder and find the nearest named feature (town, district, mountain, etc.). Many generated points land in remote forest, desert, or open water with no nearby place name; that is genuinely what the result tells you.
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".
Currently we support: anywhere on the sphere, land only, or inside one of 195 countries. Custom polygons (drawn shapes, uploaded GeoJSON) are not yet supported but are on the roadmap. For now, generate a large batch and filter the CSV/GeoJSON externally.
Different goals. "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 data is CC0 (public domain). OpenStreetMap data (used for the optional place-name reveal) is permissively licensed (ODbL). No API key, no rate limit, no watermark. Crediting Natural Earth and OpenStreetMap is appreciated for derived works.
Data sources & methodology

Sphere sampling: equal-area transform lat = asin(2u − 1), lng = -180 + v × 360. Country boundary check: standard ray-casting point-in-polygon against Natural Earth Cultural Vectors at 1:50,000,000 (CC0 public domain, 241 country features). Pseudorandom number generation: cyrb53 hash + mulberry32 PRNG (suitable for non-cryptographic use). Country metadata (name, ISO 2 code, flag): ISO 3166-1. Place name reveal: OpenStreetMap Nominatim reverse-geocoder (called only on user demand, one point at a time). Map basemap: OpenFreeMap Liberty vector tiles. All math runs entirely in your browser; no coordinates leave the page until you click "Reveal place" on a specific result. Exports run client-side as Blob 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.