Phone number validation sits at the intersection of user experience, security, and marketing cost. Get it wrong and you're either blocking real users from signing up or burning budget messaging numbers that don't exist. The cost of poor validation compounds across every system that touches phone numbers:
User sign-ups: False rejections = lost customers. False acceptances = fake accounts.
SMS campaigns: Invalid numbers waste $0.03-0.05 per message. At scale, that's thousands per month.
OTP delivery: Failed 2FA locks out real users. SMS pumping drains your messaging budget.
CRM hygiene: Bad data propagates through Salesforce, HubSpot, and every integrated system.
Here are the validation best practices that achieve 99%+ accuracy, based on processing hundreds of millions of phone numbers across 200+ countries.
1. Always Validate Format First (E.164)
Format validation is fast, cheap, and catches 15-20% of bad numbers before you make any API calls. Always run format validation as step one:
Strip non-digit characters except the leading + sign
Verify country code is valid and assigned (ITU-T E.164 list)
Check digit count matches the expected range for that country (e.g., China: 11 digits after +86, US: 10 digits after +1)
Remove leading zeros after the country code (common in national-format numbers)
Reject numbers over 15 digits — E.164 maximum
Format check alone reduces API costs by filtering out the obvious garbage. Our research shows 18% of raw user-submitted numbers fail basic format validation. That's 18% fewer paid API calls just from a regex pass.
2. Use Carrier-Level Lookups, Not Just Regex
Format validation tells you if a number looks right. Carrier-level validation (HLR lookup) tells you if it is right. HLR queries check against the Home Location Register — the carrier's live database of active subscriptions:
Active — Number is connected and can receive calls/messages
Inactive/Disconnected — Number is no longer in service
Ported — Number was transferred to a different carrier
Roaming — Subscriber is currently outside their home network
Key insight: Format-valid numbers can still be inactive. We've analyzed lists where 25% of format-valid numbers were actually disconnected. Regex says "looks good," HLR says "dead." Trust HLR.
HLR lookups cost more than format checks but provide the ground truth. For high-value operations (OTP, marketing sends, lead verification), the cost is justified by the accuracy gain.
3. Multi-Source Verification for Critical Numbers
No single data source is perfect. Carrier databases have gaps. App APIs have rate limits. For maximum accuracy, use multi-path verification with automatic fallback:
Primary: HLR lookup — Fast, carrier-authoritative, covers 95%+ of numbers
Fallback: SS7 signaling — Network-level query that works when HLR is unreachable
Fallback: App API check — WhatsApp/Telegram registration status as a proxy for number activity
When HLR succeeds, you get carrier-grade accuracy in under 500ms. When it fails (rare markets, network issues), the fallback paths ensure you still get a result. This is how we achieve 99.99% accuracy — it's not one magic source, it's multiple sources with smart routing.
4. Bulk Validation Workflow Best Practices
When validating thousands or millions of numbers, the workflow matters as much as the accuracy:
Pre-process locally: Deduplicate, format-standardize, and remove obvious junk before hitting the API. This reduces your per-number cost.
Batch efficiently: Send numbers in batches of 1,000-10,000 rather than one-by-one. Most APIs process batches in parallel.
Use async for large jobs: For 100K+ numbers, use async endpoints with webhook callbacks. Don't hold connections open.
Rate limit wisely: Respect API rate limits. A steady stream beats burst-and-wait patterns.
Store results with timestamps: Validation results age. A number active today may be inactive in 6 months. Tag results with timestamps and set expiry rules.
For a 100K-number list, the optimal workflow is: local dedup (free) → format check (fast) → bulk API validation (accurate) → result segmentation (actionable). Total processing time: under 5 minutes. Total cost: $1-10 depending on detection depth.
5. Ongoing List Maintenance Schedule
Validation isn't a one-time task. Phone data decays at 20-30% annually. Set up a maintenance cadence:
Pre-campaign: Full validation within 24 hours of any marketing send
Weekly: Deduplicate active lists
Monthly: Re-validate high-volume lists (100K+)
Quarterly: Full database audit — format, carrier, app registration, segmentation
Phone Number Validation Checklist
Strip non-digit characters; normalize to international format
Validate country code against ITU-T E.164 reference
Check digit count matches country-specific range
Run HLR/carrier lookup to verify active status
Classify line type: mobile / landline / VoIP / virtual / premium