TypeScriptZero DependenciesTree-ShakeableISO 3166

Countries (ISO 3166)
for JavaScript

249 countries. 5,000+ subdivisions. Postal codes, currencies, dial codes, geography, and EU/SEPA membership โ€” in one tree-shakeable package.

249 Countries5,000+ Subdivisions150+ Postal Codes8KB Min BundleยทUpdated March 2026

Everything You Need

One package replaces half a dozen country data libraries.

249 Countries

Full ISO 3166-1 with alpha-2, alpha-3, and numeric codes.

5,000+ Subdivisions

ISO 3166-2 states, provinces, regions, and territories.

Postal Codes

Validate ZIP codes, postcodes, PIN codes for 150+ countries.

Memberships

EU, SEPA, EEA, Eurozone, and Schengen membership checks.

Tree-Shakeable

Import only what you need โ€” from 60KB down to 8KB.

TypeScript First

Full type definitions. Zero runtime dependencies for core.

Quick Start

Install and start querying country data in seconds.

$ npm install @koshmoney/countries
import { country } from '@koshmoney/countries';

const us = country.getCountry('US');
// { alpha2: 'US', alpha3: 'USA', numeric: '840',
//   name: 'United States of America', ... }

const all = country.getAllCountries();
// 249 countries

Import Only What You Need

Specialized modules are separate subpath exports โ€” they never bloat your main bundle.

Currency@koshmoney/countries/currency
import { currency } from '@koshmoney/countries/currency';
currency.getCurrency('US');
// { code: 'USD', name: 'US Dollar', symbol: '$' }
Dial Codes@koshmoney/countries/dialCode
import { dialCode } from '@koshmoney/countries/dialCode';
dialCode.getDialCodes('US');
// ['+1']
Geography@koshmoney/countries/geography
import { geography } from '@koshmoney/countries/geography';
geography.getContinent('JP');
// 'Asia'
Membership@koshmoney/countries/membership
import { membership } from '@koshmoney/countries/membership';
membership.isEU('DE');
// true

Before and After

Replace multiple packages with one unified API.

Before โ€” Multiple packages
// 3 packages, different APIs
import * as iso3166_1 from 'iso-3166-1';
import * as iso3166_2 from 'iso-3166-2';
import currencies from 'currency-codes';

// No TypeScript, no validation
const c = iso3166_1.whereAlpha2('US');
const s = iso3166_2.subdivision('US-CA');
After โ€” One package
// One package, unified API
import { country, subdivision }
  from '@koshmoney/countries';
import { currency }
  from '@koshmoney/countries/currency';

const c = country.getCountry('US');
const s = subdivision.get('US-CA');
const usd = currency.getCurrency('US');

How It Compares

Feature comparison with popular alternatives.

Feature@koshmoney/countriesi18n-iso-countriescountries-listcountry-state-city
Countries249249249249
Subdivisions5,000+โ€”โ€”5,000+
Postal Codes150+โ€”โ€”โ€”
CurrenciesPartial
TypeScriptBuilt-in@typesBuilt-inPartial
Tree-ShakingPer-country
Zero DepsCore
Last UpdatedMarch 2026202320242024

Start Building

Get ISO codes, subdivisions, currencies, and more โ€” in one package.

$ npm install @koshmoney/countries
Read the Docs