RandomBasis

Capital to name

Random Capital City Generator

Draw a capital city and name the country - filter by continent for revision.

Runs locally in your browser. Nothing you generate is ever sent to a server.

Press "Generate Capital" to see a result here.

Continent

About this random capital city generator

Press Generate and a capital city appears with the country it belongs to underneath. Because the country is hidden until you look, the tool works as a flash card rather than a reference list - which is the difference between reading and actually learning.

The capitals people get wrong

Almost everyone who misses a capital misses it the same way: by naming the biggest or most famous city instead. Sydney is not Australia's capital, Canberra is. Rio is not Brazil's, Brasilia is. Istanbul is not Turkey's, Ankara is. Zurich is not Switzerland's, Bern is. Purpose-built and deliberately modest capitals are common, usually because two larger rivals could not agree.

Countries with more than one

South Africa splits its functions across three cities: the executive in Pretoria, parliament in Cape Town and the courts in Bloemfontein. Bolivia does something similar with Sucre and La Paz. This list gives the administrative capital, which is the answer expected in most quizzes, but the split is worth knowing about.

Filtering by continent

Narrowing to one continent before the draw makes revision far more effective than mixing the whole world together. Learning Africa's capitals as a set builds the mental map alongside the names, and the map is what makes them stick.

Common uses

How the randomness works

The list is filtered to the continent you chose, then a capital is drawn using your browser's cryptographic random source with rejection sampling, so nothing is favoured. Batches without repeats use a Fisher-Yates shuffle driven by the same source.

How do I use this as a quiz?

Press Generate and a capital city appears. Name the country before reading the line underneath, then press again.

Can I limit it to one continent?

Yes. The filter covers Europe, Asia, Africa, the Americas and Oceania.

Why is Australia's capital Canberra and not Sydney?

Because Sydney and Melbourne could not agree, so a new city was built between them in 1913 specifically to be the capital. Several countries did the same thing, including Brazil with Brasilia.

Why do some countries have more than one capital?

Because functions are split. South Africa has three - Pretoria for the executive, Cape Town for parliament and Bloemfontein for the judiciary. This list uses the administrative one.

Can I get a list for a test?

Yes. Set the quantity and press once, then Copy All to take the whole set with countries included.

Is the pick actually random?

Yes. Each capital is drawn with your browser's cryptographic random source, so every one in the chosen continent has an equal chance.