Phone Validator - Validation, Normalize, Format & Detect Type avatar

Phone Validator - Validation, Normalize, Format & Detect Type

Pricing

Pay per usage

Go to Apify Store
Phone Validator - Validation, Normalize, Format & Detect Type

Phone Validator - Validation, Normalize, Format & Detect Type

Validate phone numbers in bulk, normalize to E.164, format for display, detect country by code, and identify number type. Supports local numbers with defaultCountry and international numbers like +1, +44, etc. Great for CRM cleanup, lead validation, and contact enrichment.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Apizy

Apizy

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

Phone Number Validator

Validate, normalize, format, detect country, and detect type of phone numbers in bulk — with a single Actor run. Supports local and international number formats across 230+ countries. No coding needed. Get results via Dataset, Key-value store OUTPUT, or API.

Why Use Phone Number Validator?

  • Bulk validation: Process dozens to thousands of numbers in one run.
  • Multi-feature: Validate, normalize, format, detect country, and detect type — all optional per run.
  • Local number support: Input local numbers like 081234567890 using defaultCountry.
  • International support: Numbers with country calling code like +6281234567890, +14155552671 are auto-detected without needing defaultCountry.
  • Apify platform: Schedule runs, API access, monitoring, integrations.
  • Export ready: JSON/CSV download, perfect for data pipelines and CRM enrichment.

Features

  • Validate whether a phone number is valid for its country.
  • Normalize valid numbers to standard E.164 format.
  • Format valid numbers to E.164, international, and national styles.
  • Detect country of origin: country code, country name, and calling code.
  • Detect phone number type: mobile, fixed line, toll-free, VoIP, and more.
  • Supports local number input with defaultCountry fallback.
  • International numbers auto-detected directly from calling code — no fallback needed.

Understanding defaultCountry

defaultCountry is a 2-letter ISO country code (e.g. ID, US, GB) used to help parse phone numbers that do not include a country calling code.

When defaultCountry is required

If you input a local-format number — a number that starts with 0 or without any country calling code — the Actor needs defaultCountry to correctly identify which country the number belongs to.

Examples of local numbers that need defaultCountry:

InputdefaultCountryParsed as
081234567890ID+6281234567890 (Indonesia)
07911123456GB+447911123456 (United Kingdom)
0212345678ID+62212345678 (Indonesia)

Without defaultCountry, these numbers cannot be parsed and will return isValid: false.

When defaultCountry is NOT required

If the number already includes a country calling code with + prefix, the Actor detects the country directly from the number itself. defaultCountry is ignored.

Examples of international numbers that do NOT need defaultCountry:

InputAuto-detected as
+6281234567890Indonesia (ID)
+14155552671United States (US)
+442071838750United Kingdom (GB)

Which features are most impacted by defaultCountry

All features that depend on parsing are impacted when input uses local format:

FeatureImpact if defaultCountry missing and input is local
validateReturns isValid: false
normalizeReturns normalizedNumber: null
formatReturns formats: null
detectCountryReturns country: null
detectTypeReturns type: null

⚠️ Always provide defaultCountry when your input numbers use local format (starting with 0 or without calling code).

Input Options

Click the input tab for the full schema.

FieldTypeDescriptionDefault
phoneNumbersArrayList of phone numbers to process. Supports local and international formats.
defaultCountryString2-letter ISO country code for parsing local numbers. Required if numbers start with 0 or have no calling code."ID"
normalizeBooleanNormalize valid numbers to E.164 format. Adds normalizedNumber to output.false
formatBooleanFormat valid numbers to E.164, international, and national styles. Adds formats to output.false
detectCountryBooleanDetect country from phone number. Adds country (code, name, callingCode) to output.false
detectTypeBooleanDetect phone number type (mobile, fixed line, etc). Adds type to output.false

Notes:

  • phoneNumbers is the only required field.
  • defaultCountry is strongly recommended when input numbers use local format.
  • Feature flags (normalize, format, detectCountry, detectType) are independent — enable any combination.
  • All features that depend on parsing return null for invalid or unparseable numbers.

Example: Validate only (minimal)

{
"phoneNumbers": ["081234567890", "+14155552671", "12345"],
"defaultCountry": "ID"
}

Output:

[
{ "input": "081234567890", "isValid": true },
{ "input": "+14155552671", "isValid": true },
{ "input": "12345", "isValid": false }
]

Example: Normalize (normalize: true)

{
"phoneNumbers": ["081234567890", "12345"],
"defaultCountry": "ID",
"normalize": true
}

Output:

[
{
"input": "081234567890",
"isValid": true,
"normalizedNumber": "+6281234567890"
},
{ "input": "12345", "isValid": false, "normalizedNumber": null }
]

Example: Format (format: true)

{
"phoneNumbers": ["082112223333"],
"defaultCountry": "ID",
"format": true
}

Output:

[
{
"input": "082112223333",
"isValid": true,
"formats": {
"e164": "+6282112223333",
"international": "+62 821 1222 3333",
"national": "0821-1222-3333"
}
}
]

Example: Detect Country (detectCountry: true)

{
"phoneNumbers": ["+6281234567890", "+14155552671"],
"detectCountry": true
}

