sms compliance
sms compliance
New Zealand Phone Numbers: Complete Guide to +64 Format, Validation & Area Codes
Learn how to validate and format New Zealand phone numbers with +64 country code. Comprehensive developer guide covering area codes (03, 04, 06, 07, 09), mobile validation, MNP lookup, and regulatory compliance.
New Zealand Phone Numbers: Complete Guide to +64 Format, Validation & Area Codes
Master New Zealand phone number validation, formatting, and compliance. This comprehensive guide shows you how to validate +64 mobile and landline numbers, work with geographic area codes (03, 04, 06, 07, 09), implement Mobile Number Portability (MNP) lookups, and comply with Number Administration Deed (NAD) standards (https://www.nad.org.nz/). Get practical regex patterns, code examples, and regulatory best practices for working with New Zealand phone numbers.
New Zealand Phone Number Format and Structure
New Zealand phone numbers use a structured format with country codes, area codes, and subscriber numbers. Master these components to parse and validate numbers accurately.
Key Components
- Country Code: +64 (required for international calls)
- International Prefix: 00 (dial before country codes when calling from New Zealand) 1
- National Prefix: 0 (dial before area codes for domestic calls)
- Area Code: 1 digit (identifies the geographic region)
- Subscriber Number: 7 – 8 digits (landline), 8 – 10 digits (mobile) 1
Number Formats
New Zealand phone numbers follow these formats:
- Landline:
0[Area Code][Local Number](e.g., 03 123 4567) - Mobile:
02[Mobile Prefix][Subscriber Number](e.g., 021 123 4567, 8 – 10 digits total) - Toll-Free:
0800 [Subscriber Number]or0508 [Subscriber Number](e.g., 0800 123 456, 0508 123 456, 10 digits total) 1 - Premium:
0900 [Subscriber Number](e.g., 0900 123 45, 9 digits total)
New Zealand Area Codes by Region
Area codes in New Zealand follow geographic assignments 1:
| Area Code | Region | Major Cities |
|---|---|---|
| 03 | South Island and Chatham Islands | Christchurch, Dunedin, Invercargill |
| 04 | Wellington metro area | Wellington, Kāpiti Coast District (excluding Ōtaki) |
| 06 | Lower North Island | Taranaki, Manawatū-Whanganui, Hawke's Bay, Gisborne, Wairarapa, Ōtaki |
| 07 | Central North Island | Hamilton, Tauranga, Rotorua (Waikato, Bay of Plenty) |
| 09 | Auckland and Northland | Auckland, Tuakau, Pōkeno |
Mobile Number Prefixes and Carrier Identification
Mobile network prefixes identify the original telecommunications provider. Numbers may now operate on different networks due to Mobile Number Portability (MNP), implemented 1 April 2007 1:
- 021: One NZ (formerly Vodafone New Zealand) – 8 – 10 digits
- 022: 2degrees – 8 digits
- 027: Spark New Zealand (formerly Telecom) – 8 digits
- 028: Spark New Zealand / CallPlus / Black + White – 8 digits
- 029: One NZ (acquired TelstraClear in 2012) – 8 digits
SMS Carrier Lookup: Text any New Zealand mobile number to 300 for instant carrier identification. This free service from 2degrees (supported by One NZ and Spark as of September 2019) returns the current carrier name via SMS 1. For programmatic carrier identification, see phone number lookup services.
API Alternatives for Programmatic Lookup:
| Access Type | Requirements | Best For |
|---|---|---|
| Direct IPMS Access | NAD membership, party status to LMNP Determination. Apply at https://www.tcf.org.nz/ 2 | Network operators |
| Reseller/SMS Partner Access | SMS service provider status, technical API capability, carrier endorsement 2 | Non-network operators |
| Third-Party Services | No NAD membership required. Use WebSMS Number Portability Checker 2 | Quick integration |
| SMS Gateway APIs | Twilio, Vonage, MessageBird platform services | Full-service platforms |
How to Validate New Zealand Phone Numbers
Implement phone number validation before storing or processing numbers. Validation prevents SMS delivery failures (saving 5-15 cents per failed message), reduces database errors, catches user typos at input, and ensures telecommunications compliance 3. For international number formatting standards, see our guide on E.164 phone number format.
Regular Expression Patterns for Validation
Use these regular expressions to validate different types of New Zealand phone numbers:
const nzPhonePatterns = {
landline: /^0([34679])([2-9]\d{6})$/,
mobile: /^02[012789]\d{7,9}$/, // 8-10 digits after 02X
tollFree: /^0(800|508)\d{6,7}$/, // Includes 0508
premium: /^0900\d{5}$/,
protected: /^(111|112|105|010|0170|018|0172|0500)$/
};
function validateNZPhoneNumber(number) {
// Remove whitespace and hyphens
const cleanNumber = number.replace(/[\s-]/g, '');
return Object.values(nzPhonePatterns).some(pattern => pattern.test(cleanNumber));
}
function validateInternationalNZNumber(number) {
const cleanNumber = number.replace(/[\s-]/g, '');
if (cleanNumber.startsWith('+64')) {
return validateNZPhoneNumber('0' + cleanNumber.slice(3));
}
return false;
}
// Check if number is a protected/special service range
function isProtectedNumber(number) {
const cleanNumber = number.replace(/[\s-]/g, '');
return nzPhonePatterns.protected.test(cleanNumber) ||
cleanNumber.startsWith('0800') ||
cleanNumber.startsWith('0508') ||
cleanNumber.startsWith('0900') ||
cleanNumber.startsWith('0500');
}Pattern Breakdown:
| Pattern | Matches | Rules |
|---|---|---|
landline | Landline numbers | Correct area codes, 7-digit local numbers (cannot start with 0 or 1) 3 |
mobile | Mobile numbers | 8 – 10 digits after 02X prefix (021, 022, 027, 028, 029) 3 |
tollFree | Toll-free numbers | 0800 or 0508 with 6 – 7 digit subscriber numbers 3 |
premium | Premium rate numbers | 0900 with 5-digit subscriber numbers 3 |
protected | Emergency/operator services | Cannot be called programmatically |
Common Validation Failures:
| Invalid Number | Reason | Correct Format |
|---|---|---|
02012345 | Too short | Mobile needs 9-11 total digits (e.g., 021123456) |
091234567 | Invalid area code | 09 needs 7 more digits (e.g., 0912345678) |
0311234567 | Invalid local number | Local numbers cannot start with 1 (e.g., 0312234567) |
0801234567 | Wrong digit count | 0800 needs 6-7 digits after prefix (e.g., 0800123456) |
+6491234567 | Invalid format | Use proper area code (e.g., +6491234567 → +64912345678) |
Mobile Number Portability (MNP) Implementation
Mobile Number Portability (MNP) has operated in New Zealand since 1 April 2007 1. Users retain their phone numbers when switching providers through a centralized Internet Protocol Management System (IPMS) maintained by the Telecommunications Forum (TCF).
Implementation Requirements and Best Practices:
// Example: Caching carrier lookups with recommended TTL
const carrierCache = new Map();
const CACHE_TTL = 7 * 24 * 60 * 60 * 1000; // 7 days in milliseconds
async function getCarrierWithCache(phoneNumber) {
const cached = carrierCache.get(phoneNumber);
if (cached && Date.now() - cached.timestamp < CACHE_TTL) {
return cached.carrier;
}
try {
// Call IPMS API or third-party service
const carrier = await lookupCarrier(phoneNumber);
carrierCache.set(phoneNumber, {
carrier: carrier,
timestamp: Date.now()
});
return carrier;
} catch (error) {
// Graceful degradation: return cached value even if expired
if (cached) {
console.warn('IPMS lookup failed, using stale cache');
return cached.carrier;
}
throw new Error('Carrier lookup unavailable');
}
}Cache Strategy Details:
| Strategy | Recommendation | Rationale |
|---|---|---|
| Recommended TTL | 7-14 days | Number porting completes in 1-2 business days; numbers rarely port multiple times per month 4 |
| High-Volume Apps | 3-5 day TTL | Balance freshness with lookup costs |
| Graceful Degradation | Serve stale cache if IPMS unavailable | Include logging for monitoring |
| Rate Limiting | 10-20 requests/second maximum | Prevent IPMS throttling 2 |
Local and Mobile Number Portability services operate under the Telecommunications Act 2001. The Commerce Commission issued determinations in 2005 (Decision 554), 2010 (Decision 705), 2016 (Decision 32), and reviewed them in 2021 4.
Protected Number Ranges
Specific number ranges serve reserved purposes. You cannot assign these to regular subscribers or use them for automated dialing:
- Emergency Services: 111 (all emergency services), 112 (GSM mobile only), 105 (Police non-emergency) 1
- Special Services: 0800/0508 (Toll-free), 0900 (Premium Rate), 0500 (Reserved)
- Operator Services: 010 (National Operator), 0170 (International Operator), 018 (National Directory), 0172 (International Directory)
Implementation Example:
function canDialProgrammatically(number) {
const cleanNumber = number.replace(/[\s-]/g, '');
// Block emergency and operator services
const blockedPrefixes = ['111', '112', '105', '010', '0170', '018', '0172'];
for (const prefix of blockedPrefixes) {
if (cleanNumber.startsWith(prefix)) {
throw new Error(`Cannot dial protected number: ${prefix}`);
}
}
// Warn on premium numbers (require explicit user consent)
if (cleanNumber.startsWith('0900')) {
console.warn('Premium rate number - ensure user consent obtained');
}
return true;
}Network Coverage Validation
Validate network coverage to prevent SMS failures in areas with limited service. New Zealand has 98%+ population coverage, but rural and remote areas (especially South Island high country and offshore islands) may have limited connectivity 1.
Implementation Approaches:
| Approach | Provider | Use Case |
|---|---|---|
| Carrier Coverage APIs | Spark, One NZ, 2degrees developer programs | Direct carrier integration |
| Third-Party Services | OpenCellID | Crowdsourced cell tower location data |
| Fallback Strategy | SMS retry with exponential backoff (5 min, 30 min, 2 hours) + alternative channels (email, push) | Critical messages |
Fallback Implementation Example:
async function sendWithFallback(phoneNumber, message, attempt = 1) {
const backoffTimes = [0, 5 * 60 * 1000, 30 * 60 * 1000, 2 * 60 * 60 * 1000]; // 0, 5min, 30min, 2hr
try {
await sendSMS(phoneNumber, message);
console.log(`SMS delivered on attempt ${attempt}`);
} catch (error) {
if (attempt < backoffTimes.length) {
console.log(`SMS failed, retry in ${backoffTimes[attempt] / 60000} minutes`);
setTimeout(() => sendWithFallback(phoneNumber, message, attempt + 1), backoffTimes[attempt]);
} else {
console.error('SMS failed after 3 attempts, using fallback channel');
await sendEmail(phoneNumber, message); // Alternative channel
}
}
}Production Deployment Considerations
Monitoring and Alerting
Track these key metrics in production:
| Metric | Target | Purpose |
|---|---|---|
| Validation Error Rate | <2% | Monitor rejected numbers in well-designed forms |
| IPMS Lookup Latency | <200ms p95, <500ms p99 | Track response times |
| SMS Delivery Rate | >98% | Monitor successful deliveries for valid numbers |
| Cache Hit Rate | >85% | Track carrier lookup cache effectiveness |
Tools: Datadog, New Relic, Prometheus/Grafana, or CloudWatch for AWS deployments
Performance Optimization
| Optimization | Implementation | Benefit |
|---|---|---|
| Connection Pooling | Maintain 5-10 persistent connections per service | Reduce IPMS/SMS gateway API latency |
| Batch Processing | Group 50-100 numbers per batch | Efficient bulk carrier lookups |
| Database Indexing | Use B-tree indexes on phone number columns | Fast lookups |
| Caching | Redis or Memcached with 7-14 day TTL | Reduce lookup costs |
Security
Protect phone number data under New Zealand Privacy Act 2020 and Telecommunications Information Privacy Code 2020:
| Security Control | Implementation | Compliance |
|---|---|---|
| Encryption at Rest | AES-256 for database storage | Privacy Act 2020 |
| Encryption in Transit | TLS 1.2+ for all API communications | Privacy Act 2020 |
| Access Controls | Role-based access control (RBAC) | Limit access to authorized personnel |
| Audit Logging | Log all access, modifications, carrier lookups | Compliance tracking |
| Data Minimization | Purge inactive numbers after 12-24 months | Store only necessary data |
Regulatory Compliance
Telecommunications operators and service providers in New Zealand must comply with multiple regulatory frameworks:
Number Administration Deed (NAD) Compliance:
| Requirement | Action | Deadline |
|---|---|---|
| Number Allocation | Obtain from NAD 5 | Before operating |
| Management Fees | Pay annual fees | Varies by allocation size |
| Usage Reporting | Report changes to NAD registry | Within 10 business days |
| Allocation Rules | Follow Number Allocation Rules v7.1 (May 2022) 5 | Ongoing |
| Record Keeping | Maintain accurate allocation records | For audit purposes |
Commerce Commission Requirements:
| Requirement | Action | Details |
|---|---|---|
| LMNP Registration | Register as party to LMNP Determination 4 | Required for PSTN/mobile network operators |
| Service Quality | Comply with retail standards | Customer service, faults, installations |
| Outage Reporting | Report within 24 hours | Outages affecting >1,000 customers |
| Operational Separation | Maintain wholesale/retail separation | If applicable |
Telecommunications Forum (TCF) Obligations:
| Requirement | Action | Details |
|---|---|---|
| Industry Codes | Sign and comply with TCF codes | Customer Transfer, Emergency Calling, Mobile Messaging Services |
| IPMS Cost Allocation | Participate in cost sharing 2 | NZD $50,000-$200,000 annually (varies by market share) |
| Portability Timeframes | Implement within mandated periods 4 | Mobile: 1-2 business days, Landline: 1-5 business days |
For Developers and Third-Party Services:
| Requirement | Action | Details |
|---|---|---|
| NAD Membership | Not required | Unless allocating numbers directly |
| SMS Content Compliance | Follow Unsolicited Electronic Messages Act 2007 | Required for all messaging |
| Marketing Consent | Obtain opt-in before sending | User consent required |
| Unsubscribe Mechanism | Include in all marketing SMS | Required by law |
| Do Not Call Register | Respect for voice calls | Check https://www.donotcall.gov.nz/ |
Regulatory Bodies:
| Body | Role | URL |
|---|---|---|
| Number Administration Deed (NAD) 5 | Centralized administration of numbering resources | https://www.nad.org.nz/ |
| Commerce Commission 4 | Regulates under Telecommunications Act 2001 | https://comcom.govt.nz/ |
| New Zealand Telecommunications Forum (TCF) 5 | Manages number portability and industry codes | https://www.tcf.org.nz/ |
Frequently Asked Questions
What is the country code for New Zealand phone numbers?
New Zealand's international country code is +64. Dial +64 followed by the area code (without the leading 0) and local number when calling from outside New Zealand. For example, +64 3 123 4567 reaches a Christchurch landline, and +64 21 123 4567 reaches a One NZ mobile number.
How do I validate New Zealand mobile phone numbers?
Use the pattern 02[012789] followed by 7 – 9 additional digits (8 – 10 digits total after 02) to validate New Zealand mobile numbers. Mobile prefixes include 021 (One NZ), 022 (2degrees), 027 (Spark), 028 (Spark/CallPlus), and 029 (One NZ). Match these formats with regex patterns to ensure proper validation of the complete number structure.
What are the area codes for New Zealand regions?
New Zealand uses 5 geographic area codes: 03 (South Island and Chatham Islands), 04 (Wellington metro and Kāpiti Coast), 06 (Lower North Island including Taranaki, Hawke's Bay, Gisborne, Wairarapa), 07 (Central North Island including Hamilton, Tauranga, Rotorua), and 09 (Auckland and Northland). These single-digit codes precede 7-digit local numbers.
How does Mobile Number Portability work in New Zealand?
Mobile Number Portability (MNP) has operated in New Zealand since 1 April 2007. Users can switch carriers while keeping their phone numbers through a centralized Internet Protocol Management System (IPMS) maintained by the Telecommunications Forum (TCF). Text any number to 300 (free service from 2degrees) to determine its current carrier.
What is the difference between 0800 and 0508 numbers?
Both 0800 and 0508 are toll-free number prefixes in New Zealand. Telecom (now Spark) originally used the 0800 range exclusively, while Clear Communications introduced 0508 as a competitive toll-free option. Today, multiple network operators sell both ranges. Both prefixes use 6 – 7 digits and are free to call from New Zealand landlines and mobiles.
How do I format New Zealand phone numbers for international display?
Use E.164 international format for New Zealand numbers: +64 [area code without 0] [local number]. Examples: +64 3 123 4567 (landline), +64 21 123 4567 (mobile). Domestically, use the leading 0: 03 123 4567 (landline) or 021 123 4567 (mobile). Separate the area/mobile prefix from the local number with a space for readability.
What emergency numbers are available in New Zealand?
Dial 111 for all emergency services in New Zealand (Police, Fire, Ambulance). This number works from any phone. GSM mobiles can also dial 112 (international emergency number). For non-emergency police matters, dial 105. All emergency numbers work without credit on mobile phones and receive priority in congested networks.
What is the Number Administration Deed (NAD)?
The Number Administration Deed (NAD) provides centralized and independent administration of New Zealand's telecommunications numbering resources. NAD manages number allocations, maintains the numbering plan, and ensures regulatory compliance. All providers must follow NAD standards when assigning and managing phone numbers.
Can I port my landline number in New Zealand?
Yes, Local Number Portability lets you keep your landline number when switching providers. This service has been available since the early 2000s alongside Mobile Number Portability. The Telecommunications Act 2001 regulates both services, with Commerce Commission determinations issued in 2005, 2010, 2016, and reviewed in 2021.
What are premium rate numbers in New Zealand?
Premium rate numbers in New Zealand use the 0900 prefix followed by 5 digits (e.g., 0900 12345). These numbers charge higher rates for services like voting lines, adult content, and information services. The calling party pays the premium fee, split between the telecommunications provider and the service provider. Check rates before calling 0900 numbers.
Summary
You now understand New Zealand's phone numbering system: +64 country code, geographic area codes (03, 04, 06, 07, 09), and mobile network prefixes (021, 022, 027, 028, 029). Use validation regex patterns for landline, mobile, toll-free (0800/0508), and premium (0900) numbers with proper international and domestic formatting.
Mobile Number Portability (MNP) operates through the centralized IPMS system managed by the Telecommunications Forum (TCF) since 1 April 2007. Query the IPMS database through approved access (NAD membership required) or third-party services like WebSMS. Implement 7-14 day caching for carrier lookups to reduce latency and costs.
Validation prevents delivery failures (saving 5-15 cents per failed SMS), improves user experience, and ensures regulatory compliance. Protect phone number data under Privacy Act 2020 with AES-256 encryption, TLS 1.2+, and role-based access controls.
The Number Administration Deed (NAD) governs numbering resource administration. The Commerce Commission regulates telecommunications services under the Telecommunications Act 2001. Comply with Unsolicited Electronic Messages Act 2007 and obtain user consent for marketing messages.
Extend your implementation with:
- Real-time IPMS Integration: Apply for TCF access (https://www.tcf.org.nz/) or integrate WebSMS API (https://websms.co.nz/)
- Caching Layer: Implement Redis with 7-14 day TTL, graceful degradation, and monitoring for 85%+ hit rate
- Geographic Services: Map area codes to regions for location-based features (03=South Island, 04=Wellington, 06=Lower North, 07=Central North, 09=Auckland)
- Emergency Detection: Use
isProtectedNumber()function to block emergency numbers (111, 112, 105) from automated dialing - Compliance Monitoring: Track NAD reporting deadlines, Commerce Commission service quality metrics, and TCF code obligations
- International Guides: Explore validation patterns for Australia (AU), United Kingdom (UK), and United States phone numbers
References
Footnotes
-
Wikipedia. "Telephone numbers in New Zealand." https://en.wikipedia.org/wiki/Telephone_numbers_in_New_Zealand. Accessed October 2025. Confirms 8 – 10 digit mobile numbers, MNP implementation (1 April 2007), area code allocations, 0508 toll-free prefix, and emergency service numbers including 105. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9
-
New Zealand Telecommunications Forum (TCF). "Access to IPMS." https://www.tcf.org.nz/industry-hub/number-portability/access-to-ipms. Accessed October 2025. Details IPMS access requirements for network operators, resellers, SMS partners, and third-party developers. Prerequisites include NAD membership for full access or carrier endorsement for SMS partner access. ↩ ↩2 ↩3 ↩4 ↩5
-
Intersoft Systems. "New Zealand Phone Number validation." https://www.intersoft.co.nz/Support/KbArticle.aspx?id=20291. Technical validation rules: landlines begin 03/04/06/07/09 with 7-digit local numbers (excluding 0/1 start), mobiles begin 02 with 9-11 total digits, toll-free 0800/0508 with 10 digits, premium 0900 with 9-11 digits. ↩ ↩2 ↩3 ↩4 ↩5
-
New Zealand Commerce Commission. "Local and mobile number portability." https://www.comcom.govt.nz/regulated-industries/telecommunications/regulated-services/copper-services/local-and-mobile-number-portability/. Regulatory determinations for MNP issued in 2005, 2010, 2016, and reviewed in 2021 under the Telecommunications Act 2001. Specifies IPMS access requirements and porting timeframes (1-2 business days mobile, 1-5 business days landline). ↩ ↩2 ↩3 ↩4 ↩5
-
New Zealand Telecommunications Forum (TCF) and Number Administration Deed (NAD). https://www.tcf.org.nz/ and https://www.nad.org.nz/. Industry bodies managing number portability IPMS system and centralized numbering administration. NAD Rules v7.1 (May 2022) governs number allocation requirements. ↩ ↩2 ↩3 ↩4