# catamphetamine/libphonenumber-js

A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript

Repository: https://github.com/catamphetamine/libphonenumber-js
Canonical: https://ross.abutalabs.com/products/libphonenumber-js
Homepage: https://catamphetamine.gitlab.io/libphonenumber-js/
Language: JavaScript
License: MIT
License Family: permissive
Topics: phone, number
Last push: 2026-06-18T21:57:20+00:00

## Health v2 (maintenance only)
Score: 62/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 88, release rhythm 8, longevity 100
- inputs: {"age_days": 3572, "days_push": 76, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2991, forks 212 (observed 2026-08-28T04:07:34.800090+00:00)

## What it is
A smaller, simpler JavaScript/TypeScript rewrite of Google's libphonenumber library for parsing, validating, and formatting phone numbers. It offers selectable metadata sets to reduce bundle size compared to the official port.

## Use cases
- validate phone numbers in a web form
- format phone numbers in international format
- parse user-entered phone numbers into country code and national number
- extract phone numbers from free text
- detect the country of a phone number
- reduce bundle size vs google libphonenumber javascript port

## When to choose
- you need phone number parsing/formatting in JavaScript or TypeScript
- bundle size matters and the 550 kB official port is too heavy
- you need TypeScript definitions out of the box
- you need to search for phone numbers within text

## When to avoid
- you need the full feature set of Google's libphonenumber including carrier or timezone metadata
- you're working outside JavaScript/TypeScript
- you need a ready-made UI input component (use react-phone-number-input instead)

## Facets
- artifact type: library
- maturity: stable
- function: parser, serialization, internationalization
- domain: web-development, frontend, developer-tools
- platform: browser, cross-platform
- tags: phone-numbers, phone-number-validation, phone-number-formatting, libphonenumber, form-validation, nodejs, javascript, typescript

## Member repositories
- catamphetamine/libphonenumber-js (main) score 62

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:34.800090+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:31:20.334572+00:00, confidence not recorded.
  - readme: https://github.com/catamphetamine/libphonenumber-js (fetched 2026-08-28T04:07:34.800090+00:00, sha 9c04918ab455)
  - homepage: https://catamphetamine.gitlab.io/libphonenumber-js/ (fetched 2026-08-29T09:46:27.667536+00:00, sha 960b29da1374)
- Data as of 2026-08-30T08:39:29.467469+00:00.
