Home › Developer Tools › Country Codes List

Country Codes List

All 249 ISO 3166-1 countries and territories with their alpha-2, alpha-3 and numeric codes, international calling code, internet TLD and flag. Search by any name or code, convert a whole list of codes at once, and export exactly the rows and columns you need as CSV, JSON or SQL.

Last updated:

Flag

Click any code to copy it. marks an entry with a note (hover or tap the name).

Export these rows

Columns

Exports contain the rows currently shown, in the current sort order.

Bulk convert a list

Advertisement
Advertisement

How to use the Country Codes List

  1. Search by typing a country name, an ISO code such as DE or DEU, a numeric code like 276, a dialing code like +49 or a domain like .de.
  2. Filter by region or tick Countries only to hide dependent territories, and click a column header to sort.
  3. Copy any code by clicking it in the table or in the result card.
  4. Convert a list by pasting names or codes (one per line) into the bulk converter, choosing the output format and pressing Convert.
  5. Export the rows you see: pick the columns, then download CSV, JSON or SQL, or copy the JSON.

ISO 3166-1 alpha-2, alpha-3 and numeric codes explained

ISO 3166-1 is the international standard that gives every country and many dependent territories three interchangeable codes. It is maintained by the ISO 3166 Maintenance Agency, and the numeric codes are taken from the United Nations M49 statistical standard.

Code setExample (Japan)Where it is used
Alpha-2JPCountry-code domains (.jp), language tags (ja-JP), IBANs, postal and shipping systems, Stripe, Google and most web APIs
Alpha-3JPNPassports and ID cards (ICAO 9303), UN and World Bank statistics, sports scoreboards
Numeric392Statistics and banking systems that must work without Latin letters; ISO 4217 currency numbers often match (JPY is 392)

Store numeric codes as three-character text so the leading zeros survive (004 for Afghanistan). When a country changes its name the codes usually stay the same, as with Türkiye (TR), Eswatini (SZ), Czechia (CZ) and North Macedonia (MK); a new code is issued only when the country itself changes, as when South Sudan received SS in 2011.

Special cases developers trip over

CaseWhat to know
GB vs UKThe ISO code is GB / GBR. UK is only an "exceptionally reserved" code, but the internet domain is .uk.
Greece: GR vs ELISO uses GR; EU institutions use EL in VAT numbers and some statistics.
Kosovo: XKA user-assigned code (XK / XKX) widely accepted by the EU, IMF and payment networks, but not part of ISO 3166-1.
Shared calling codes+1 covers the United States, Canada and the Caribbean members of the North American Numbering Plan, each with its own area code; +7 is shared by Russia and Kazakhstan; +44 also covers Guernsey, Jersey and the Isle of Man.
Unused TLDs.bv, .sj, .bl, .mf and .bq are assigned but not used; .eh is not delegated and .um was retired in 2007.
Withdrawn codesOld data may contain AN (Netherlands Antilles), CS (Serbia and Montenegro), YU (Yugoslavia) or ZR (Zaire). They are no longer valid; map them to their successor codes.

About the regions and territories

Regions follow the UN M49 geographic regions (Africa, Americas, Asia, Europe, Oceania), with Antarctica shown on its own. That is why Cyprus appears under Asia and Greenland under the Americas. Entries tagged territory are dependent territories or special administrative areas such as Puerto Rico, Greenland and Hong Kong; tick Countries only to hide them, for example when building a country dropdown for a form.

Frequently asked questions

What is the difference between alpha-2, alpha-3 and numeric country codes?

All three come from the ISO 3166-1 standard. Alpha-2 codes (US, DE, JP) are two letters and are the most widely used, for example in domain names, locale tags and payment systems. Alpha-3 codes (USA, DEU, JPN) are easier to recognise and appear on passports and in sports and statistics. Numeric codes (840, 276, 392) come from the UN M49 standard and do not depend on the Latin alphabet.

Why is the United Kingdom GB but its domain .uk?

The ISO code for the United Kingdom is GB, but the .uk domain was created before ISO 3166 was adopted for the DNS and was kept. The .gb domain exists but is not used for new registrations. GB is the code to use in data, forms and APIs.

Is Kosovo's XK an official ISO code?

No. XK is a user-assigned code that the European Commission, the IMF, SWIFT and many other organisations use for Kosovo. It is not part of ISO 3166-1, has no numeric code and no country TLD, which is why it is marked separately in the list.

Which countries share the +1 calling code?

The North American Numbering Plan uses +1 for the United States, Canada and about 20 Caribbean and Pacific nations and territories. Each of those has its own three-digit area code, for example +1 876 for Jamaica or +1 671 for Guam. Russia and Kazakhstan likewise share +7.

Do the numeric codes keep their leading zeros?

Yes. ISO numeric codes are always three digits, so Afghanistan is 004 and Albania is 008. Store them as text, not numbers, to keep the zeros. The CSV and JSON exports keep them as strings.

How current is this list?

It follows the current ISO 3166-1 list, including recent changes such as Türkiye (TR) and the Netherlands' official name. Country names follow common English usage, with the ISO short name shown where it differs.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

