Country Flag Emoji from ISO Code
Convert a 2-letter ISO country code into its flag emoji.
Overview
The Country Flag Emoji generator converts any 2-letter ISO 3166-1 country code into its corresponding flag emoji. Type US and you get the United States flag; type JP and you get Japan's. The reverse direction is also supported: paste in a flag emoji and the tool decodes it back to the underlying country code and name.
Flag emoji are a clever trick of Unicode. Rather than reserving a code point for every country, the standard reuses a small alphabet of regional indicator symbols. When two of those symbols are placed side by side, conforming systems render them as the flag of the country whose ISO code those two letters spell. This means the same input that drives ISO data tables also drives the flag emoji you see in chat apps, spreadsheets and dashboards.
How it works
Each ASCII letter from A to Z maps to a regional indicator symbol in the range U+1F1E6 (A) through U+1F1FF (Z). To build a flag, the tool uppercases the 2-letter ISO code, adds 0x1F1A5 to each character's code point, and emits the resulting pair of code points as a single grapheme cluster. The pair US becomes U+1F1FA U+1F1F8, which renders as the United States flag on any system with flag emoji support.
Decoding is the inverse: each regional indicator character is converted back to a letter, the two letters concatenated, and the result matched against the ISO 3166-1 alpha-2 table to produce the official country name.
Examples
USencodes to the United States flag emoji.GBencodes to the Union Jack of the United Kingdom.- The flag emoji for Japan decodes to
JP- Japan. XK(Kosovo, a user-assigned code) renders asXKregional indicators on systems without a Kosovo flag glyph - exactly how the standard handles unrecognised codes.
FAQ
Why does my browser show "US" letters instead of a flag?
Most platforms render flag emoji from the regional indicator pair. Windows, by policy, displays the bare letters instead of a flag, while macOS, iOS, Android, and most messaging apps render the full flag. This is a font and platform choice, not a bug in the encoding.
Are subnational flags supported (England, Scotland, Wales)?
A few subnational flags exist in Unicode via the tag sequence mechanism (England gbeng, Scotland gbsct, Wales gbwls). Support is uneven and the tool focuses on the standard 2-letter ISO codes.
What about the European Union?
The EU uses the user-assigned code EU. Most platforms render it as the EU flag.
Why not just use an image?
Emoji flags inherit the user's system font, scale cleanly, and copy/paste through text-only channels. For uniform branding, an SVG is still the better choice.