Add country flag icons to a dropdown or form that lets users select their country.
Display a flag next to a country name in a data table, dashboard, or map interface.
Build a language or region selector for a web app using flag images as visual indicators.
Export flags at a custom pixel width by running the included SVG export script.
Available via npm or as a ZIP download, pre-rendered PNGs at 100px, 250px, and 1000px are already included in the repo.
This repository is a collection of flag images for every country and territory in the world, provided in both SVG and PNG formats. SVG is a vector format that stays sharp at any size, while PNG is the familiar pixel-based image format used across most websites and apps. Having both means you can pick whichever fits your project. The flags are organized by a standard two-letter country code system (ISO 3166), so finding the right flag is as simple as knowing the code for the country you need. For example, the United States would be "US" and Germany would be "DE". A JSON file is included that maps each code to the country's full name, which is useful for building dropdowns, maps, or any interface that needs to display country names alongside their flags. Accuracy is a stated priority of this project. The maintainers try to match what each country's own laws and regulations describe the flag as looking like, rather than using approximate or stylized versions. The source files originally came from Wikimedia Commons, and the flags are in the public domain since national flags are not protected by copyright. Pre-rendered PNG versions are already included at three widths (100px, 250px, and 1000px), covering most common use cases without any extra steps. If you need a different size, the repository includes a script you can run to export the SVGs at any width you choose. You can install the package through the NPM registry, download the whole repository as a ZIP, or clone it directly from GitHub.
← hampusborgos on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.