NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #1953 most downloaded on npm
A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript
Latest stable
1.13.17
Last release 9 days ago
19 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Most releases are documented
notes for 38 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
460 releases · first in 2016
Drag across the ruler to compare, or tap a release to open it.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Added PhoneNumber.getPossibleCountries() function. It returns a list of countries this phone number could possibly belong to. Can be used when parsing
PhoneNumber.getPossibleCountries() function. It returns a list of countries this phone number could possibly belong to. Can be used when parsing complete international phone numbers containing a "calling code" that is shared between several countries. If parsing such a phone number returns country: undefined then getPossibleCountries() function could be used to somehow speculate about what country could this phone number possibly belong to.Your coding agent can read these notes before it upgrades. Set up the MCP server →
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Migrated the library to use "ES Modules" export. This shouldn't break anyone's code and it makes it more modern since people asked about this feature.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Merged a pull request that changed the declaration of basic "string" types like E164Number, NationalNumber, Extension, etc.
E164Number, NationalNumber, Extension, etc.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Added a better called alias for metadata.full.json — metadata.max.json.
metadata.full.json — metadata.max.json.Nothing published for this version
Improved format selection in AsYouType formatter: previously it chose the first one before there were at least 3 national (significant) number digits,
AsYouType formatter: previously it chose the first one before there were at least 3 national (significant) number digits, now it starts filtering out formats right from the start of the national (significant) number.Nothing published for this version
Nothing published for this version
Nothing published for this version
Added a `setExt(ext: string)` function of a PhoneNumber class instance. It could be useful when formatting phone numbers stored as two separate fields
setExt(ext: string) function of a PhoneNumber class instance. It could be useful when formatting phone numbers stored as two separate fields: the phone number itself and the extension part.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Added TypeScript "typings" on the exported Metadata class. Also rewrote Metadata class API docs and the description of `leading_digits` metadata prope
Added TypeScript "typings" on the exported Metadata class. Also rewrote Metadata class API docs and the description of leading_digits metadata property.
TypeScript Metadata exported type was renamed to MetadataJson so that the Metadata class type could be exported as Metadata.
Added validatePhoneNumberLength() function: same as isPossiblePhoneNumber() but tells the actual reason why a phone number is not possible: TOO_SHORT,
validatePhoneNumberLength() function: same as isPossiblePhoneNumber() but tells the actual reason why a phone number is not possible: TOO_SHORT, TOO_LONG, INVALID_LENGTH, etc.validatePhoneNumberLength('abcde') === 'NOT_A_NUMBER'
validatePhoneNumberLength('444 1 44') === 'INVALID_COUNTRY'
validatePhoneNumberLength('444 1 44', 'TR') === 'TOO_SHORT'
validatePhoneNumberLength('444 1 444', 'TR') === undefined
validatePhoneNumberLength('444 1 4444', 'TR') === 'INVALID_LENGTH'
validatePhoneNumberLength('444 1 44444', 'TR') === 'INVALID_LENGTH'
validatePhoneNumberLength('444 1 444444', 'TR') === undefined
validatePhoneNumberLength('444 1 4444444444', 'TR') === 'TOO_LONG'
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Changed formatting numbers in IDD format to always use the preferred IDD prefix (if defined), not just in cases when a country has multiple IDD prefix
IDD format to always use the preferred IDD prefix (if defined), not just in cases when a country has multiple IDD prefixes. This means that it will output 8~10 as the prefix instead of 810 for some regions (like Uzbekistan) that have this tilde in their IDD prefix (the tilde designates that the user should wait before continuing to dial).Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.