About this project

Google's libphonenumber is a widely used library for parsing, formatting, and validating international phone numbers. It supports all countries and regions, and is available in Java, C++, and JavaScript. The Java version is optimized for smartphones and has been used by the Android framework since version 4.0. Key capabilities include: - Parsing and normalizing phone numbers into structured objects - Full validation using length and prefix information - Quick possibility checks based on length alone - Formatting in international, national, and E.164 styles - As-you-type formatting for real-time input - Number type detection (fixed-line, mobile, toll-free, premium rate, VoIP, etc.) - Confidence scoring for matching two numbers - Offline geocoding to provide location descriptions - Carrier mapping based on originally assigned number ranges - Timezone mapping for phone numbers - Finding phone numbers embedded in text The project provides example numbers for all regions, supports formatting numbers as dialed from other countries, and includes a demo Android app. It is distributed via Maven for Java integration, with Javadoc available online. The library follows a structured versioning policy and releases updates approximately every two weeks. Numerous third-party ports exist for languages including Python, Go, Ruby, Rust, PHP, Swift, C#, Elixir, and others, as well as Android-optimized and JavaScript alternatives.