Phone
Validate a phone number
Check that a number exists in its country's numbering plan, and get its format, line type, original carrier, region and time zone.
- E.164
- +12015550123
- National
- (201) 555-0123
- Country
- United States (US)
- Calling code
- +1
- Line type
- Landline or mobile
- Carrier (range holder)
- Not available
- Region
- New Jersey
- Time zones
- America/New_York
- Current carrier (live network)
- Unlock with a free account
- Ported number
- Unlock with a free account
- MCC / MNC
- Unlock with a free account
- Bulk CSV upload
- Unlock with a free account
- API access
- Unlock with a free account
How to read the result
The badge at the top of the card gives the verdict. The rows under it describe the number as its country's numbering plan sees it. Rows with a lock come from a live network lookup or from the API, and open with a free account.
| Field | What it means | What to do with it |
|---|---|---|
| Status | Valid: the length is allowed and the number sits in a range its country has opened. Invalid: it breaks a rule of the plan. Unknown: it was written in national format with no country, so there was no plan to read. | Accept Valid numbers. Ask for a correction on Invalid. On Unknown, choose the country in the menu next to the field and check again. |
| E.164 | The international standard form: a plus sign, the country calling code and the national number, no spaces, 15 digits at most. | Store this form. It is unique per line, compares cleanly, and SMS and voice providers expect it. |
| National | The number as people write it inside its country, with the trunk prefix (the leading 0 in the UK) and the local grouping. | Show it to people in the same country. Never keep it as the only stored copy. |
| Country | The country or territory whose plan the number belongs to, with its ISO 3166-1 code. | Compare it with the country the user picked or the billing address. A mismatch deserves a second look. |
| Calling code | The digits dialed after the plus sign to reach that country, such as +1 or +44. | Several territories can share one code. Rely on Country, not on this row, to know where the number belongs. |
| Line type | Mobile, Landline, Landline or mobile, VoIP, Toll-free, Premium rate and the other types the plan defines. | Send SMS to mobile numbers. Block premium-rate numbers wherever you expect a personal line. |
| Carrier (range holder) | The operator the block of numbers was assigned to. Filled for mobile ranges when the prefix data has an entry. | Treat it as history, not as the current network. Numbers move between operators. |
| Region | The state, province or city of the range, for landlines and for countries where mobile numbers carry an area code. Empty for most mobile numbers. | Use it to localize or route. Never use it as proof of where someone lives. |
| Time zones | IANA time zone IDs of the range, such as America/New_York. | Schedule calls and reminders in the recipient's local time. |
| Current carrier (live network) | Locked. The operator serving the number today, from a live lookup. | Use it to route SMS or to recheck a number that may have moved. |
| Ported number | Locked. Whether the number has left its original operator. | Read it next to Carrier (range holder): it explains why the two names differ. |
| MCC / MNC | Locked. Mobile country code and mobile network code of the current network. | Feed them to SMS routing or fraud rules that work on network identifiers. |
| Bulk CSV upload | Locked. Validate a file of up to 2,000,000 rows and get it back with result columns. | Clean an existing contact list in one pass. |
| API access | Locked. The same check from your own code, with an API key. | Validate every number at the moment it enters your system. |
The locked rows need a free account. A live lookup costs 3 credits instead of 1, and the free plan includes 100 credits every month. In the United States and Canada, every geographic number comes back as Landline or mobile, because their plan does not separate the two.
How the check works
The validator compares the number with the numbering plan of its country. The plan data is the metadata of Google's libphonenumber (Apache-2.0), read through libphonenumber-js. North American area codes add NANPA's public data. Nothing is dialed and no message is sent.
- Clean the input. Spaces, dashes, dots, slashes and parentheses are ignored, so (201) 555-0123 and 201.555.0123 read the same. A leading tel: is removed. An extension written as ext. 42, x42 or #42 is set aside so its digits do not count.
- Find the country. A leading plus sign means the next digits are a calling code. A leading 00 is read the same way when no country is selected. With a country selected, the number is read the way someone there would dial it: national format with its trunk prefix, or that country's own exit code, such as 011 in the United States. With no plus sign, no 00 and no country, the plan is unknown, and so is the status.
- Check the length. Each country lists the lengths its national numbers can have. A number outside them fails at once. This is how +44 7400 1234567 fails: one digit too many for a UK mobile number.
- Match a range. The plan holds a pattern for each type of number: fixed line, mobile, toll-free, premium rate and the rest. The number must match one of them. A number with a legal length still fails here if it falls in a block the regulator has not opened.
- Describe the number. A valid number gets its E.164 and national forms, its line type, and the region, time zones and range holder found in libphonenumber's prefix tables. US and Canadian numbers without a regional entry take their region from the area code.
When a calling code is shared, the leading digits pick the territory. +1 876 belongs to Jamaica, and +44 1534 to Jersey.
Some slips are forgiven. A trunk 0 left after the country code, as in +44 (0)121 234 5678, is dropped during parsing, and the E.164 result comes out clean.
What a Valid status does not prove
The plan describes which numbers can exist. It does not record which ones are in use. A basic check cannot see:
- whether the number has been given to a subscriber, or handed back;
- whether the line is active, disconnected, or reassigned to someone new;
- whether the number moved to another operator;
- whether the person who typed it owns it.
The first example on this page shows the gap. NANPA reserves 555-0100 through 555-0199 for fictional use, so +1 201-555-0123 is not assigned to anyone. It still returns Valid, because nothing in the format of a New Jersey number rules it out. Valid means possible in the plan. To learn whether someone holds the number, send a one-time code. To see the network serving it today, run a live lookup.
Why a number comes back invalid
Most failures fall into a handful of patterns. Each example below fails for the reason in its row.
| Cause | Example | How to fix it |
|---|---|---|
| Area code starting with 0 or 1 | +1 123-456-7890 | North American area codes start with a digit from 2 to 9. Check the three digits after +1. |
| Exchange code starting with 0 or 1 | +1 201-155-0123 | The three digits after the area code also start with 2 to 9. |
| Service code used as an area code | +1 911-555-0123 | N11 codes (211, 311 and so on up to 911) are three-digit service numbers, never area codes. |
| One digit too many | +44 7400 1234567 | UK mobile numbers have 10 digits after +44. Look for a doubled digit. |
| Legal length, no matching range | +44 7400 12345 | Nine digits is a valid UK length, but not for a number starting with 7. A digit is missing. |
| Exit code of another country | 00 44 7400 123456 with United States selected | From the US the exit code is 011. Type +44, or leave the menu on From the number. |
| Block set aside for fiction | +44 7700 900123 | Ofcom reserves 07700 900000 to 07700 900999 for TV and radio drama, and the plan data rejects them. |
A number written in national format with no country, such as 07400 123456 alone, is not invalid. It returns Unknown, because the same digits could belong to several countries. Select United Kingdom and the same input comes back Valid as +447400123456.
Numbering plans also change. Regulators open new ranges and retire old ones, and libphonenumber follows with new metadata releases. A number from a block opened very recently can fail until the data catches up.
Validate numbers where they enter your system
A phone field in a signup or checkout form is the cheapest place to stop a bad number. A few rules make the check pay off.
- Send the country with the number. People type numbers the way they dial at home. A country picker that defaults to the visitor's locale turns 07400 123456 into a number the plan can read, instead of an Unknown.
- Run the check on your server. The API key stays secret there, and the server is where the decision is made. A basic check costs 1 credit and answers from the numbering plan.
- Give each status one action.
| Status | What the form should do |
|---|---|
| Valid | Save the E.164 value and echo the national format back to the user. |
| Invalid | Keep the user on the form and show an example number for their country. |
| Unknown | Ask for the country, then check again. |
- Confirm possession separately. A valid number can belong to someone else. If it will be used to sign in or recover an account, send a one-time code before you mark it verified.
- Write your line type rule once. A marketplace may refuse premium-rate and VoIP numbers at signup. A clinic may accept landlines for reminder calls. Decide per flow and apply the rule to the Line type field.
The guide Validate signup forms walks through the full flow with code, and Format phone numbers in E.164 covers storage. Every response field is described in the phone API reference.
Same check through the API
One HTTPS call, one credit. The response below is the real schema returned by the API.
curl https://api.qelka.com/v1/phone \
-H "Authorization: Bearer sk_test_your_key" \
-H "Content-Type: application/json" \
-d '{"phone":"+12015550123","level":"basic"}'const response = await fetch("https://api.qelka.com/v1/phone", {
method: "POST",
headers: {
Authorization: "Bearer sk_test_your_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
phone: "+12015550123",
level: "basic",
}),
});
const result = await response.json();{
"id": "lkp_01M84QZDVBQCJAMBE4TJB6VRAC",
"object": "phone",
"input": "+12015550123",
"valid": true,
"status": "valid",
"e164": "+12015550123",
"national": "(201) 555-0123",
"country": {
"code": "US",
"name": "United States",
"calling_code": "1"
},
"region": "New Jersey",
"timezones": [
"America/New_York"
],
"line_type": "fixed_line_or_mobile",
"carrier": {
"name": null,
"mcc": null,
"mnc": null,
"source": "numbering_plan"
},
"ported": null,
"credits_used": 1,
"cached": false
}Bulk and pricing
- Upload a CSV of up to 2,000,000 rows from the dashboard or the API, pick the column, get the results back as a CSV.
- Every check costs 1 credit, live phone lookups cost 3. Cached results are billed the same way; calls that fail upstream are not billed.
- The free plan includes 100 credits every month. Paid plans start at $29 for 10,000 credits.
Frequently asked questions
How can I tell if a phone number is real?
Why does the validator say Valid for a number that does not work?
Is +1 201-555-0123 a real phone number?
What does the Unknown status mean?
country field.Why is my own number marked invalid?
How many digits does a phone number have?
Does the validator call or text the number?
Can I validate a number without the country code?
Which countries does the phone validator support?
Is the phone validator free?
How do I validate a whole list of phone numbers?
What is the difference between a possible and a valid number?
Does a Valid result mean the person owns the number?
Can the validator spot fake or temporary phone numbers?
Should I validate phone numbers in the browser or on the server?
Put this check in your product
Get an API key in under a minute. 100 free credits every month, no card required.