Online Tool Store Online Tool Store

Random Country Picker

Picks randomly from the 193 UN member states plus 2 observers, filtered by region, with or without replacement. Uses rejection sampling over a cryptographic random source, because a plain modulo makes the first 61 countries twice as likely.

🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.

Press the button to pick a country.

Options
Regions

Picked so far

Picked in this page with your browser's cryptographic random source, using rejection sampling so every country is equally likely. Nothing is uploaded. Flag glyphs come from your operating system's font — if you see letter pairs instead of flags, your platform does not ship flag emoji, and the country code is shown alongside for that reason.

How to use it

  1. Press the button. That is the whole tool for most people.
  2. Narrow the regions if you want a country from somewhere specific.
  3. Raise the count to draw several at once — useful for teams or brackets.
  4. Leave the no-repeat option on to draw without replacement.

Why the randomness is done properly

Picking a random item from a list looks like one line of code, and the obvious one line is unfair. Take a random byte and reduce it modulo the list length: because 195 does not divide 256 evenly, the leftover changes the odds.

256 mod 195    = 61         61 indices get an extra chance
Afghanistan … France     p = 2/256
Gabon … Zimbabwe         p = 1/256
measured over 6M draws  ratio 1.999  — exactly twice as likely

So the first third of the alphabet would come up twice as often as the rest. The fix is rejection sampling: discard any random value that falls in the incomplete final block and draw again. That makes every country exactly equally likely, and the cost is a rare extra draw. This tool uses a 32-bit value from your browser's cryptographic random source, which makes rejection vanishingly rare.

None of this matters for choosing where to order dinner from. It matters the moment you use a picker for something you would have to justify — a sample, an order of play, an assignment of subjects — and since correctness here is free, there is no argument for the biased version.

What counts as a country

This is a genuine question rather than a technicality, and the answer changes the list length. The tool uses the 193 UN member states plus the two permanent observers — the Holy See and Palestine — for 195, with a checkbox to drop the observers.

Excluded are dependencies and territories: Puerto Rico, Greenland, Hong Kong, Bermuda and the rest. They appear on plenty of country lists, including the ISO 3166-1 standard, which assigns codes to around 249 entries rather than 195 precisely because it is cataloguing territories rather than states. If you were expecting a longer list, that difference is why.

The list was generated from standard region data rather than typed out, then checked: exactly 193 members, no duplicates, every code resolvable, and a one-to-one match between the member list and the regional grouping.

Regions are a convention, not a fact

Transcontinental countries have no correct home. Turkey, Cyprus, Georgia, Armenia and Azerbaijan sit in Asia here; Russia sits in Europe. Reasonable people group these differently, and the totals move with the choice:

Africa    54     Asia     47     Europe  43
Americas 35     Oceania 14     total   193

Africa at 54, the Americas at 35 and Oceania at 14 are the standard figures. The Europe and Asia numbers are the ones that depend on where the transcontinental states are placed, so treat those two as this tool's convention rather than as facts.

The flags are text

Each flag is generated from the country code by mapping its two letters onto Unicode regional indicator symbols — no images are loaded. The upside is that the tool is tiny and works offline. The downside is that rendering depends entirely on your system font, and some platforms, Windows most notably, do not include flag glyphs at all. You will see a letter pair instead. That is why the name and the code are always displayed next to the flag rather than relying on it.

FAQ

How many countries are in the list?

195 — the 193 UN member states plus the two permanent observers, the Holy See and Palestine. That is the most widely used definition of "country", and the observers can be excluded with a checkbox if you want exactly 193. Dependencies and territories such as Puerto Rico, Greenland and Hong Kong are not included, because they are not sovereign states.

Is the pick actually random?

Yes, and it is unbiased, which is a separate claim. It draws from your browser's cryptographic random source and uses rejection sampling. The obvious shortcut — taking a random number modulo the list length — is measurably unfair here: 256 divided by 195 leaves 61, so with a single random byte the first 61 countries alphabetically, Afghanistan through France, come up exactly twice as often as the rest. Measured over six million samples that ratio was 1.999.

Why does modulo bias matter for something this trivial?

For a party game it does not. It matters if you are using the picker for anything you would defend — assigning research subjects, allocating an order of play, or picking a sample. A two-to-one bias across a third of the list is not subtle, and it costs nothing to avoid, so there is no good reason to leave it in.

Why do I see letters instead of flags?

Because your platform does not ship flag emoji. The flags are not images — they are generated from the two-letter country code using Unicode regional indicator characters, which your system font renders as a flag if it has one and as a letter pair if it does not. Windows is the common case. The country code and name are always shown alongside so the result is never ambiguous.

Which continent is Turkey in?

Asia, in this tool. Transcontinental countries have no objectively correct answer and any grouping is a convention: Turkey, Cyprus, Georgia, Armenia and Azerbaijan are grouped with Asia here, and Russia with Europe. On those choices the regional totals are Africa 54, Asia 47, Europe 43, the Americas 35 and Oceania 14, which sums to 193. Move Russia and the European and Asian figures change accordingly.

Is anything uploaded?

No. The country list is part of the page and the picking happens in your browser. Nothing is sent anywhere and no history is stored between visits.

How we compare

Feature Online Tool Store Other random pickers A spreadsheet RAND
Unbiased selection, not modulo Rarely stated
Says which definition of “country” it uses Your list
Draws without replacement Sometimes Fiddly
Filter by region Some
Works offline, no assets to load
Includes territories and dependencies Often If you add them
Country facts, capitals or populations Some

A fair pick from a defined list, with the definition and the method both stated. It deliberately carries no country facts — no capitals, populations or flags-as-images — because that data goes stale and this tool would rather be correct about one thing than approximately right about several.

Explore related tools

Embed this tool

Paste this on your own site — it stays free, and every file still stays in your visitor's browser, not yours or ours.