Random & Generators

Random Country Generator

Pick one or more random countries from all 195 countries in the world. Each result shows the flag, capital city, continent and ISO code, and you can hide the capitals to quiz yourself.

Free, runs in your browserUpdated October 2026

Your random countries

Flags are shown with standard Unicode flag characters. Some Windows computers display them as two-letter codes instead.

Random country generator diagram: a fair draw from 195 countries returns flags, capitals and continents
How the Random Country Generator works: Draw a random country with its flag, capital and continent.

How to Use the Random Country Generator

How to use the random country generator: pick a continent and count, choose quiz mode, then press Pick countries
Numbered steps on the Random Country Generator. Follow them in order.
  1. Choose a continent, or keep All continents to draw from all 195 countries.
  2. Pick how many countries to draw, from 1 to 10.
  3. Tick quiz mode to hide capitals until you tap them.
  4. Press Pick countries and read each country's flag, capital and continent.

Choose a continent or keep All continents, set how many countries you want, and press the Pick countries button to start. Each result shows the country's flag, name, capital city, continent and two-letter ISO code.

Countries never repeat within one draw, so a list of ten gives ten completely different places. The counter above the results shows how many countries match your filter and the chance of each one appearing.

Tick Quiz mode to hide the capitals, then tap each card to check your answer. It turns the country generator into a quick geography quiz you can use alone, with friends or in a classroom.

Which Countries Are Included

The list has 195 countries: the 193 member states of the United Nations plus the two UN observer states, Vatican City (the Holy See) and Palestine. That matches the most common count in use today.

ContinentCountries in the list
Africa54
Asia48
Europe44
North America23
South America12
Oceania14
Total195

Dependent territories such as Greenland, Puerto Rico and Hong Kong are not included, because they are not fully independent sovereign countries. Some other generators list 250 or more places by counting territories and autonomous regions.

The United Nations list of member states is the main reference used here. Partly recognized states such as Taiwan and Kosovo are left out, since they are neither UN members nor official UN observer states.

How Countries Are Grouped by Continent

Continents follow the regions used by the United Nations Statistics Division, known as the M49 standard. The Americas are split into North America, which includes Central America and the Caribbean, and a separate South America.

Under this system Russia is counted in Europe, while Türkiye, Cyprus, Georgia, Armenia and Azerbaijan are counted in Asia. Other atlases may place these transcontinental countries differently, so treat the grouping as just one convention.

Oceania covers Australia, New Zealand and the many Pacific island nations, 14 countries in all. Africa is the largest group with 54 countries, which makes it the best filter for a long and varied quiz.

How the Random Pick Works

The generator filters the list by continent, then shuffles it with the Fisher-Yates method using your browser's cryptographic random source. It then shows the first few countries from that shuffled list as your final result.

chance a given country is picked = countries shown ÷ countries in the filtered list

Every country in the filtered list has exactly the same chance of being chosen for your draw. With one country from the full list, each has a 1 in 195 chance, about 0.5% per pick.

With 3 countries from the 14 in Oceania, each Oceanian country has a 3 in 14 chance, about 21.4%. No country is weighted by size or population, so tiny Tuvalu is as likely as China.

Countries With More Than One Capital

A few countries split their capital functions between two or more cities. South Africa has three capitals: Pretoria is the executive capital, Cape Town the legislative capital and Bloemfontein the judicial capital of the country.

Bolivia's constitutional capital is Sucre, while the president and government sit in La Paz. In Malaysia, Kuala Lumpur is the official capital, but many government offices have moved to the nearby planned city of Putrajaya.

The capital of the Netherlands is Amsterdam, although the government meets in The Hague. Capitals that are disputed or not widely recognized are labeled in the results, so your quiz answers stay accurate and fair.

Ideas for Using a Random Country

Teachers often use a random country picker for classroom research, giving each student a country to present. It also works for school projects, pen pal assignments and fast geography games at the end of class.

At home, try a cooking challenge and make a traditional dish from the country you get, or spin up travel inspiration by picking five countries and planning the dream trip you would take one day.

Writers use a random nation as a story prompt, and trivia fans use it to practice flags and capitals. For a fair game, pick several countries at once, since none repeat within a single draw.

  • Geography quiz: turn on Quiz mode and name each capital before you reveal it.
  • Travel destination: pick one country from a continent you have never visited.
  • Party game: name three facts about the country that comes up.

About the Two-Letter Country Codes

Each result shows the country's ISO 3166-1 alpha-2 code, the two-letter code officially maintained by the International Organization for Standardization. For example, Canada is CA, Japan is JP, Brazil is BR and Germany is DE.

These codes are used in country code internet domain names, shipping forms, passports and software. There are a few exceptions online: the United Kingdom uses the .uk domain, although its official ISO code is GB.

The same code is used to display the flag, so the flag and the code always match. Some systems, including many Windows computers, show flags as two letters instead of a picture of the flag.

Frequently asked questions

How many countries are in the world?

Most sources count 195 countries: the 193 United Nations member states plus the two observer states, Vatican City and Palestine. This generator uses that list of 195 countries.

Can I get a random country from one continent?

Yes. Choose Africa, Asia, Europe, North America, South America or Oceania, and the generator only picks from that continent. The counter shows how many countries match and each one's chance.

Is the random country generator fair?

Yes. It shuffles the list with your browser's cryptographic random source, so every country in the filtered list has an equal chance and none repeat within a draw.

Why does a flag show as two letters?

Flags are displayed with standard Unicode flag characters. Some systems, including many Windows computers, show these as the two-letter country code instead of a picture. The country is still correct.

Which continent is Russia in?

Russia spans Europe and Asia. This generator follows the United Nations regions, which place Russia in Eastern Europe, while Türkiye and Georgia are counted in Asia.

Can I hide the capitals for a quiz?

Yes. Tick Quiz mode and the capitals are hidden behind a button on each card. Say your answer, then tap to reveal the capital city and check whether you were right.