Code tool

Random Country Generator

Generate one random country locally from the complete embedded ISO 3166-1 alpha-2 reference.

In-browser processingNo account requiredPrivacy details ↗

Ready to generate a country.

A QUICK WALKTHROUGH

How to use this tool

  1. Select a random country.
  2. Review its localized name and ISO alpha-2 code.
  3. Generate again for another result.

Complete embedded reference

The generator reuses the bundled ISO 3166-1 alpha-2 country and territory list. It does not fetch a partial or remote list.

Fair local selection

When Web Crypto is available, rejection sampling avoids modulo bias. No result is uploaded or saved.

GOOD TO KNOW

Common questions

Does this include territories?

Yes. The ISO reference includes countries and territories.

Is the result cryptographically secure?

The selection uses browser Web Crypto when available and reports when a non-cryptographic fallback is used.