Google's library for parsing, formatting, and validating international phone numbers across Java, C++, and JavaScript.
libphonenumber is Google's open-source library for parsing, formatting, and validating international phone numbers. It solves the complex problem of handling phone numbers consistently across different countries and formats, providing accurate validation, geocoding, and carrier information. The library is optimized for use on smartphones and is integrated into the Android framework.
Developers building applications that require international phone number handling, such as contact management systems, telecommunication apps, form validation, and Android applications.
Developers choose libphonenumber for its accuracy, comprehensive global coverage, and multi-language support (Java, C++, JavaScript). It is a trusted, battle-tested solution maintained by Google and used in production by major platforms like Android.
Google's common Java, C++ and JavaScript library for parsing, formatting, and validating international phone numbers.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Parses, formats, and validates phone numbers for all countries worldwide, as demonstrated in the README's examples for Switzerland and other regions.
Includes geocoding, carrier mapping, timezone data, and text extraction, going beyond basic validation to provide comprehensive phone number insights.
Offers AsYouTypeFormatter for dynamic formatting as users type, shown in the Java code snippets for seamless user experience.
Provides getExampleNumber methods to generate valid phone numbers for any country or type, aiding in testing and demonstrations.
Only maps to original carriers, not current ones, due to number portability, as admitted in the README's caveat for carrier mapping.
Requires repackaging metadata and using AssetManager for optimal performance on Android, adding configuration overhead beyond simple integration.
The official JS library depends on Google Closure, resulting in large bundle sizes (up to 420 KB), which can impact web app performance.