Pick a city.
Anywhere on Earth.

A curated 180-city pool — capitals, megacities, and US standouts. Filter by country, continent, or size, and get a card with the country and population.

180+ world cities Country & size filters Cryptographically fair
Press generate to pick a city
Filters & count

About this generator

The hard part of a city picker isn't randomness — it's curation. There are technically about a million places on Earth that someone calls a city, and a tool that picks one at random uniformly across all of them returns "Mansfield" or "Trujillo" 99% of the time. Useful for almost no one. So this is a curated pool of about 180 cities: every national capital we list, every megacity (5M+ metro), top US cities by population, and a handful of culturally notable smaller entries.

The pick uses crypto.getRandomValues with rejection sampling. Inside your filtered set, every city has an exactly equal chance — Tokyo and Tashkent both come up 1/N of the time. No popularity weighting, no cheating toward English names. Multi-pick batches sample without replacement using Fisher-Yates, so you'll never see the same city twice in one round.

Size buckets follow conventional cutoffs: megacity (5M+ metro) per the UN World Urbanization Prospects threshold, large (1M–5M), medium (100K–1M), small (under 100K). Population figures are metro-area where that's the standard comparison unit (Tokyo = 37M, not the 13M city-proper figure), and city-proper for the smaller entries where metro doesn't really apply. Numbers come from public sources — UN, national censuses, city statistical bureaus — and are round, approximate, and updated periodically. They're plenty good for trivia, fiction settings, or filtering by size; not the right source for a market sizing report.

The country dropdown only shows countries with multiple entries in the pool, so you can quickly filter "any city in India" without scrolling past 195 single-entry options. If you want a wider geographic spread, the country generator covers all 195 nations, and the state picker handles the US specifically.

What people use it for

Travel, classrooms, fiction. The QA mock data use is more common than you'd expect.

Travel inspiration

Spin the globe without the globe. People run this when they want their next trip suggested, then book a flight or save the city to a "someday" list.

Pub trivia and quizzes

Generate five megacities, ask the room to name the country. Or set country to India and challenge anyone to name three cities outside Mumbai and Delhi.

Classroom geography

Each student gets a different city to research and present. The size filter keeps a unit on world capitals tightly scoped, or opens it up for a "small but interesting" project.

Fiction settings

Writers and tabletop GMs use this to break out of default-New-York or default-London. A random megacity from the right continent gives you a setting with built-in research material.

Mock data for QA

Developers seeding test fixtures pull a batch of ten cities, paste them into a database, ship a more realistic-looking demo than "Lorem Ipsum, Dolor."

"Could I live here?" daydream

Generate a city, look up rent, weather, language, and visa requirements. A lot of actual relocation research starts with one of these random spins.

How it works

The picking

The pool starts as 180-ish cities, filters down by your country, continent, and size selections, then samples using crypto.getRandomValues with rejection sampling. The naïve random % N approach is biased when N doesn't divide evenly into 2³² — we discard out-of-range draws and re-roll, so every remaining city is exactly 1/N probable. Multi-pick batches use Fisher-Yates without replacement.

The data

All cities ship inline with the page — no API call, no network round-trip. Population comes from UN World Urbanization Prospects (metro-area, where applicable), national censuses, and city statistical bureaus, rounded to readable figures. The full dataset is under 8 KB.

State & sharing

Filter selections live in the URL query string and mirror to localStorage. A link like /city/?country=Japan&size=large recreates that filter for whoever opens it. Recent picks are kept locally for the last ten generations.

Drop this on a travel blog.

Bloggers, teachers, fiction writers — paste this in WordPress, Notion, Ghost, or any LMS that allows iframes. Filter settings travel through the URL.

Embed docs →
<iframe src="https://randomgen.net/city/embed/"
  width="100%" height="520"
  loading="lazy"></iframe>

Common questions

How many cities are in the pool?

Around 180 — a curated mix of major world capitals, top-15 cities by metro population, US cities over 500K, and a handful of smaller standouts. Not exhaustive, but broad enough that you don't see the same five cities every spin.

What size buckets does it use?

Megacity (5M or more, metro), large (1M–5M), medium (100K–1M), and small (under 100K). The cutoffs are deliberately round and standard — 5M is the UN's megacity threshold. Population figures are metro-area where applicable, since that's how cities are most commonly compared.

Can I limit it to one country?

Yes. The country dropdown lists countries with multiple entries in the pool — US, India, China, Brazil, and the like. Pick a country and every result will be from there. To pick any city across the entire world, leave it on "Any country."

Why isn't my hometown in the list?

The pool is curated, not exhaustive. We include capital cities, megacities, and top-N-by-population entries. If your home city is under 100K and not a national capital, it's probably not there. Email [email protected] if you think a notable city is missing — the list gets refreshed periodically.

Where do the population numbers come from?

Round, widely-cited figures from public sources — UN World Urbanization Prospects, national census bureaus, and city-government statistics. They're metro-area where that's the conventional unit, city-proper for smaller entries. Approximate, updated periodically, plenty good for trivia or filtering.

Can I get more than one city at a time?

Yes. Set count up to 10. Each batch is drawn without replacement so you'll never see the same city twice in one round. Good for assigning research projects, building a multi-city travel itinerary, or generating mock data for QA testing.

Is this random pick actually fair?

Yes. We use crypto.getRandomValues with rejection sampling — same source banks use for keys. Every city in your filtered set has an exactly equal probability. No size-weighting, no bias toward English names, no popularity weight.