Free Country Flag Images for Developers and Designers
Building a language selector, a shipping destination picker, a visitor stats dashboard, or a country comparison table? You need flag icons that look sharp at every size and work across every device. GeoPlugin’s flag library covers 250+ countries and territories with images available in SVG (infinitely scalable) and PNG at standard web resolutions. All flags are free for both personal and commercial use.
Usage: Country flags are provided free of charge in multiple formats (PNG, SVG, WebP) and sizes. Select your preferred format and size, then click "Download Flag" to get the file. For production use, you can integrate our Geo Location service to automatically display flags based on user location.
Available Formats and Sizes
Every flag is named with its ISO 3166-1 alpha-2 country code — us.svg, de.png — so filenames map directly to standard country code fields in any geolocation API or database. SVG files are included for resolution-independent rendering at any size, from 16px inline icons to full-width banners. PNG files come in pre-rendered sizes for common UI patterns: small for dropdown menus, medium for selection grids, larger for feature sections or print. All SVGs are cleaned of editor metadata and compress well with gzip.
Problems These Flags Solve
Consistent Rendering Across Your Entire UI
Emoji flags render differently on every operating system. Icon packs from mixed sources produce mismatched dimensions, inconsistent aspect ratios, and occasionally outdated designs. GeoPlugin's flag set uses a unified visual standard — consistent proportions, accurate colors, and clean rendering from 16px favicons to high-DPI mobile screens. SVGs handle Retina and high-DPI displays natively; for PNG workflows, use 2x or 3x assets and let the browser downscale on standard displays.
Licensing Uncertainty
Flags are sovereign symbols and are not copyrightable in most jurisdictions. However, many flag image sets online are bundled with restrictive licenses attached to the artwork or vector tracing. GeoPlugin's flag files carry no attribution requirement. Use them in client projects, SaaS dashboards, mobile apps, or printed materials without licensing concerns.
Integration Tips
CSS sizing with SVGs
Set width and height via a utility class rather than inline attributes. This keeps flag dimensions consistent across components and makes responsive adjustments easier:
.flag-icon { width: 24px; height: auto; }
Performance with many flags
Pages that display dozens of flags at once (country directories, shipping selectors) benefit from an SVG sprite sheet or lazy-loaded PNGs. A sprite sheet avoids per-flag HTTP requests; lazy loading defers offscreen flags until the user scrolls.
CDN caching
Flags rarely change. Set long cache headers and use the country code in the filename as a natural cache key:
Cache-Control: max-age=31536000, immutable
Dynamic loading from GeoPlugin's API
When the API returns a country_code, construct the flag path directly:
const flagUrl = `/flags/${countryCode.toLowerCase()}.svg`;
No lookup table, no mapping file — the naming convention handles it.
FAQ
${countryCode.toLowerCase()}.svg
For frameworks that don't support direct SVG imports, use an <img> tag with the constructed path.
Need More Features?
Use our GeoPlugin services to automatically display location-based content, flags, and personalized experiences for your visitors.