Random country picker — pick countries with flags and capitals

Choose a continent or All, set how many countries you want, and the tool picks them at random from 195 countries and shows each with its flag, capital and continent.

Live demo · real result from this tool

Press Generate to create a result.

Processed on your device — nothing is uploaded.

How to use the random country picker

  1. Choose a Continent: All, Africa, Asia, Europe, North America, South America or Oceania.
  2. Set How many countries you want, from 1 to 50.
  3. Leave No repeats ticked so each country appears at most once.
  4. Press Generate. A table shows the flag, country, capital and continent, with buttons to copy it or download it as CSV, and the number of countries in the pool.

What it does and when to use it

Use it for a geography quiz (“What is the capital of…?”), to choose a country for a school project or a cooking night, to plan an imaginary trip, or to pick a team name in a game. Picking within a continent keeps a lesson focused: Africa has 54 countries, Asia 48, Europe 44, North America 23, Oceania 14 and South America 12.

For a dish from the country you pick, the random food generator covers 25 cuisines. For a quiz with ready answers, try the random trivia generator. If you want some countries to come up more often, list them with weights in the weighted random picker.

How it works

The countries are a fixed list stored in the page, each with its ISO two-letter code, capital and continent. The tool filters the list by continent, then shuffles it with a Fisher–Yates shuffle and takes the first entries (No repeats), or draws each country independently. All random numbers come from crypto.getRandomValues with rejection sampling, so every country in the pool has the same chance. Asking for more countries than the pool holds returns the whole pool.

Flags are not images: each one is made from the country code as a pair of flag-letter emoji, which your device turns into a flag.

Worked examples

All of South America. South America with How many 50 returns all 12 countries in random order and “Countries in the pool: 12”. The Bolivia row reads “Sucre (constitutional), La Paz (seat of government)”.

Two Pacific countries. Oceania with How many 2 gave Palau (capital Ngerulmud) and Fiji (capital Suva) in one run, from a pool of 14.

One country, anywhere. All with How many 1 picks from 195.

Limits and tips

  • Country and capital names are in English, such as Türkiye and Côte d’Ivoire as officially used.
  • The list is fixed. If a country moves its capital or changes its name, the list may lag behind until it is updated.
  • Everything runs in your browser.

Frequently asked questions

Which countries are included?
The 193 member states of the United Nations plus its two observer states, the Holy See (Vatican City) and Palestine, for 195 in total. Territories such as Greenland or Puerto Rico are not on the list.
Why is Türkiye in Asia and Russia in Europe?
Continents follow the UN M49 regions used for statistics. That system puts Türkiye, Cyprus, Armenia, Azerbaijan and Georgia in Asia and Russia in Europe. Other atlases may group them differently.
Why do I see two letters instead of a flag?
Flags are emoji built from the two-letter country code. Some systems, notably Windows, do not draw flag emoji and show the letters instead, such as BO for Bolivia. The country is still correct.
What about countries with more than one capital?
Where the capital is genuinely split or disputed, the tool says so. South Africa lists Pretoria, Cape Town and Bloemfontein with their roles, Bolivia lists Sucre and La Paz, and Nauru shows that it has no official capital.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close