HTTP Status CodesSearch every HTTP status code with plain-English meanings, causes, fixes and RFC references.MIME Type LookupFind the MIME type for any file extension, or the extensions for a MIME type, in 400+ entries.ASCII TableFull ASCII code chart 0–255 in decimal, hex, octal, binary and HTML, with search and copy.Random Country GeneratorPick random countries with flags, capitals, population and area.Name All Countries QuizType as many of the world's 197 countries as you can in 15 minutes while the map fills in.Phone Number FormatterFormat and validate lists of phone numbers to E.164, international or national style.Public Holidays by CountryList the public holidays of 100+ countries for any year, with weekdays and an ICS calendar file.Online Python CompilerRun Python 3 in your browser with input(), numpy, pandas, charts and share links.JSON EditorEdit JSON in a tree and as code side by side: add, rename, drag, change types, undo and download.Unzip FilesOpen and extract ZIP files online.RAR & 7z ExtractorOpen RAR, 7z and other archives online and extract files.Regex TesterTest and debug regular expressions live.File Info ViewerCheck file size, type, date and MD5/SHA hashes.SQLite ViewerOpen .db and .sqlite files in your browser, browse tables and run SQL queries.DOCX ViewerOpen and read Word .docx files in your browser, then print or save them as HTML.EPUB ReaderOpen and read EPUB e-books in your browser with pages, a table of contents and font controls.What Is My BrowserSee your browser, version, OS, engine, screen and which web features it supports.Font ViewerPreview TTF, OTF, WOFF and WOFF2 fonts with sample text, waterfall, glyphs and metadata.Markdown EditorWrite Markdown with a toolbar, live split preview, autosave and .md or HTML export.Regex Cheat Sheet75+ ready-to-use regex patterns for emails, URLs, IPs and dates, each with a live test box.JavaScript Keycode FinderPress any key to see its JavaScript key, code, keyCode, which, location and modifiers.QR Code ScannerScan QR codes with your camera or from an image and safely read the link or text.RAID CalculatorUsable capacity, efficiency and fault tolerance for RAID 0, 1, 5, 6, 10, 50 and 60 arrays.JSONPath TesterTest JSONPath expressions live: filters, slices, wildcards and recursive search, with matches highlighted.Mermaid Diagram EditorWrite Mermaid code and see flowcharts, sequence, Gantt and ER diagrams live. Export SVG or PNG.CSS Selector TesterTest CSS selectors on your HTML: highlighted matches, match count and specificity.Git Cheat SheetSearchable Git command reference by task, with copy buttons and an undo/rename/fix wizard.HAR File ViewerOpen a .har file to see a waterfall timeline, headers, bodies, timings and size totals.jq PlaygroundRun jq filters on JSON in your browser with live output, flags and an example library.Markdown Cheat SheetInteractive Markdown syntax reference: edit every example and see the live rendered preview.Regex ExplainerPaste a regular expression and get a plain-English breakdown, railroad diagram and flag notes.XPath TesterTest XPath expressions on XML or HTML: highlighted matches, node paths, values and examples.EML File ViewerOpen .eml email files to read the message, headers and raw source and save attachments.Graphviz Online ViewerWrite Graphviz DOT code and render graphs live; switch layout engines, export SVG or PNG.JavaScript Online CompilerWrite and run JavaScript in your browser with a console, timing, error lines and share links.Jupyter Notebook ViewerOpen .ipynb files and read code, Markdown, math, tables, plots and errors without Python.LaTeX Table GeneratorEdit a table like a spreadsheet or paste from Excel and get LaTeX tabular or booktabs code.Log File ViewerOpen huge log files with level colors, regex and time filters, JSON pretty-print and tail -f.Logic Gate SimulatorBuild logic circuits with AND, OR, NOT, XOR gates and flip-flops; see live outputs and truth tables.MSG File ViewerOpen Outlook .msg emails in your browser: sender, recipients, body, headers and attachments.Online Code EditorVS Code-style editor in your browser: tabs, 50+ languages, find/replace, autosave.Online Hex EditorOpen any file as hex and ASCII, edit bytes, search, inspect values and save the result.PHP Online CompilerRun PHP 8 code in your browser with output, HTML preview, error lines and share links.PlantUML EditorWrite PlantUML and see sequence, class, activity and more diagrams live. Export SVG or PNG.Sorting Algorithm VisualizerWatch bubble, insertion, merge, quick, heap and radix sort step by step with live counters.Lottie ViewerOpen Lottie JSON or .lottie files to play, pause, scrub frames, change speed and see details.Diff ViewerPaste a git diff or .patch file and view it side by side or inline, with file navigation.EditorConfig GeneratorBuild an .editorconfig with indent, charset, line endings and trim rules per file pattern.Folder Compare ToolCompare two folders by file list, size and SHA-256 hash, then open a text diff of changed files.Glob Pattern TesterTest glob patterns like **/*.js, {a,b} and !exclusions against a list of file paths.JMESPath TesterEvaluate JMESPath expressions against JSON live, the query language used by the AWS CLI.MongoDB Query TesterTest MongoDB find filters, projections and aggregation pipelines on sample JSON documents.Semantic Version CalculatorBump, compare, sort and test SemVer versions against npm ^, ~ and x ranges.XSLT TesterRun an XSLT 1.0 stylesheet on XML in your browser and see the output as HTML, XML or text.ASCII Diagram EditorDraw boxes, arrows and text on a character grid and copy plain-text diagrams for code and READMEs.DBF File ViewerOpen dBase .dbf files and shapefile tables, search and sort records, export CSV or XLSX.MBOX File ViewerOpen .mbox mail archives: list and search messages, read them, save attachments, export EML.MDB File ViewerOpen Access .mdb and .accdb databases in your browser: list tables, view rows, export CSV.Shapefile ViewerView zipped shapefiles on a map with the attribute table, then export to GeoJSON or CSV.
See all 53 Code Playgrounds & Testers →