Use it inside Claude, ChatGPT, Cursor and more.Use it in your AI tools.Set it up
Guide

How to validate phone numbers.

Three levels of phone validation, from checking the format to checking the line to deciding whether a number is worth a call, with code for each.

By Kai Hatchman4 min readUpdated Oct 6, 2026
The short answer

Check three things, in this order: the number is correctly formed, the line is real and in use, and it belongs to the person you're about to call. A format check is free and catches typos. The line and person checks need a live data source, and they are the ones that tell you whether a call is worth making.

Jane Doe
+1 212 555 0162
High chance
FormatValid
LineMobile, in use
PersonName matches
AnswerWorth a call

"Validate this phone number" can mean three different things, and each one catches problems the one before it can't.

This guide goes through them in order: is the number correctly formed, is the line real and in use, and does it reach the person you're about to call.

The three levels

LevelWhat it checksWhat it misses
FormatWhat it checks: The number is correctly formed for its countryWhat it misses: Whether it's in service
LineWhat it checks: The number is real, its line type and whether it's activeWhat it misses: Who it belongs to
PersonWhat it checks: The number belongs to the contact and is worth a callWhat it misses: Whether you may call it, which is a separate question

Level 1: check the format

A format check confirms a number has the right length and structure for its country. For US numbers that means the North American Numbering Plan: a three-digit area code, a three-digit exchange and four digits.

It's free and instant, and it should run everywhere a number enters your system. It's also the only level you can do without a data source.

format-check.ts
import { parsePhoneNumberFromString } from "libphonenumber-js";
 
const phone = parsePhoneNumberFromString("(212) 555-0162", "US");
 
phone?.isValid(); // true when the structure is valid for the US
phone?.number; // "+12125550162", the E.164 form to store
Store numbers in E.164

A plus sign, the country code and the number, with no spaces. It's the one format every CRM, dialer and API agrees on.

Level 2: check the line

A correctly formed number can still be disconnected, unassigned or a type of line nobody answers. Checking the line needs a live data source.

The useful facts at this level are whether the number is valid, what kind of line it is (mobile, landline or VoIP), and whether the line shows signs of recent use.

A format library can't give you the line type for US numbers. libphonenumber reports most of them as "fixed line or mobile", because a number can move between carriers and line types. That is the gap a live check fills.

Level 3: check the person

A live mobile that now belongs to somebody else is a wrong-number call. The last check is whether the number belongs to the name on your list.

Put that together with the line checks and you can answer the question the list is really for: is this contact worth a call?

Doing levels 2 and 3 in one call

POST /api/v1/analyze
curl -X POST https://app.willthispersonanswer.com/api/v1/analyze \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "contacts": [{ "first_name": "Jane", "last_name": "Doe", "phone": "+12125550162" }] }'

What comes back

Response (trimmed to the fields you route on)
{
"results": [
{
"phone": "+12125550162",
"status": "ok",
"will_this_person_answer": "high_chance",
"action": "phone"
}
]
}

Each contact gets one answer. will_this_person_answer is high_chance, low_chance or bad_data, and action says what to do with the contact: phone, multi_channel or email_linkedin. You route on those two fields and ignore the raw line data. The full response has a few more fields, listed in the API reference.

Common mistakes

  • Stopping at the format check. A well-formed number can still be disconnected or belong to somebody else.
  • Checking a list once and dialing it for months. Numbers are reassigned and disconnected all the time.
  • Storing numbers with spaces, brackets and dashes. Keep the E.164 form and format only for display.
  • Treating a valid number as permission to call it.

Putting it into practice

  1. 1

    Format-check on entry

    Reject or fix malformed numbers when they're typed or imported.

  2. 2

    Check before you dial

    Run the line and person checks close to the calling session, not once a year.

  3. 3

    Route on the answer

    Dial High chance and Low chance; send Bad data to email and LinkedIn.

A checked calling list with an outcome and an action on every row
An example of a checked list: every row gets an outcome and an action. Names and numbers are invented.
Validation isn't permission

A valid, reachable number doesn't settle whether you may call it. Check the rules that apply to your calls separately.

FAQ

Questions, answered.

How do I validate a US phone number in JavaScript?

Use libphonenumber-js: parse the number with parsePhoneNumberFromString(number, "US") and call isValid(). That is a format check only. It tells you the number is well formed, not that anyone answers it.

Can I tell whether a number is mobile or a landline?

Not reliably from the number alone. For US numbers libphonenumber usually returns "fixed line or mobile", because numbers move between carriers. A live line check is what separates them.

How often should I re-check a calling list?

Close to the day you dial it. Numbers get reassigned and disconnected constantly, so a list checked months ago has drifted.

Does a valid phone number mean I can call it?

No. Validation says whether a number is real and reachable, not whether you have the right to call it. Calling rules depend on who you're calling and why, so check them separately.

What does checking a phone number cost?

A format check is free. With Will This Person Answer it is one credit per checked contact, and a new account starts with 250 free credits.

Can I validate a phone number without calling it?

Yes. A format check needs nothing but the number, and line and person checks use a data source rather than a call.

What's the difference between a valid number and a working number?

Valid means correctly formed and assigned. Working means somebody is actually using the line. A number can be the first without the second.

Know who’ll answer
before you call.

Grade 250 contacts free. No card required, and US phone numbers only.

  • US phone numbers only
  • No card required
  • One credit per checked contact