# hampusborgos/country-flags

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/hampusborgos-country-flags).**

3,774 stars · 1,016 forks · JavaScript

## Links

- GitHub: https://github.com/hampusborgos/country-flags
- awesome-repositories: https://awesome-repositories.com/repository/hampusborgos-country-flags.md

## Description

This project is a library of national flag assets provided in SVG and PNG formats. These assets are indexed by standard two-letter ISO country codes to enable programmatic retrieval and mapping.

The library includes a set of scalable vector graphics based on official national laws and regulations, alongside pre-rendered raster exports in multiple widths. It utilizes a mapping system to link flags to their respective ISO country codes or relate those codes to country names.

The collection covers visual indicators for web localization and data visualization, providing a system for adding accurate national flag images to websites or applications using standard ISO codes.

## Tags

### User Interface & Experience

- [Country Flag Icons](https://awesome-repositories.com/f/user-interface-experience/country-flag-icons.md) — Provides a comprehensive collection of standardized national flag icons in SVG and PNG formats. ([source](https://hampusborgos.github.io/country-flags/))
- [Static Asset Distributions](https://awesome-repositories.com/f/user-interface-experience/static-asset-distributions.md) — Provides a predictable file structure for serving flag images and mapping files via direct URLs.

### Content Management & Publishing

- [ISO-Code-Based Indexing](https://awesome-repositories.com/f/content-management-publishing/category-organizations/extension-category-organization/file-based-indexings/iso-code-based-indexing.md) — Organizes flag assets using standard two-letter ISO country codes for constant-time retrieval.
- [Raster Image Exports](https://awesome-repositories.com/f/content-management-publishing/content-formats-exporting/export-formats/raster-image-exports.md) — Generates fixed-width PNG raster images from SVG vector sources to optimize client-side rendering.

### Data & Databases

- [Asset-to-Code Mappings](https://awesome-repositories.com/f/data-databases/asset-to-code-mappings.md) — Maps two-letter ISO country codes to corresponding national flag files for programmatic retrieval.
- [ISO Country Mappings](https://awesome-repositories.com/f/data-databases/iso-country-mappings.md) — Links country names and ISO codes to their corresponding official flag assets.

### Graphics & Multimedia

- [SVG Asset Libraries](https://awesome-repositories.com/f/graphics-multimedia/svg-asset-libraries.md) — Stores primary flag designs as scalable vector graphics to ensure lossless quality across all display sizes.
- [Vector Asset Packs](https://awesome-repositories.com/f/graphics-multimedia/vector-asset-packs.md) — Provides a set of scalable vector graphics representing world flags based on official national regulations.
- [Multi-Format Image Exports](https://awesome-repositories.com/f/graphics-multimedia/svg-image-exports/multi-format-image-exports.md) — Provides assets in both SVG vector and multiple PNG raster formats to meet different display requirements. ([source](https://cdn.jsdelivr.net/gh/hampusborgos/country-flags@main/README.md))

### Software Engineering & Architecture

- [Frontend UI Localization](https://awesome-repositories.com/f/software-engineering-architecture/internationalization-frameworks/frontend-ui-localization.md) — Provides visual country indicators to support region and language selection in web user interfaces.
