You should always take a look at the documention

parsePhoneNumber returns …an instance of PhoneNumber class, or undefined if no phone number could be parsed…. And you can't expect that JSON.stringify(phoneNumber) will result in something that just contains a phone number.

And isPossiblePhoneNumber expects a string as parameter that is a valid phone number; the documentation states there:

This function is just a shortcut for a two-step process of "strictly" parsing a phone number and then calling .isPossible().

So what you want to do is either:

const contact_asset = "2022032034"
const phoneNumber = libphonenumber.parsePhoneNumber(contact_asset, 'US')

if (phoneNumber) {
  console.log(phoneNumber.isPossible());
}

Or

const contact_asset = "2022032034"
console.log(libphonenumber.isPossiblePhoneNumber(contact_asset, 'US'));
Answer from t.niese on Stack Overflow
🌐
npm
npmjs.com › package › libphonenumber-js
libphonenumber-js - npm
1 week ago - A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript. Latest version: 1.12.41, last published: 5 days ago. Start using libphonenumber-js in your project by running `npm i libphonenumber-js`. There are 3934 ...
      » npm install libphonenumber-js
    
Published   Mar 28, 2026
Version   1.12.41
Author   catamphetamine
🌐
Snyk
security.snyk.io › snyk vulnerability database › npm
libphonenumber-js vulnerabilities | Snyk
A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript
Discussions

libphonenumber-js evaluates good phone number as false
I'm stumped. I've messed around with this for a while and it doesn't make sense. libphonenumber-js does not validate a phone number that should be a valid number. It returns 'false' every time. This More on stackoverflow.com
🌐 stackoverflow.com
Phone number formatting (libphonenumber) for Enhanced conversions GAs
Yes, you can transform it with a custom javascript variable More on reddit.com
🌐 r/PPC
4
0
November 24, 2025
What happened to libphonenumber-js?
The author released an article explaining what happened: https://medium.com/@catamphetamine/how-github-blocked-me-and-all-my-libraries-c32c61f061d3 libphonenumber-js lives on at GitLab: https://gitlab.com/catamphetamine/libphonenumber-js More on reddit.com
🌐 r/reactjs
7
6
March 9, 2020
International Phone Input with React Hook Form
hey bro did you found a solution ? More on reddit.com
🌐 r/reactjs
8
2
December 26, 2023
🌐
GitHub
github.com › google › libphonenumber
google/libphonenumber: Google's common Java, C++ and ...
Google's common Java, C++ and JavaScript library for parsing, formatting, and validating international phone numbers. - google/libphonenumber
Starred by 17.9K users
Forked by 2.2K users
Languages   C++ 53.4% | Java 29.9% | JavaScript 15.8% | CMake 0.4% | C 0.2% | Closure Templates 0.1%
🌐
Catamphetamine
catamphetamine.github.io › libphonenumber-js
libphonenumber-js
A simpler and smaller rewrite of Google Android's libphonenumber library.
🌐
Js
libphonenumbers.js.org
libphonenumbers: Introduction
If you are not redirected automatically, follow this link
🌐
CodeSandbox
codesandbox.io › examples › package › libphonenumber-js
libphonenumber-js examples - CodeSandbox
AboutA simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript14,665,313Weekly Downloads
Find elsewhere
🌐
npm
npmjs.com › search
libphonenumber-js - npm search
Headless international phone input engine with smart masking, validation and country auto-detection powered by libphonenumber-js.
🌐
Reddit
reddit.com › r/ppc › phone number formatting (libphonenumber) for enhanced conversions gas
r/PPC on Reddit: Phone number formatting (libphonenumber) for Enhanced conversions GAs
November 24, 2025 -

For google ads lead gen, if users want to submit their phone number through a form, how do you handle the regularization of the formatting of phone numbers? Does libphonenumber need to be integrated within the form itself? Or can it be done via GTM custom html tags?

For Example: Custom html tag collects first party data from form and places it in the local storage, can the same tag do the regularization in the localstorage before pushing the data to the datalayer or is this unwanted?

🌐
Maven Repository
mvnrepository.com › artifact › org.webjars.npm › libphonenumber-js › 1.12.6
Maven Repository: org.webjars.npm » libphonenumber-js » 1.12.6
WebJar for libphonenumber-js · Maven · Gradle · SBT · Mill · Ivy · Grape · Leiningen · Buildr · Scope: compile · test · provided · runtime · Scope: compile · test · provided · runtime · Format: Groovy Long · Groovy Short · Kotlin · Scope: compile ·
🌐
CodeSandbox
codesandbox.io › s › libphonenumber-js-4gcg3
libphonenumber-js - CodeSandbox
September 23, 2021 - libphonenumber-js by betbevn using libphonenumber-js, react, react-dom, react-scripts
Published   Sep 22, 2021
Author   betbevn
🌐
UNPKG
app.unpkg.com › libphonenumber-js@1.9.4 › files › bundle
libphonenumber-js
A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript · gitlab.com/catamphetamine/libphonenumber-js
🌐
NPM Compare
npm-compare.com › awesome-phonenumber,google-libphonenumber,libphonenumber-js,phone,phone-formatter,validator
validator vs libphonenumber-js vs google-libphonenumber vs awesome-phonenumber vs phone vs phone-formatter | Phone Number Validation and Formatting
To explore how validator compares ... vs is-my-json-valid vs joi vs validator. ... libphonenumber-js is a lightweight JavaScript library for parsing, formatting, and validating international phone numbers....
🌐
npm
npmjs.com › package › libphonenumber-js-utils
libphonenumber-js-utils - npm
# What is it? This repo is a compiled and minified version of the utilities functions from the [googlei18n's libphonenumber](https://github.com/googlei18n/libphonenumber) library. The functions are exposed to `window.intlTelInputUtils` inside browser envi. Latest version: 8.10.5, last published: 7 years ago.
      » npm install libphonenumber-js-utils
    
Published   Feb 11, 2019
Version   8.10.5
🌐
Phrase
phrase.com › home › resources › blog › using libphonenumber for international phone numbers
Using libphonenumber for International Phone Numbers | Phrase
January 3, 2025 - Google’s open-source libphonenumber library can help us properly format phone numbers along with country codes and also validate input fields in web applications. Google has its own Clojure-based JavaScript version of the library, but we’ll be using another library, catamphetamine/libphonenumber-js, which is a simpler and smaller rewrite of Google’s libphonenumber in JavaScript.
🌐
GitHub
github.com › catamphetamine › libphonenumber-js › blob › master › CHANGELOG.md
libphonenumber-js/CHANGELOG.md at master · catamphetamine/libphonenumber-js
A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript - catamphetamine/libphonenumber-js
Author   catamphetamine
🌐
cdnjs
cdnjs.com › home › libraries › libphonenumber-js › 1.0.17
libphonenumber-js - Libraries - cdnjs - The #1 free and open source CDN built to make life easier for developers
libphonenumber-js · 1.0.17 · A simpler (and smaller) rewrite of Google Android's popular libphonenumber library · 3k · GitHub · package · MIT licensed · https://halt-hammerzeit.github.io/libphonenumber-js/ Tags: javascript, telephone, ...
🌐
Kevinleary
kevinleary.net › blog › validating-real-phone-numbers-javascript
Kevinleary.net: JavaScript Phone Number Validation: Regex & libphonenumber-js
December 8, 2024 - Validate phone numbers in JavaScript using regular expressions and the libphonenumber-js library. This guide covers simple regex, NANP validation, and international numbers.