Phone Validator - Validation, Normalize, Format & Detect Type
Pricing
Pay per usage
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
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
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
081234567890usingdefaultCountry. - International support: Numbers with country calling code like
+6281234567890,+14155552671are auto-detected without needingdefaultCountry. - 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
defaultCountryfallback. - 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:
| Input | defaultCountry | Parsed as |
|---|---|---|
081234567890 | ID | +6281234567890 (Indonesia) |
07911123456 | GB | +447911123456 (United Kingdom) |
0212345678 | ID | +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:
| Input | Auto-detected as |
|---|---|
+6281234567890 | Indonesia (ID) |
+14155552671 | United States (US) |
+442071838750 | United Kingdom (GB) |
Which features are most impacted by defaultCountry
All features that depend on parsing are impacted when input uses local format:
| Feature | Impact if defaultCountry missing and input is local |
|---|---|
validate | Returns isValid: false |
normalize | Returns normalizedNumber: null |
format | Returns formats: null |
detectCountry | Returns country: null |
detectType | Returns type: null |
⚠️ Always provide
defaultCountrywhen your input numbers use local format (starting with0or without calling code).
Input Options
Click the input tab for the full schema.
| Field | Type | Description | Default |
|---|---|---|---|
phoneNumbers | Array | List of phone numbers to process. Supports local and international formats. | — |
defaultCountry | String | 2-letter ISO country code for parsing local numbers. Required if numbers start with 0 or have no calling code. | "ID" |
normalize | Boolean | Normalize valid numbers to E.164 format. Adds normalizedNumber to output. | false |
format | Boolean | Format valid numbers to E.164, international, and national styles. Adds formats to output. | false |
detectCountry | Boolean | Detect country from phone number. Adds country (code, name, callingCode) to output. | false |
detectType | Boolean | Detect phone number type (mobile, fixed line, etc). Adds type to output. | false |
Notes:
phoneNumbersis the only required field.defaultCountryis 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
nullfor 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
| Field | Type | Description | Example |
|---|---|---|---|
input | String | Original phone number input | "082112223333" |
isValid | Boolean | Whether the number is valid for its country | true |
normalizedNumber | String|null | E.164 normalized number. Present only if normalize: true | "+6282112223333" |
formats.e164 | String|null | E.164 format. Present only if format: true | "+6282112223333" |
formats.international | String|null | International format. Present only if format: true | "+62 821 1222 3333" |
formats.national | String|null | National format. Present only if format: true | "0821-1222-3333" |
country.code | String|null | ISO 2-letter country code. Present only if detectCountry: true | "ID" |
country.name | String|null | Country name in English. Present only if detectCountry: true | "Indonesia" |
country.callingCode | String|null | Country calling code. Present only if detectCountry: true | "+62" |
type | String|null | Phone number type. Present only if detectType: true | "MOBILE" |
Possible type Values
| Value | Description |
|---|---|
MOBILE | Mobile / cellular number |
FIXED_LINE | Landline / fixed number |
FIXED_LINE_OR_MOBILE | Could be either mobile or fixed (depends on country data) |
TOLL_FREE | Toll-free number |
PREMIUM_RATE | Premium rate number |
SHARED_COST | Shared cost number |
VOIP | Voice over IP number |
PERSONAL_NUMBER | Personal number |
PAGER | Pager number |
UAN | Universal Access Number |
VOICEMAIL | Voicemail access number |
null | Type could not be determined or number is invalid |
How to Use Phone Number Validator
- Prepare your numbers — collect phone numbers in local or international format.
- Set
defaultCountry— if any numbers use local format (starting with0), always set this. - Enable features — toggle
normalize,format,detectCountry,detectTypeas needed. - Run Actor — results appear in Dataset and key-value store
OUTPUT. - Export — download as JSON or CSV, or fetch via API.
- 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
defaultCountrywhen processing local-format numbers to avoid falseisValid: falseresults. - Use
normalizeto standardize all numbers to E.164 before storing in databases or CRMs. - Use
formatwhen you need human-readable output for display purposes. - Use
detectCountryto enrich contact data with country metadata. - Use
detectTypeto filter out landlines from mobile-only campaigns. - International numbers with
+prefix are always parsed directly without needingdefaultCountry.
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!