Skip to content
Agents tracked: 492 Releases (7d): 545 Agent status: 1 with issuesSince last limit reset: Claude 9d · Codex 7d For AI agents: Markdown Updated Nov 20, 2026

Country Flag Emoji

by Risan Bagja Pradana

JavaScript library listing country codes with their flag emojis, Unicode sequences and country names.

Emoji Code libraryOpen source

GitHub repo
A country menu filtered by "uni", a list of orders per country with names from get(), and the first 90 of the 258 entries by code, flags drawn with the Noto Color Emoji font.
Made by AgentGid with country-flag-emoji 1.0.3 (npm, sha512 checked); flags drawn with NotoColorEmoji.ttf from googlefonts/noto-emoji tag v2020-09-16-unicode13_1. country-flag-emoji is MIT; the flag pictures come from Google's Noto Color Emoji font (SIL Open Font License 1.1), not from Apple or another platform; the order numbers are made up.

2. Commercial use: LICENSE on GitHub

“to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software”

The MIT License allows use and selling in paid products.

LICENSE on GitHub

License checked Nov 11, 2026 against 1 official page. Tap a verdict to see its source. How we checked Report an error

Country Flag Emoji: flags and names for every country code

Country Flag Emoji is a small free code library with a list of countries and regions. For each two-letter code like DE or JP it gives the name and the flag emoji. The flags are text characters, so the visitor's own emoji font draws them.

Where you can use it

Flag next to a country code

Your database stores a two-letter code such as FR for each order or user. One call turns it into the country name and its flag for a table or a profile.

Country list for a form

Country list for a form

Fill the country menu of a sign-up, shipping or billing form with every name and flag from one list. Typing a few letters can narrow it down.

Flags on a page without a build step

A plain HTML page, like a landing page or an old site, can load the library with one script tag and use the same list.

Sales or visitors by country Idea

Put a flag in front of each country in a small report, such as orders per country, so people find their row at a glance.

Region switcher in the header Idea

Show the flag of the chosen country in a shop's region or currency menu, next to its name, not instead of it.

Country Flag Emoji popularity

20 / 100
Gid Score, same scale as developer tools
40
GitHub stars
11.3K
npm downloads, last 7 days
+18.2% in 4 weeks

Downloads not confirmed by community. 40 GitHub stars for 11.3K downloads a week. Bots and CI installs can inflate npm counts.

Country Flag Emoji: downloads per weeknpm, country-flag-emoji 10,434

GitHub stars stayed at 40 since Nov 12, 2026, so there is no stars chart.

Downloads from api.npmjs.org, stars from GitHub, checked Nov 19, 2026. How the Gid Score is calculated

How to start

Tell your AI assistant

“Add country-flag-emoji 1.0.3 and build a country menu for the checkout form from countryFlagEmoji.list, sorted by name, showing the flag and the name and saving the two-letter code; handle an unknown code (get() returns undefined).”

Show codeStep 1 or Step 2

Add the package to your project.

$ npm install country-flag-emoji

Mistakes to avoid

countryFlagEmoji.get(code).name with a code from user input
const c = countryFlagEmoji.get(code); if (!c) show "Unknown country"

get() returns undefined for a code that is not in the list, so reading .name throws.

<script src="https://unpkg.com/country-flag-emoji@latest/dist/country-flag-emoji.umd.js">
Pin the version (country-flag-emoji@1.0.3) or install the package

The docs show @latest; a pinned version cannot change under your page.

Treat every entry of countryFlagEmoji.list as a country in a shipping form
Filter the list against the countries you really ship to

In our demo the 258 entries include EU (European Union), UN (United Nations) and small territories such as AC and TA.

Use the flag emoji alone as the label of a menu item
Show the country name next to the flag and keep the name as the accessible text

The flag is only an emoji character; its look depends on the device font and screen readers read it differently.

License

MIT License. Free for personal and paid products under the MIT License, with no visible credit needed. Keep the short copyright and permission notice with copies of the code.

Commercial use
Yes

“to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software” LICENSE on GitHub

Credit
Not needed

“The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.” LICENSE on GitHub

Inside your app or game
Can ship inside your app

“Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files” LICENSE on GitHub

Pass the files on to your users
With conditions

Passing the files on is allowed with the MIT notice kept.

“The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.” LICENSE on GitHub

AI training
Not stated
Bots and bulk downloads
Not stated

AllowedWith conditionsNot allowedNot stated or not checked yet

Is Country Flag Emoji free for commercial use? The full answer Not legal advice. Check the license page before you ship.

For your agent

License rules tell your agent what it may do with Country Flag Emoji. Paste them into your prompt or AGENTS.md.

License rules
- Country Flag Emoji (Emoji). JavaScript library listing country codes with their flag emojis, Unicode sequences and country names. Price: free; commercial use OK; no credit needed.
  Connect: npm country-flag-emoji.
  Rule: Keep the MIT license and copyright notice with any copies or substantial portions you distribute.
  Rule: Install via npm (country-flag-emoji) or the unpkg CDN rather than copying data by hand.
  Rule: Look up flags by ISO 3166-1 alpha-2 country code with get().
  License: https://github.com/risan/country-flag-emoji/blob/HEAD/LICENSE (checked 2026-11-11; details: https://agentgid.com/assets/country-flag-emoji/)
Can an agent use it by itself?
Yes.

Agent installs a package or loads it from a CDN.

Install
npm install country-flag-emoji
API, key or account
Not needed. Everything runs on your side.
MCP server
None found
Credit line, if you want one
Country data: country-flag-emoji, MIT License
This card for machines

Alternatives

Country Flag Emoji This page

Free Commercial OK npm

Emojibase

Pick Emojibase when you need emoji and flag names in several languages, not only English.

Free Commercial OK npm

Emoji Mart

Pick Emoji Mart when people should choose any emoji from a ready picker, not only flags.

Free Commercial OK npm

Twemoji

Pick Twemoji when emoji, flags included, must look the same as pictures on every device.

Free Commercial OK npm

emojilib

Keyword library that makes emoji searchable, mapping each emoji character to a list of keywords.

Free Commercial OK npm

Emoji Datasource

Emoji data in JSON plus spritesheet images from Apple, Google, Twitter and Facebook sets, distributed on GitHub and npm.

Free With conditions npm

All emoji

Questions

Can I use it in a paid app?

Yes. The MIT License allows use, copying and selling; keep the copyright and permission notice with copies of the code.

Which codes does it use?

Two-letter codes in the ISO 3166-1 alpha-2 format, such as US or ID.

What does one entry contain?

Four fields, code, unicode (the character sequence), name and emoji.

Is it still updated?

The newest version on the package registry is 1.0.3, published in October 2019.