BrowserTools

Random Country Generator

Random countries with flags and codes

By Guga — BrowserTools maintainer, Tbilisi, Georgia Updated 2026-09-07
Free Private No uploads
What is Random Country Generator?

The list holds 180 countries, each with its name, its ISO 3166-1 alpha-2 code and a flag emoji. Include flag and ISO code is on by default, so a line reads as the flag, the name and the code in brackets; clear the checkbox for bare country names, which is what you want when the value is going into a form field rather than a slide. Worth knowing: results come back sorted into the order the countries appear in the list — alphabetical — rather than in the order they were drawn, and duplicate draws are suppressed. That makes the output tidy for a list of examples and useless for inferring anything about the sequence of the draw itself.

Spin a random country from the complete list of UN-recognized nations, complete with flag emoji and ISO codes. Great for geography games, travel inspiration and random picks.

Private Random Country Generator In Your Browser

Random Country Generator is processed locally with client-side JavaScript. Your files never touch a server, and there is no queue to wait in.

Step-by-Step

How to use Random Country Generator

1

Set How many? between 1 and 195 — the list holds 180 distinct countries.

2

Leave Include flag and ISO code ticked, or clear it for names only.

3

Press Generate; repeats are filtered out and results are shown in list order.

4

Copy the rows for a quiz sheet, a travel prompt or a locale fixture.

Key Capabilities
  • 180 countries with flag emoji and ISO 3166-1 alpha-2 codes.
  • Include flag and ISO code toggle switches between a rich line and a bare country name.
  • Duplicate draws are suppressed, so a run contains each country at most once.
  • Batch sizes from 1 to 195, with the effective ceiling set by the list length.
Common Use Cases
  • A geography teacher builds a quiz by generating twenty countries and asking the class for their capitals.
  • A designer needing locale codes for a language switcher samples a set and tests the picker against it.
  • A product manager running a demo picks a handful at random to illustrate regional pricing.
Clear Answers

Frequently Asked Questions

Why do the countries come back alphabetically instead of in draw order?
The generator collects distinct indices and then sorts them before printing, so the output follows the order of the underlying list. Useful for tidy fixtures; do not read anything into the sequence.
I asked for 195 and got 180. Is that a bug?
No. The count field allows up to 195, but the bundled list holds 180 countries, and duplicate suppression means you cannot exceed the number of distinct entries available.
Which countries are in the list?
Sovereign states with ISO codes, including the small ones such as Liechtenstein and San Marino, and using contemporary English short names such as Czechia and Türkiye's neighbour set. Territories without independent ISO country codes are not included.