Parse and validate any phone number using Google's libphonenumber, for free
Zero Setup
No API keys, no signup, no authentication. Just make requests.
Built on libphonenumber
Powered by Google's libphonenumber, the industry standard.
Privacy First
No logging or storage of phone numbers. Parsing happens in real time.
REST API Usage
/api/phone-numbers/{phone_number}
Parse and validate any phone number. Returns carrier, location, and formatting.
Path Parameters
phone_number
The phone number to parse. Can include country code, spaces, dashes, or parentheses. URL-encode the + as %2B for international format.
Response Attributes
carrier
string
The carrier or network operator name (e.g., "T-Mobile", "Verizon").
components
object
Parsed parts: area_code, country_code, extension, local_number.
The area code is a string that keeps leading zeros. The country code is an integer. Missing values use null.
country
string
ISO 3166-1 alpha-2 country code (e.g., "CA", "GB", "US").
formats
object
Formatted versions: e164, international, national.
geo_name
string
Geographic location (e.g., "California", "Ontario").
is_possible
boolean
Whether the number has a valid format structure.
is_valid
boolean
Whether the phone number is valid and assigned.
possible_types
array
All possible number types this number could be. One or more of the following:
area_code_optionalcarrier_selection_codescarrier_servicescarrier_specificdirectory_servicesemergencyexpanded_emergencyfixed_linefixed_or_mobilemobileno_international_diallingpagerpersonal_numberpremium_rateshared_costshort_codesms_servicesstandard_ratetoll_freeuanvoicemailvoip
sanitized
string
The phone number with all non-digit characters removed.
timezone
string
IANA timezone identifier (e.g., "America/Los_Angeles").
type
string
Number type. One of the types listed in possible_types.
curl https://libphonenumberapi.com/api/phone-numbers/+4915123456789
{
"carrier": "T-Mobile",
"country": "DE",
"components": {
"area_code": null,
"country_code": 49,
"extension": null,
"local_number": "3456789"
},
"formats": {
"e164": "+4915123456789",
"international": "+49 1512 3456789",
"national": "01512 3456789"
},
"geo_name": null,
"is_possible": true,
"is_valid": true,
"possible_types": [
"fixed_or_mobile",
"pager",
"personal_number",
"premium_rate",
"shared_cost",
"toll_free",
"uan"
],
"sanitized": "4915123456789",
"timezone": "Europe/Berlin",
"type": "mobile"
}
MCP Usage
Use this service with your AI tool, agent, or LLM through MCP.
The parse_phone_number tool returns the same fields as the REST API.
Supply phone_number as a string.
Add an optional country_hint, such as GB, for a national phone number.
Add this server URL in your agent's MCP settings. Use Streamable HTTP with no authentication.
https://libphonenumberapi.com/mcp
For example, ask your agent to parse 020 7946 0018 with the country hint GB.
Frequently Asked Questions
What is this service?
└ This free service provides a REST API and an MCP server for phone number parsing, validation, and formatting. It uses Google's libphonenumber through the phonelib Ruby gem.
Is it really free?
└ Yes, completely free. No signup, no API keys, and no usage caps — use it for development, testing, or production traffic.
Are there rate limits?
└ There are no strict rate limits, but please be reasonable.
What about data privacy?
└ We don't store or log any phone numbers. All parsing happens in real-time and no data is retained.
How accurate is the parsing?
└ The service uses Google's libphonenumber, the same library used by Android and many major applications. The accuracy depends on the library's metadata, which Google actively maintains. Currently, libphonenumberapi.com is using phonelib version 0.10.27.
How can I contact you?
└ Email [email protected].