Flag CDN
Free CDN for country flags with one uniform aspect ratio — every flag the exact same size, perfect for grids and tables. Get perfectly circular flags, classic rectangles, and ready-made 3D, glass, and emboss styles in PNG or WebP, at any width.
United States of America
us · 48×36
https://toolsflare.com/images/flag-cdn/rect/original/us/48.pngWhat is Flag CDN?
Flag CDN is a free, hotlink-friendly image host for the flags of every country and territory — 249 in total. Each flag ships in PNG and WebP with a transparent background, in eight widths from 16px up to the full 1024px (circle is square, rectangle is 4:3), served from a global Cloudflare edge network with a one-year immutable cache so it loads fast anywhere in the world. There is no API key, no rate limit, and no sign-up: pick a flag, copy the URL, and drop it into your website, app, README, slide deck, or dashboard.
Every flag comes in two shapes — circle and rectangle — and several rendered styles (original, emboss, 3D, and glass), so you can match the look of your interface without editing images yourself.
Why Flag CDN?
Real-world flags come in wildly different proportions — Switzerland is square, Qatar and Nepal are unusually long, and most are 3:2 or 2:1. That makes them painful to lay out in a grid or list. Flag CDN solves this by re-rendering every flag onto a single consistent canvas, so you get predictable, aligned images everywhere.
Uniform aspect ratio
Every flag shares the same width and height — rectangles are all 4:3, circles all 1:1. No cropping, no jagged rows: drop them into a table or grid and they line up perfectly.
Perfectly circular flags
True round country flags with a transparent background — ideal for avatars, language pickers, badges, and chips. No CSS masking or clipping required.
Ready-to-use styles
Beyond the plain original, each flag ships in pre-rendered emboss, 3D, and glass looks — polished visuals you can use straight from the URL, with zero image editing.
PNG & WebP, every size
Pick PNG or WebP (≈30% smaller) at any of eight widths from 16px to 1024px. Each is a separate static file, edge-cached for a year — fast for visitors, free to serve.
URL format
Every image lives at a predictable, stable URL. You can build any link by hand if you know the shape, style, and country code:
- {shape} —
circleorrect. - {style} — the rendered look (see the table below). Available styles differ slightly between shapes.
- {code} — the lowercase ISO 3166-1 alpha-2 country code, e.g.
us,gb,kr. - {size} — width in px:
16,32,48,64,128,256,512, or1024(the largest). Every size is its own static file — no on-the-fly resizing — so it is edge-cached for a year. - {ext} —
pngorwebp. WebP is ~30% smaller at the same quality; PNG is the most universally supported.
Shapes & styles
| Shape | Styles | Best for |
|---|---|---|
| circle | original, emboss, glass_orb, liquid_glass, sphere_3d | Avatars, badges, pickers, chips, app icons |
| rect | original, emboss, liquid_glass, block_3d, wave_3d | Tables, language switchers, lists, banners |
Tip: use original when you want the flag to look exactly as designed, and the decorative styles (sphere_3d, liquid_glass, wave_3d) when the flag is a visual accent rather than official signage.
How to use it
Reference an image directly — no build step or download required. A few common ways:
HTML
CSS background
Markdown
The builder above lets you pick a country, shape, style, and size — from a tiny 16px icon up to the original 1024px source — then copy the URL (which points at the exact pre-rendered size), a ready-made<img>tag with matchingwidth/height, Markdown, or download the full-resolution PNG.
Country codes & coverage
File names use the lowercase two-letter ISO 3166-1 alpha-2 code — the same codes used in web forms, top-level domains, and most country dropdowns. The catalog covers all 249 officially assigned codes, including dependent territories such as Hong Kong (hk), Puerto Rico (pr), and the Åland Islands (ax). If you only know a country's name, use the search box in the tool — it matches on both name and code.
Need the codes themselves? See the Country Code & Dial Code List for ISO2, ISO3, and international dial codes side by side.