Output:

[
{
"input": "+6281234567890",
"isValid": true,
"country": { "code": "ID", "name": "Indonesia", "callingCode": "+62" }
},
{
"input": "+14155552671",
"isValid": true,
"country": { "code": "US", "name": "United States", "callingCode": "+1" }
}
]

Example: Detect Type (detectType: true)

{
"phoneNumbers": ["082112223333"],
"defaultCountry": "ID",
"detectType": true
}

Output:

[{ "input": "082112223333", "isValid": true, "type": "MOBILE" }]

Example: All features enabled

{
"phoneNumbers": ["082112223333", "+14155552671", "12345"],
"defaultCountry": "ID",
"normalize": true,
"format": true,
"detectCountry": true,
"detectType": true
}

Output:

[
{
"input": "082112223333",
"isValid": true,
"normalizedNumber": "+6282112223333",
"formats": {
"e164": "+6282112223333",
"international": "+62 821 1222 3333",
"national": "0821-1222-3333"
},
"country": {
"code": "ID",
"name": "Indonesia",
"callingCode": "+62"
},
"type": "MOBILE"
},
{
"input": "+14155552671",
"isValid": true,
"normalizedNumber": "+14155552671",
"formats": {
"e164": "+14155552671",
"international": "+1 415 555 2671",
"national": "(415) 555-2671"
},
"country": {
"code": "US",
"name": "United States",
"callingCode": "+1"
},
"type": "FIXED_LINE_OR_MOBILE"
},
{
"input": "12345",
"isValid": false,
"normalizedNumber": null,
"formats": null,
"country": null,
"type": null
}
]

Output Data

Results saved to default Dataset (export JSON/CSV) and Key-value store OUTPUT.

Output Fields

FieldTypeDescriptionExample
inputStringOriginal phone number input"082112223333"
isValidBooleanWhether the number is valid for its countrytrue
normalizedNumberString|nullE.164 normalized number. Present only if normalize: true"+6282112223333"
formats.e164String|nullE.164 format. Present only if format: true"+6282112223333"
formats.internationalString|nullInternational format. Present only if format: true"+62 821 1222 3333"
formats.nationalString|nullNational format. Present only if format: true"0821-1222-3333"
country.codeString|nullISO 2-letter country code. Present only if detectCountry: true"ID"
country.nameString|nullCountry name in English. Present only if detectCountry: true"Indonesia"
country.callingCodeString|nullCountry calling code. Present only if detectCountry: true"+62"
typeString|nullPhone number type. Present only if detectType: true"MOBILE"

Possible type Values

ValueDescription
MOBILEMobile / cellular number
FIXED_LINELandline / fixed number
FIXED_LINE_OR_MOBILECould be either mobile or fixed (depends on country data)
TOLL_FREEToll-free number
PREMIUM_RATEPremium rate number
SHARED_COSTShared cost number
VOIPVoice over IP number
PERSONAL_NUMBERPersonal number
PAGERPager number
UANUniversal Access Number
VOICEMAILVoicemail access number
nullType could not be determined or number is invalid

How to Use Phone Number Validator

  1. Prepare your numbers — collect phone numbers in local or international format.
  2. Set defaultCountry — if any numbers use local format (starting with 0), always set this.
  3. Enable features — toggle normalize, format, detectCountry, detectType as needed.
  4. Run Actor — results appear in Dataset and key-value store OUTPUT.
  5. Export — download as JSON or CSV, or fetch via API.
  6. Schedule / API — automate for recurring data pipelines or CRM workflows.

💡 Quick test: Run now with default input — validate your first number in seconds!

Pricing

  • Free trial: ~$5 credits covers thousands of validations.
  • Pay-per-run: Very low compute usage.
  • Scales to millions of numbers without extra cost.

Tips

  • Always use defaultCountry when processing local-format numbers to avoid false isValid: false results.
  • Use normalize to standardize all numbers to E.164 before storing in databases or CRMs.
  • Use format when you need human-readable output for display purposes.
  • Use detectCountry to enrich contact data with country metadata.
  • Use detectType to filter out landlines from mobile-only campaigns.
  • International numbers with + prefix are always parsed directly without needing defaultCountry.

FAQ

Is Phone Number Validator free?

Free trial covers extensive testing. Production: pay-per-compute (very low cost).

What is defaultCountry and do I always need it?

Only when your input numbers use local format (starting with 0 or without calling code). International numbers with + prefix are auto-detected and don't need defaultCountry.

What happens if a number is invalid?

isValid returns false. All other feature fields (normalizedNumber, formats, country, type) return null.

Can I enable multiple features at once?

Yes. All feature flags are independent. You can enable any combination of normalize, format, detectCountry, and detectType in a single run.

Why does type return null for some valid numbers?

Type detection requires full metadata (libphonenumber-js/max). For some countries or number patterns, the type genuinely cannot be determined from the number alone.

What is E.164 format?

E.164 is the international standard for phone numbers: + followed by country code and subscriber number, with no spaces or special characters. Maximum 15 digits. Example: +6281234567890.


Feedback? Create issue — open to suggestions!