You can view all the flags here: http://hjnilsson.github.io/country-flags/
This repository contains renders of all the worlds flags in SVG and PNG format.
The source files were taken from Wikipedia and are not under copyright protection since flags are effectively in public domain (there may be other restrictions on how the flag can be used though).
The flags are named by their 2-letter ISO-3166 country code, except for the constituent countries of Great Britain which have 6-letter codes "GB-ENG" etc).
Kosovo uses the user-assigned country code XK
, which is not part of the ISO standard, but in use by several multinational organizations.
Also included is a JSON file that maps the ISO country code to the name of the country.
You can also install this as a NPM module:
npm install --save svg-country-flags
If you would like the flags in a different width than 100px, 250px or 1000px,
you can run the node script 'build-pngs', you must first install the modules svgexport
and imagemin-cli
:
npm install -g svgexport imagemin-cli
npm run build-pngs -- 1000:
Replace 1000:
with whatever width you want (note the :
), or type :200
to get
PNGs with a height of 200px.
If you cannot run the node script above, you can do the same steps manually.
Use a combination of svgexport
and imagemin-cli
from NPM to get that.
imagemin
is very important because svgexport
produces uncompressed PNGs which are several MB each.
Run the following commands in the svg/
directory to get PNGs of a desired width:
for file in *.svg; do svgexport $file "`basename $file svg`png" pad 1000: ; done
imagemin *.png --out-dir=../compressed-pngs/
rm *.png
The resultant files will be in the compressed-pngs
folder. As before, 1000:
is the dimensions to export.
Images have been crossed against https://restcountries.eu/rest/v2/all to get a new collection of the flags named by its cioc (203 flags) The resulting files are in folders "png100px_by_cioc" and "png250px_by_cioc"
The countries that have been left with no cioc flag are:
name | topLevelDomain | alpha2Code | alpha3Code | callingCodes | capital | altSpellings | region | subregion | population | latlng | demonym | area | gini | timezones | borders | nativeName | numericCode | currencies | languages | translations | flag | regionalBlocs | cioc |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Åland Islands | .ax | AX | ALA | 358 | Mariehamn | AX,Aaland,Aland,Ahvenanmaa | Europe | Northern Europe | 28875 | 60.116667,19.9 | Ålandish | 1580 | UTC+02:00 | Åland | 248 | https://restcountries.eu/data/ala.svg | |||||||
Anguilla | .ai | AI | AIA | 1264 | The Valley | AI | Americas | Caribbean | 13452 | 18.25,-63.16666666 | Anguillian | 91 | UTC-04:00 | Anguilla | 660 | https://restcountries.eu/data/aia.svg | |||||||
Antarctica | .aq | AQ | ATA | 672 | Polar | 1000 | -74.65,4.48 | 14000000 | UTC-03:00,UTC+03:00,UTC+05:00,UTC+06:00,UTC+07:00,UTC+08:00,UTC+10:00,UTC+12:00 | Antarctica | 010 | , | , | https://restcountries.eu/data/ata.svg | |||||||||
Bonaire, Sint Eustatius and Saba | .an,.nl | BQ | BES | 5997 | Kralendijk | BQ,Boneiru | Americas | Caribbean | 17408 | 12.15,-68.266667 | Dutch | 294 | UTC-04:00 | Bonaire | 535 | https://restcountries.eu/data/bes.svg | |||||||
Bouvet Island | .bv | BV | BVT | BV,Bouvetøya,Bouvet-øya | 0 | -54.43333333,3.4 | 49 | UTC+01:00 | Bouvetøya | 074 | ,, | https://restcountries.eu/data/bvt.svg | |||||||||||
British Indian Ocean Territory | .io | IO | IOT | 246 | Diego Garcia | IO | Africa | Eastern Africa | 3000 | -6,71.5 | Indian | 60 | UTC+06:00 | British Indian Ocean Territory | 086 | https://restcountries.eu/data/iot.svg | |||||||
United States Minor Outlying Islands | .us | UM | UMI | UM | Americas | Northern America | 300 | American | UTC-11:00,UTC-10:00,UTC+12:00 | United States Minor Outlying Islands | 581 | https://restcountries.eu/data/umi.svg | |||||||||||
Christmas Island | .cx | CX | CXR | 61 | Flying Fish Cove | CX,Territory of Christmas Island | Oceania | Australia and New Zealand | 2072 | -10.5,105.66666666 | Christmas Island | 135 | UTC+07:00 | Christmas Island | 162 | https://restcountries.eu/data/cxr.svg | |||||||
Cocos (Keeling) Islands | .cc | CC | CCK | 61 | West Island | CC,Territory of the Cocos (Keeling) Islands,Keeling Islands | Oceania | Australia and New Zealand | 550 | -12.5,96.83333333 | Cocos Islander | 14 | UTC+06:30 | Cocos (Keeling) Islands | 166 | https://restcountries.eu/data/cck.svg | |||||||
Curaçao | .cw | CW | CUW | 599 | Willemstad | CW,Curacao,Kòrsou,Country of Curaçao,Land Curaçao,Pais Kòrsou | Americas | Caribbean | 154843 | 12.116667,-68.933333 | Dutch | 444 | UTC-04:00 | Curaçao | 531 | ,, | https://restcountries.eu/data/cuw.svg | ||||||
Falkland Islands (Malvinas) | .fk | FK | FLK | 500 | Stanley | FK,Islas Malvinas | Americas | South America | 2563 | -51.75,-59 | Falkland Islander | 12173 | UTC-04:00 | Falkland Islands | 238 | https://restcountries.eu/data/flk.svg | |||||||
Faroe Islands | .fo | FO | FRO | 298 | Tórshavn | FO,Føroyar,Færøerne | Europe | Northern Europe | 49376 | 62,-7 | Faroese | 1393 | UTC+00:00 | Føroyar | 234 | , | https://restcountries.eu/data/fro.svg | ||||||
French Guiana | .gf | GF | GUF | 594 | Cayenne | GF,Guiana,Guyane | Americas | South America | 254541 | 4,-53 | UTC-03:00 | BRA,SUR | Guyane française | 254 | https://restcountries.eu/data/guf.svg | , | |||||||
French Polynesia | .pf | PF | PYF | 689 | Papeetē | PF,Polynésie française,French Polynesia,Pōrīnetia Farāni | Oceania | Polynesia | 271800 | -15,-140 | French Polynesian | 4167 | UTC-10:00,UTC-09:30,UTC-09:00 | Polynésie française | 258 | https://restcountries.eu/data/pyf.svg | |||||||
French Southern Territories | .tf | TF | ATF | Port-aux-Français | TF | Africa | Southern Africa | 140 | -49.25,69.167 | French | 7747 | UTC+05:00 | Territoire des Terres australes et antarctiques françaises | 260 | https://restcountries.eu/data/atf.svg | ||||||||
Gibraltar | .gi | GI | GIB | 350 | Gibraltar | GI | Europe | Southern Europe | 33140 | 36.13333333,-5.35 | Gibraltar | 6 | UTC+01:00 | ESP | Gibraltar | 292 | https://restcountries.eu/data/gib.svg | ||||||
Greenland | .gl | GL | GRL | 299 | Nuuk | GL,Grønland | Americas | Northern America | 55847 | 72,-40 | Greenlandic | 2166086 | UTC-04:00,UTC-03:00,UTC-01:00,UTC+00:00 | Kalaallit Nunaat | 304 | https://restcountries.eu/data/grl.svg | |||||||
Guadeloupe | .gp | GP | GLP | 590 | Basse-Terre | GP,Gwadloup | Americas | Caribbean | 400132 | 16.25,-61.583333 | Guadeloupian | UTC-04:00 | Guadeloupe | 312 | https://restcountries.eu/data/glp.svg | ||||||||
Guernsey | .gg | GG | GGY | 44 | St. Peter Port | GG,Bailiwick of Guernsey,Bailliage de Guernesey | Europe | Northern Europe | 62999 | 49.46666666,-2.58333333 | Channel Islander | 78 | UTC+00:00 | Guernsey | 831 | , | , | https://restcountries.eu/data/ggy.svg | |||||
Heard Island and McDonald Islands | .hm,.aq | HM | HMD | HM | 0 | -53.1,72.51666666 | Heard and McDonald Islander | 412 | UTC+05:00 | Heard Island and McDonald Islands | 334 | https://restcountries.eu/data/hmd.svg | |||||||||||
Holy See | .va | VA | VAT | 379 | Rome | Sancta Sedes,Vatican,The Vatican | Europe | Southern Europe | 451 | 41.9,12.45 | 0.44 | UTC+01:00 | ITA | Sancta Sedes | 336 | ,,, | https://restcountries.eu/data/vat.svg | ||||||
Isle of Man | .im | IM | IMN | 44 | Douglas | IM,Ellan Vannin,Mann,Mannin | Europe | Northern Europe | 84497 | 54.25,-4.5 | Manx | 572 | UTC+00:00 | Isle of Man | 833 | , | , | https://restcountries.eu/data/imn.svg | |||||
Jersey | .je | JE | JEY | 44 | Saint Helier | JE,Bailiwick of Jersey,Bailliage de Jersey,Bailliage dé Jèrri | Europe | Northern Europe | 100800 | 49.25,-2.16666666 | Channel Islander | 116 | UTC+01:00 | Jersey | 832 | , | , | https://restcountries.eu/data/jey.svg | |||||
Macao | .mo | MO | MAC | 853 | MO,澳门,Macao Special Administrative Region of the People's Republic of China,中華人民共和國澳門特別行政區,Região Administrativa Especial de Macau da República Popular da China | Asia | Eastern Asia | 649100 | 22.16666666,113.55 | Chinese | 30 | UTC+08:00 | CHN | 澳門 | 446 | , | https://restcountries.eu/data/mac.svg | ||||||
Martinique | .mq | MQ | MTQ | 596 | Fort-de-France | MQ | Americas | Caribbean | 378243 | 14.666667,-61 | French | UTC-04:00 | Martinique | 474 | https://restcountries.eu/data/mtq.svg | ||||||||
Mayotte | .yt | YT | MYT | 262 | Mamoudzou | YT,Department of Mayotte,Département de Mayotte | Africa | Eastern Africa | 226915 | -12.83333333,45.16666666 | French | UTC+03:00 | Mayotte | 175 | https://restcountries.eu/data/myt.svg | ||||||||
Montserrat | .ms | MS | MSR | 1664 | Plymouth | MS | Americas | Caribbean | 4922 | 16.75,-62.2 | Montserratian | 102 | UTC-04:00 | Montserrat | 500 | https://restcountries.eu/data/msr.svg | |||||||
New Caledonia | .nc | NC | NCL | 687 | Nouméa | NC | Oceania | Melanesia | 268767 | -21.5,165.5 | New Caledonian | 18575 | UTC+11:00 | Nouvelle-Calédonie | 540 | https://restcountries.eu/data/ncl.svg | |||||||
Niue | .nu | NU | NIU | 683 | Alofi | NU | Oceania | Polynesia | 1470 | -19.03333333,-169.86666666 | Niuean | 260 | UTC-11:00 | Niuē | 570 | , | https://restcountries.eu/data/niu.svg | ||||||
Norfolk Island | .nf | NF | NFK | 672 | Kingston | NF,Territory of Norfolk Island,Teratri of Norf'k Ailen | Oceania | Australia and New Zealand | 2302 | -29.03333333,167.95 | Norfolk Islander | 36 | UTC+11:30 | Norfolk Island | 574 | https://restcountries.eu/data/nfk.svg | |||||||
Northern Mariana Islands | .mp | MP | MNP | 1670 | Saipan | MP,Commonwealth of the Northern Mariana Islands,Sankattan Siha Na Islas Mariånas | Oceania | Micronesia | 56940 | 15.2,145.75 | American | 464 | UTC+10:00 | Northern Mariana Islands | 580 | , | https://restcountries.eu/data/mnp.svg | ||||||
Pitcairn | .pn | PN | PCN | 64 | Adamstown | PN,Pitcairn Henderson Ducie and Oeno Islands | Oceania | Polynesia | 56 | -25.06666666,-130.1 | Pitcairn Islander | 47 | UTC-08:00 | Pitcairn Islands | 612 | , | https://restcountries.eu/data/pcn.svg | ||||||
Republic of Kosovo | XK | KOS | 383 | Pristina | XK,Република Косово | Europe | Eastern Europe | 1733842 | 42.666667,21.166667 | Kosovar | 10908 | UTC+01:00 | ALB,MKD,MNE,SRB | Republika e Kosovës | , | https://restcountries.eu/data/kos.svg | |||||||
Réunion | .re | RE | REU | 262 | Saint-Denis | RE,Reunion | Africa | Eastern Africa | 840974 | -21.15,55.5 | French | UTC+04:00 | La Réunion | 638 | https://restcountries.eu/data/reu.svg | ||||||||
Saint Barthélemy | .bl | BL | BLM | 590 | Gustavia | BL,St. Barthelemy,Collectivity of Saint Barthélemy,Collectivité de Saint-Barthélemy | Americas | Caribbean | 9417 | 18.5,-63.41666666 | Saint Barthélemy Islander | 21 | UTC-04:00 | Saint-Barthélemy | 652 | https://restcountries.eu/data/blm.svg | |||||||
Saint Helena, Ascension and Tristan da Cunha | .sh | SH | SHN | 290 | Jamestown | SH | Africa | Western Africa | 4255 | -15.95,-5.7 | Saint Helenian | UTC+00:00 | Saint Helena | 654 | https://restcountries.eu/data/shn.svg | ||||||||
Saint Martin (French part) | .mf,.fr,.gp | MF | MAF | 590 | Marigot | MF,Collectivity of Saint Martin,Collectivité de Saint-Martin | Americas | Caribbean | 36979 | 18.08333333,-63.95 | Saint Martin Islander | 53 | UTC-04:00 | SXM,NLD | Saint-Martin | 663 | ,, | https://restcountries.eu/data/maf.svg | |||||
Saint Pierre and Miquelon | .pm | PM | SPM | 508 | Saint-Pierre | PM,Collectivité territoriale de Saint-Pierre-et-Miquelon | Americas | Northern America | 6069 | 46.83333333,-56.33333333 | French | 242 | UTC-03:00 | Saint-Pierre-et-Miquelon | 666 | https://restcountries.eu/data/spm.svg | |||||||
Sint Maarten (Dutch part) | .sx | SX | SXM | 1721 | Philipsburg | SX | Americas | Caribbean | 38247 | 18.033333,-63.05 | Dutch | 34 | UTC-04:00 | MAF | Sint Maarten | 534 | , | https://restcountries.eu/data/sxm.svg | |||||
South Georgia and the South Sandwich Islands | .gs | GS | SGS | 500 | King Edward Point | GS,South Georgia and the South Sandwich Islands | Americas | South America | 30 | -54.5,-37 | South Georgia and the South Sandwich Islander | UTC-02:00 | South Georgia | 239 | , | https://restcountries.eu/data/sgs.svg | |||||||
South Sudan | .ss | SS | SSD | 211 | Juba | SS | Africa | Middle Africa | 12131000 | 7,30 | South Sudanese | 619745 | 45.5 | UTC+03:00 | CAF,COD,ETH,KEN,SDN,UGA | South Sudan | 728 | https://restcountries.eu/data/ssd.svg | |||||
Svalbard and Jan Mayen | .sj | SJ | SJM | 4779 | Longyearbyen | SJ,Svalbard and Jan Mayen Islands | Europe | Northern Europe | 2562 | 78,20 | Norwegian | UTC+01:00 | Svalbard og Jan Mayen | 744 | https://restcountries.eu/data/sjm.svg | ||||||||
Tokelau | .tk | TK | TKL | 690 | Fakaofo | TK | Oceania | Polynesia | 1411 | -9,-172 | Tokelauan | 12 | UTC+13:00 | Tokelau | 772 | https://restcountries.eu/data/tkl.svg | |||||||
Turks and Caicos Islands | .tc | TC | TCA | 1649 | Cockburn Town | TC | Americas | Caribbean | 31458 | 21.75,-71.58333333 | Turks and Caicos Islander | 948 | UTC-04:00 | Turks and Caicos Islands | 796 | https://restcountries.eu/data/tca.svg | |||||||
Wallis and Futuna | .wf | WF | WLF | 681 | Mata-Utu | WF,Territory of the Wallis and Futuna Islands,Territoire des îles Wallis et Futuna | Oceania | Polynesia | 11750 | -13.3,-176.2 | Wallis and Futuna Islander | 142 | UTC+12:00 | Wallis et Futuna | 876 | https://restcountries.eu/data/wlf.svg | |||||||
Western Sahara | .eh | EH | ESH | 212 | El Aaiún | EH,Taneẓroft Tutrimt | Africa | Northern Africa | 510713 | 24.5,-13 | Sahrawi | 266000 | UTC+00:00 | DZA,MRT,MAR | الصحراء الغربية | 732 | , | https://restcountries.eu/data/esh.svg |