Back to Trending
RepositoryJavaScriptBRBrazil
ChristoPy

ChristoPy/countries-phone-masks

Phone masks, ISO codes and flags

105stars
25forks
3issues
1views

Countries Phone Masks

Phone masks, ISO codes and flags for all countries

Inspiration

After the need to add international phone masks into an application, I stumbled upon many libraries but they seemed too outdated or just too complex to just give me the country code, country name, flag and phone mask. This list contains a hybrid of gists, libraries and wikipedia articles. Any issues, kindly, consider creating an issue or a pull request.

Installation

npm install countries-phone-masks

Import

const countries = require('countries-phone-masks')
// or 
import countries from 'countries-phone-masks'

Usage

console.log(countries.find(({ name }) => name === 'Brazil'))
// {
//   name: 'Brazil',
//   code: '+55',
//   iso: 'BR',
//   flag: 'https://cdn.kcak11.com/CountryFlags/countries/br.svg',
//   mask: [ '(##)####-####', '(##)#####-####' ]
// }

Similar Projects

Discover other similar projects and AI models.

RepositoryKotlin
ibrahimsn98/PhoneNumberKit

Android Kotlin library to parse and format international phone numbers. Country code picker.

170
Oct 6, 2023
RepositoryJavaScript
samayo/country-json

A simple data of the world by country each in JSON format.

1.2k
Sep 7, 2026
RepositoryJavaScript
ubaldop/vue-country-flag

Vue component for country flags

180
Mar 30, 2023
RepositoryJavaScript
South-Paw/react-vector-maps

🗺 A React component for interactive vector maps of the world and 100+ countries

144
Aug 20, 2024
RepositoryJavaScript
kapowaz/square-flags

A collection of 400+ minimalist square SVG country, state and language flags

105
Jul 23, 2026
RepositoryJavaScript
yammadev/flag-icons

A beautiful svg + png + sass + css collection of 264 flags.

102
Oct 22, 2026
RepositoryGo
sundowndev/phoneinfoga

Information gathering framework for phone numbers

18.7k
Aug 25, 2026
RepositoryPython
dr5hn/countries-states-cities-database

🌍 Discover our global repository of countries, states, and cities! 🏙️ Get comprehensive data in JSON, SQL, PSQL, SQLSERVER, MONGODB, SQLITE, XML, YAML, and CSV formats. Access ISO2, ISO3 codes, country code, capital, native language, timezones (for countries), and more. #countries #states #cities

10.1k
Dec 1, 2026
RepositoryPython
AzizKpln/Gokboru_Intel

This tool gives information about the phone number that you entered.

2.2k
Sep 9, 2026