Random Country Generator
Generate a random country from the 193 UN member states, or open the pool to all 250 places worldwide. Filter by continent and population, draw several at once without repeats, and share the exact result with a link.
Lowest in current filter: 9,492
Highest in current filter: 1,463,865,525
1 draws a single result; 2-10 draws that many distinct countries at once.
Current pool: 193 countries match these filters.
Press Generate to draw.
How a draw is decided
Every filter you set -- continent, UN members only vs. every entry, a population range -- narrows the 193-to-250-country dataset down to a pool. The draw itself is a single random integer from 0 to (pool size โ 1), generated with the Web Crypto API and unbiased rejection sampling, then used as an index into that pool. Nothing about a country's name, position in the data, or how recently it was drawn affects its odds -- every country left in the pool after filtering has exactly the same chance as every other one.
pool = countries matching continent + territories + population filters
index = randomInt(0, pool.length โ 1) โ via crypto.getRandomValues + rejection sampling
draw-N-without-repeats = Fisher-Yates shuffle of the pool, truncated to N
The default pool: 193 UN member states
This is the exact continent breakdown of the default pool, computed live from the committed dataset -- not typed by hand, so it can never silently drift out of sync with the data:
| Continent | UN members | Including territories |
|---|---|---|
| Africa | 54 | 59 |
| Americas | 35 | 56 |
| Asia | 46 | 50 |
| Europe | 44 | 53 |
| Oceania | 14 | 27 |
| Total | 193 | 250 |
The ten most populous UN member states
Computed from the committed population data (source and fetch date below), most recent figure per country:
| # | Country | Population |
|---|---|---|
| 1 | ๐ฎ๐ณ India | 1,463,865,525 |
| 2 | ๐จ๐ณ China | 1,406,585,000 |
| 3 | ๐บ๐ธ United States | 341,784,857 |
| 4 | ๐ฎ๐ฉ Indonesia | 285,721,236 |
| 5 | ๐ต๐ฐ Pakistan | 255,219,554 |
| 6 | ๐ณ๐ฌ Nigeria | 237,527,782 |
| 7 | ๐ง๐ท Brazil | 212,812,405 |
| 8 | ๐ง๐ฉ Bangladesh | 175,686,899 |
| 9 | ๐ท๐บ Russia | 143,513,328 |
| 10 | ๐ช๐น Ethiopia | 135,472,051 |
And the five smallest by population with a figure on file: Tuvalu (9,492), Nauru (12,025), Palau (17,663), San Marino (34,109), Marshall Islands (36,282).
Worked example
Six real, reproducible draws from the default 193-country pool, using the tool's own engine at a fixed illustrative seed instead of live randomness, so this page always shows the same sequence. Your actual draws above use real, non-repeating cryptographic randomness.
| Draw # | Result |
|---|---|
| 1 | ๐ธ๐ฌ Singapore |
| 2 | ๐ฒ๐ช Montenegro |
| 3 | ๐น๐ญ Thailand |
| 4 | ๐จ๐ฉ DR Congo |
| 5 | ๐ต๐พ Paraguay |
| 6 | ๐ฌ๐ผ Guinea-Bissau |
This exact sequence is pinned and checked in the site's own test suite, so a future change to the engine or the underlying data can't silently drift this table out of sync with reality.
Data sources
Country facts come from mledoze/countries (Open Data Commons Open Database License (ODbL) v1.0, fetched 2026-09-17); population from World Bank Open Data -- World Development Indicators (SP.POP.TOTL) (Creative Commons Attribution 4.0 (CC BY-4.0), fetched 2026-09-17); UN membership cross-checked against the United Nations' own member-states list. Full detail on the About page and the Country List.
Frequently Asked Questions
How many countries are there?
It depends what you count. The United Nations lists exactly 193 member states, and that's this tool's default pool. Turn on "All 250 (+ territories)" and the pool grows to every entry in the underlying dataset: the 193 members plus non-independent territories, dependencies and a handful of disputed or unrecognized places like Kosovo and Western Sahara. There is no single universally agreed total -- different lists (UN members, ISO 3166-1, the CIA World Factbook) draw the line differently, which is exactly why this tool lets you choose rather than picking one silently.
Is Taiwan included?
Taiwan has its own ISO 3166-1 entry in the underlying dataset, so it's included when you turn on "All 250 (+ territories)." It is not a UN member state, so it is excluded from the default 193-country pool for the same reason Kosovo and the Holy See (Vatican City) are: the default pool is exactly the UN's own member list, which is a factual, citable line rather than this site's own judgment call.
Is the pick truly random?
Yes. Every draw uses the Web Crypto API (crypto.getRandomValues) with unbiased rejection sampling, the same source and method used across this studio's other random-generator tools and verified in this site's own automated test suite -- never Math.random() and never a plain modulo shortcut, both of which are measurably biased for pool sizes like 193 that don't evenly divide 256.
Why does a country sometimes show "unavailable"?
Every fact on this site traces to a specific, cited source (see the About page), and some fields simply aren't tracked for every place -- most often population for small non-independent territories, which the World Bank's population indicator frequently omits. Rather than estimate or guess, the field is shown as unavailable, which is itself accurate information: it tells you the fact isn't in either source, not that it's zero or unknown to exist.
Can the same country come up twice in a row?
In single-draw mode, yes -- each draw is independent, exactly like a real coin flip or die roll, so back-to-back repeats are possible and expected occasionally. Set the draw count above 1 and the tool switches to a true without-replacement draw (Fisher-Yates under the hood): every country in that batch is guaranteed distinct.
What changes when I include territories?
The pool grows from 193 UN member states to all 250 entries in the dataset -- adding non-independent places like French Guiana, Greenland (listed under Denmark's dependencies), Puerto Rico, Hong Kong and Macau, plus a few disputed entries. These are real, populated, well-documented places; they're just not sovereign UN member states, which is the one distinction the toggle draws.
Every result here is drawn live in your browser with cryptographically-secure randomness -- nothing is predetermined, saved, or replayable. See the Terms.