How to use the random country picker
- Choose a Continent: All, Africa, Asia, Europe, North America, South America or Oceania.
- Set How many countries you want, from 1 to 50.
- Leave No repeats ticked so each country appears at most once.
- 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?
Why is Türkiye in Asia and Russia in Europe?
Why do I see two letters instead of a flag?
What about countries with more than one capital?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.