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 with Python phonenumbers, add carrier and line type with the numlookupapi API, check lists in batches, plus a Django form.
Tutorial · PHP
Validate phone numbers in PHP
Phone number validation in PHP with libphonenumber-for-php and the numlookupapi API: E.164 formatting, carrier and line type, batches and a Laravel rule.
Tutorial · JavaScript
Validate phone numbers in JavaScript
Phone number validation in JavaScript and Node.js: a regex, libphonenumber-js and a validation API with carrier and line type, plus batches. Tested code.
Guide
E.164 phone number format explained
What the E.164 format is, examples for 11 countries, how to convert any number to E.164 in JavaScript, Python and PHP, a tested regex, and how to store numbers.
Comparison
Best phone number validation APIs in 2026
Phone validation APIs compared: numlookupapi, Twilio Lookup, Vonage, Abstract, Numverify, Telesign and libphonenumber: data, free tiers and 2026 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 documentation250 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"
}