Phone number guides
Tutorials for validating, formatting and enriching phone numbers in JavaScript, Python and PHP, plus explanations of E.164 and line types.
Tutorial · Python
Validate phone numbers in Python
Validate and format phone numbers in Python with the phonenumbers library, then add carrier and line type with the numlookupapi API. Copy-paste code for Django and Flask.
Tutorial · PHP
Validate phone numbers in PHP
Validate phone numbers in PHP with libphonenumber-for-php and the numlookupapi API. Includes a Laravel validation rule and E.164 formatting.
Tutorial · JavaScript
Validate phone numbers in JavaScript
Three ways to validate phone numbers in JavaScript and Node.js: regex, libphonenumber-js and a phone validation API with carrier and line type. With code.
Guide
E.164 phone number format explained
What the E.164 format is, how to convert any phone number to E.164, examples for 10 countries, a regex and why APIs like Twilio require it.
Comparison
Best phone number validation APIs in 2026
A comparison of phone number validation APIs in 2026: numlookupapi, numverify, Twilio Lookup, Abstract, Vonage Number Insight and libphonenumber. Features, free tiers and prices.
Phone number API
Validate numbers like this in your app
numlookupapi checks any phone number worldwide in one request and returns validity, line type, carrier, location and every standard format as JSON.
Read the documentation100 free requests every month. No credit card required.
GET https://api.numlookupapi.com/v1/validate/+12069220880
{
"valid": true,
"number": "12069220880",
"local_format": "2069220880",
"international_format": "+12069220880",
"country_prefix": "+1",
"country_code": "US",
"country_name": "United States of America",
"location": "Seattle",
"line_type": "landline",
"e164_format": "+12069220880",
"national_format": "(206) 922-0880"
}