What is a country code?

A country code is a short code for a country or territory. These are the two-letter codes of the ISO 3166-1 standard, such as DE for Germany, JP for Japan and BR for Brazil. Address forms, shipping systems and language tags like en-GB use them, and most country web addresses end in the same letters. A random country code generator draws them for test data: country fields and dropdowns, shipping and tax rules, flag icons and spreadsheet columns. Teachers and quiz hosts use them for "which country is this?" rounds.

Tool description

The page opens on country codes, with a list made right away and one code per line. Type a number into Count or use its buttons, press Generate to draw again, then copy the list or download it as a text file.

The Language list has English, English (Canada), French (Canada), French (Switzerland) and German (Switzerland). It starts on the language of the page you're reading when the codes come in it, or on English otherwise. Only English mixes codes from all over the world: English (Canada) and French (Canada) give only CA, French (Switzerland) only CH, and German (Switzerland) only CH, DE and AT. Pick English for a worldwide list.

What the codes look like

  • Always two capital letters, without dots or spaces.
  • Territories have codes of their own, so places like the Cayman Islands (KY), Guam (GU), Réunion (RE) and Antarctica (AQ) turn up next to countries.
  • The United Kingdom is GB, even though its web addresses end in .uk.
  • Each code is drawn on its own, so a long list repeats some of them.

Features

  • Two-letter ISO 3166-1 country codes
  • Countries and territories from every continent
  • Lists as long as you need, made again with one click
  • Copy the list or download it as a text file
  • Runs in your browser: nothing you generate is sent anywhere