E.164 & SMS Quick Reference: Integrate Malawi phone numbers with this comprehensive developer guide. Learn E.164 formatting, TNM/Airtel operator prefixes, MNP handling, validation regex, and MACRA compliance requirements. Need real-time carrier, porting, and line-type validation beyond regex? Run live lookups with SMSRoute HLR Lookup or send directly over Tier-1 routes via the SMSRoute SMS API.
Integrate Malawi phone numbers (+265) into your application with this comprehensive developer guide. Learn E.164 formatting, TNM and Airtel operator prefixes, dialing codes, emergency numbers, and validation best practices. This guide covers everything you need to work with Malawi's telecommunications infrastructure, including number portability and MACRA regulatory requirements.
Whether you're building SMS applications, implementing phone verification, or handling international calling, this guide provides the regex patterns, code examples, and best practices to validate and format Malawi phone numbers correctly.
How to Convert Malawi Phone Numbers to E.164 Format
The E.164 format standardizes phone numbers internationally using the structure +[country code][subscriber number] with a maximum of 15 digits.
Convert Malawi numbers to E.164:
- Mobile numbers: Remove the leading "0" and prepend "+265"
- Domestic: 0881234567 β E.164: +265881234567
- Domestic: 0991234567 β E.164: +265991234567
- Landline numbers: Remove the leading "0" and prepend "+265"
- Domestic: 01712345 β E.164: +2651712345
- Domestic: 01751234567 β E.164: +2651751234567
Validation rules for E.164:
- Must start with "+"
- Country code "265" follows immediately
- No spaces, hyphens, or parentheses
- Total length: 10β12 digits (including country code)
function toE164(malawianNumber) {
const cleaned = malawianNumber.replace(/[^\d+]/g, '');
if (cleaned.startsWith('+265')) {
return cleaned;
}
if (cleaned.startsWith('0')) {
return '+265' + cleaned.substring(1);
}
return '+265' + cleaned;
}
console.log(toE164('0881234567'));
console.log(toE164('01 712 345'));
console.log(toE164('+265991234567'));
Malawi Telecommunications Overview: Mobile Coverage & Network Operators
The Malawi Communications Regulatory Authority (MACRA) oversees the telecommunications sector and manages the numbering plan. Mobile services dominate the market, while fixed-line infrastructure exists primarily in urban areas. Understand these key characteristics when building applications for Malawi:
- Mobile Dominance: Mobile penetration reaches approximately 48% as of 2024, with 12.89 million mobile connections out of a total population of approximately 20 million, making cellular services the primary communication mode.
- Limited Fixed Lines: Traditional landline infrastructure remains less prevalent with fewer than 10,000 fixed-line connections. VoIP services are becoming increasingly common.
- Growing Data Services: According to MACRA data from Q3 2024, network coverage reached 90% for 2G, 89% for 3G, and 75.1% for 4G. TNM launched 5G in Lilongwe in July 2025, covering areas including BICC, Area 9, Kang'ombe, and Capital Hill.
- Internet Usage: Despite 75% 4G coverage, only 18% of Malawians actively used the internet in 2023 (ITU data), revealing gaps between network availability and adoption.
Malawi Country Code and Numbering Plan Elements
- Country Code: +265
- National Prefix: 0
- International Prefix: 00
- NSN Length: 7β9 digits (per ITU National Numbering Plan)
How to Dial Malawi Phone Numbers (Domestic & International)
Dialing Within Malawi (Domestic Format)
Format landline calls as 0 + Local Number. Malawi has no traditional area codes β the digits after "0" reflect the original geographic region but aren't strictly enforced.
Landline number lengths:
- 7-digit landlines: Older format, primarily legacy numbers (e.g., 01712345)
- 9-digit landlines: Current standard format (e.g., 0175123456)
Geographic number allocations (MACRA Numbering Plan, effective 2009):
| Prefix | Operator | Type | Example |
|---|---|---|---|
| 01 | Malawi Telecom Ltd | Geographic (landline) | 0171234567 |
| 21 | Access Communications Ltd (ACL) | Geographic | 0211234567 |
Format mobile calls as 0 + Operator Prefix + Subscriber Number:
| Operator | Prefix | Example Number | Notes |
|---|---|---|---|
| TNM (Telekom Networks Malawi) | 088 | 0881234567 | Primary prefix; may also use 084 for legacy numbers |
| Airtel Malawi | 099, 098 | 0991234567, 0981234567 | Previously Zain; 099 is primary, 098 legacy |
| Access Communications | 022 | 0221234567 | Data-focused services |
Note: Malawi has two primary mobile operators (TNM and Airtel). No MVNOs currently operate in the market as of 2025. The market is dominated by these two licensed operators who hold spectrum allocations from MACRA.
Dial emergency services at 997 (Police), 998 (Fire), or 999 (Ambulance). These numbers are free from any phone, including locked mobiles.
How to Call Malawi from Abroad (International Dialing)
Call Malawi from abroad: Replace the leading "0" with "+265" (e.g., +265881234567).
Call overseas from Malawi: Dial 00 + Country Code + Number.
Malawi Mobile Number Portability (MNP): Status & Developer Guide
Mobile Number Portability (MNP) in Malawi is in active procurement and implementation stages. As of April 2025, MACRA issued an invitation for applications for an Individual Licence to operate a Mobile Number Portability (MNP) Clearing House in Malawi. This infrastructure enables subscribers to switch operators while retaining their existing numbers.
MNP Status: Implementation phase; not yet operational for consumers (as of October 2025)
Expected Timeline: MNP systems typically require 2β3 years from licensing to full launch (industry standard)
MNP Process Flow (once operational):
Subscriber Request β Validation β Port Request β Clearing House Processing β
Database Update β Service Migration (24β48 hours)
Developer Considerations:
- Current state: Operator prefixes (088 for TNM, 099/098 for Airtel) reliably indicate the current network operator until MNP goes live
- Future-proofing: Design systems with MNP in mind. Do not hard-code operator identification based solely on prefixes
- Database lookups: Once MNP launches, integrate with the MACRA MNP database or clearing house API for real-time operator identification
- Fallback logic: Implement graceful degradation if MNP lookup services are unavailable
MACRA MNP Resources:
- Contact MACRA Telecommunications Directorate: +265 (0) 1 810 497
- Email: kelious.mlenga@macra.mw
- Official website: https://macra.mw
Malawi Phone Number Validation: Regex Patterns & Code Examples
Input Normalization
Always normalize user input before validation to handle various formatting styles:
function normalizePhoneNumber(input) {
return input.replace(/[\s\-\(\)\.]/g, '');
}
console.log(normalizePhoneNumber('088 123 4567'));
console.log(normalizePhoneNumber('(088) 123-4567'));
console.log(normalizePhoneNumber('+265 88 123 4567'));
Phone Number Validation Regex for Malawi (JavaScript, Python, PHP, Java)
Validate Malawian phone numbers using regular expressions. Examples provided in multiple languages:
JavaScript:
function validateMalawianNumber(phoneNumber) {
const normalized = phoneNumber.replace(/[\s\-\(\)\.]/g, '');
const patterns = {
mobile: /^0(88|99|98|84)\d{7}$/,
landline: /^0(1[1-9]|2[12])\d{6,7}$/,
emergency: /^99[7-9]$/,
e164Mobile: /^\+2650?(88|99|98|84)\d{7}$/,
e164Landline: /^\+2650?(1[1-9]|2[12])\d{6,7}$/
};
for (const [type, pattern] of Object.entries(patterns)) {
if (pattern.test(normalized)) {
return type;
}
}
return false;
}
console.log(validateMalawianNumber('0881234567'));
console.log(validateMalawianNumber('017712345'));
console.log(validateMalawianNumber('997'));
console.log(validateMalawianNumber('+265881234567'));
console.log(validateMalawianNumber('0123456'));
Python:
import re
def validate_malawian_number(phone_number):
"""Validate Malawian phone numbers."""
normalized = re.sub(r'[\s\-\(\)\.]', '', phone_number)
patterns = {
'mobile': r'^0(88|99|98|84)\d{7}$',
'landline': r'^0(1[1-9]|2[12])\d{6,7}$',
'emergency': r'^99[7-9]$',
'e164_mobile': r'^\+2650?(88|99|98|84)\d{7}$',
'e164_landline': r'^\+2650?(1[1-9]|2[12])\d{6,7}$'
}
for type_name, pattern in patterns.items():
if re.match(pattern, normalized):
return type_name
return False
print(validate_malawian_number('0881234567'))
print(validate_malawian_number('017712345'))
print(validate_malawian_number('+265881234567'))
print(validate_malawian_number('0123456'))
PHP:
<?php
function validateMalawianNumber($phoneNumber) {
$normalized = preg_replace('/[\s\-\(\)\.]/', '', $phoneNumber);
$patterns = [
'mobile' => '/^0(88|99|98|84)\d{7}$/',
'landline' => '/^0(1[1-9]|2[12])\d{6,7}$/',
'emergency' => '/^99[7-9]$/',
'e164_mobile' => '/^\+2650?(88|99|98|84)\d{7}$/',
'e164_landline' => '/^\+2650?(1[1-9]|2[12])\d{6,7}$/'
];
foreach ($patterns as $type => $pattern) {
if (preg_match($pattern, $normalized)) {
return $type;
}
}
return false;
}
echo validateMalawianNumber('0881234567');
echo validateMalawianNumber('017712345');
echo validateMalawianNumber('+265881234567');
?>
Java:
import java.util.regex.Pattern;
import java.util.regex.Matcher;
public class MalawiPhoneValidator {
public static String validateMalawianNumber(String phoneNumber) {
String normalized = phoneNumber.replaceAll("[\\s\\-\\(\\)\\.]", "");
String[][] patterns = {
{"mobile", "^0(88|99|98|84)\\d{7}$"},
{"landline", "^0(1[1-9]|2[12])\\d{6,7}$"},
{"emergency", "^99[7-9]$"},
{"e164_mobile", "^\\+2650?(88|99|98|84)\\d{7}$"},
{"e164_landline", "^\\+2650?(1[1-9]|2[12])\\d{6,7}$"}
};
for (String[] patternPair : patterns) {
Pattern p = Pattern.compile(patternPair[1]);
Matcher m = p.matcher(normalized);
if (m.matches()) {
return patternPair[0];
}
}
return "false";
}
public static void main(String[] args) {
System.out.println(validateMalawianNumber("0881234567"));
System.out.println(validateMalawianNumber("017712345"));
System.out.println(validateMalawianNumber("+265881234567"));
}
}
Edge Cases and Limitations
Handle these edge cases in your validation logic:
- International format input: Accept both domestic (0881234567) and international (+265881234567) formats
- Leading zeros in E.164: Some users may incorrectly include the leading zero in international format (+2650881234567); strip this if detected
- Short codes: Premium SMS services and USSD codes (e.g., \*123#) follow different patterns and are not covered by standard validation
- Legacy numbers: Pre-2009 numbering plan formats may still exist in older databases; consult the MACRA numbering allocation table for historical formats
- Whitespace variations: Users may input numbers with inconsistent spacing; always normalize before validation
Error Handling
Implement comprehensive error handling with specific error codes:
class PhoneValidationError extends Error {
constructor(code, message, phoneNumber) {
super(message);
this.code = code;
this.phoneNumber = phoneNumber;
this.name = 'PhoneValidationError';
}
}
function validateWithErrors(phoneNumber) {
const normalized = phoneNumber.replace(/[\s\-\(\)\.]/g, '');
if (!normalized) {
throw new PhoneValidationError(
'EMPTY_INPUT',
'Phone number cannot be empty',
phoneNumber
);
}
if (!/^[\d+]+$/.test(normalized)) {
throw new PhoneValidationError(
'INVALID_CHARACTERS',
'Phone number contains invalid characters',
phoneNumber
);
}
if (normalized.length < 3 || normalized.length > 15) {
throw new PhoneValidationError(
'INVALID_LENGTH',
'Phone number length is outside valid range (3β15 digits)',
phoneNumber
);
}
const type = validateMalawianNumber(normalized);
if (!type) {
throw new PhoneValidationError(
'INVALID_FORMAT',
'Phone number does not match any valid Malawian format',
phoneNumber
);
}
return { valid: true, type, normalized };
}
try {
const result = validateWithErrors('088 123 4567');
console.log('Valid:', result.type, result.normalized);
} catch (error) {
if (error instanceof PhoneValidationError) {
console.error(`Error ${error.code}: ${error.message}`);
console.error(`Input: ${error.phoneNumber}`);
}
}
Common error codes:
- EMPTY_INPUT β Phone number is empty or null
- INVALID_CHARACTERS β Contains non-numeric characters (except + for E.164)
- INVALID_LENGTH β Too short or too long
- INVALID_FORMAT β Doesn't match known Malawian number patterns
- INVALID_PREFIX β Starts with unrecognized operator or area prefix
Testing Strategies
Test cases for comprehensive validation:
const testCases = [
{ input: '0881234567', expected: 'mobile', description: 'TNM mobile' },
{ input: '0991234567', expected: 'mobile', description: 'Airtel mobile' },
{ input: '0981234567', expected: 'mobile', description: 'Airtel legacy' },
{ input: '+265881234567', expected: 'e164_mobile', description: 'E.164 mobile' },
{ input: '0171234567', expected: 'landline', description: '9-digit landline' },
{ input: '01712345', expected: 'landline', description: '7-digit landline' },
{ input: '997', expected: 'emergency', description: 'Police' },
{ input: '998', expected: 'emergency', description: 'Fire' },
{ input: '999', expected: 'emergency', description: 'Ambulance' },
{ input: '1234567', expected: false, description: 'Too short' },
{ input: '0771234567', expected: false, description: 'Invalid prefix' },
{ input: '088123456', expected: false, description: 'Too short for mobile' },
{ input: '+266881234567', expected: false, description: 'Wrong country code' },
{ input: '088 123 4567', expected: 'mobile', description: 'Spaced mobile' },
{ input: '(088) 123-4567', expected: 'mobile', description: 'Formatted mobile' },
];
testCases.forEach(test => {
const result = validateMalawianNumber(test.input);
const pass = result === test.expected;
console.log(`${pass ? 'β' : 'β'} ${test.description}: ${test.input} β ${result}`);
});
Handle Number Portability
Once MNP is operational, check portability status with this function:
async function checkNumberPortability(phoneNumber) {
try {
const portabilityStatus = await queryMACRADatabase(phoneNumber);
return {
isPortable: portabilityStatus.eligible,
currentOperator: portabilityStatus.currentOperator,
originalOperator: portabilityStatus.originalOperator || null,
portedDate: portabilityStatus.portedDate || null,
portingInProgress: portabilityStatus.portingInProgress || false
};
} catch (error) {
console.error('Portability check failed:', error);
const normalized = phoneNumber.replace(/[\s\-\(\)\.]/g, '');
const prefix = normalized.substring(0, 3);
const prefixMap = {
'088': 'TNM',
'084': 'TNM',
'099': 'Airtel',
'098': 'Airtel'
};
return {
isPortable: false,
currentOperator: prefixMap[prefix] || 'Unknown',
originalOperator: prefixMap[prefix] || 'Unknown',
portedDate: null,
portingInProgress: false,
fallbackUsed: true
};
}
}
Best Practices for Malawi Phone Number Validation
Validation:
- Normalize input before validation (remove spaces, hyphens, parentheses)
- Support both domestic and E.164 international formats
- Implement caching for validation results (TTL: 5β10 minutes)
- Log validation failures with input samples for pattern refinement
Error Handling:
- Use specific error codes (see Error Handling section above)
- Provide user-friendly error messages
- Implement graceful fallbacks when external services (MNP lookup) fail
- Never expose internal error details to end users
Performance:
- Cache MNP lookup results (TTL: 24 hours recommended once operational)
- Use regex compilation/precompilation for repeated validations
- Implement rate limiting for API-based validations
- Consider using a local phone number validation library (e.g., libphonenumber)
Security:
- Sanitize phone number inputs to prevent injection attacks
- Implement rate limiting on validation endpoints (e.g., 100 requests/minute/IP)
- Store phone numbers encrypted at rest
- Adhere to MACRA's SIM registration and data protection guidelines
- Never store phone numbers in application logs
- Implement PII redaction in error logs (e.g., 088\*\*\*\*567)
MACRA Compliance: Regulatory Requirements for Malawi Telecommunications
MACRA regulates Malawi's telecommunications sector and manages number allocation, SIM card registration, and technical standards enforcement. Developers and businesses must comply with these regulations:
SIM Registration Requirements
Biometric SIM Registration (2025): MACRA launched a mandatory biometric SIM card registration program beginning July 1, 2025, running through September 2025. The re-registration process by network providers runs from October 2025 through May 2026.
Key Requirements (Communications SIM-Card Registration Regulations 2023):
- Individual registration limit: Maximum of 5β10 SIM cards per person per network operator (varies by source; confirm current limit with MACRA)
- Corporate/institutional limit: Up to 30 SIM cards with proper business documentation
- Required information: National ID, biometric data (fingerprints or facial recognition), full name, date of birth, address
- Verification: Integration with National Registration Bureau (NRB) biometric ID system
- Penalties: Daily fines of K50,000 (individuals) or K150,000 (corporate entities) for non-compliance
Developer Implications:
- If your application involves SIM provisioning, user registration, or bulk SMS services, ensure compliance with registration limits
- Maintain audit trails linking phone numbers to verified user identities
- Implement verification checks against MACRA/NRB databases if building telecom applications
Data Protection and Privacy
Malawi's Data Protection Act, 2024 and Data Protection (Registration) Regulations 2025 govern personal data processing:
- Consent requirements: Obtain explicit consent before collecting or processing phone numbers
- Data retention: Define and document retention periods; delete data when no longer needed
- User rights: Provide mechanisms for users to access, correct, and delete their phone number data
- Cross-border transfers: Additional requirements apply when transferring phone number data outside Malawi
- Registration: Data controllers processing personal data must register with the Data Protection Authority
Bulk SMS and Commercial Messaging
Licensing requirements for bulk SMS:
- Commercial bulk SMS senders may require a Value-Added Services (VAS) license from MACRA
- Contact MACRA Telecommunications Directorate (+265 (0) 1 810 497) to confirm current licensing requirements
- Anti-spam regulations apply; maintain opt-out mechanisms and honor Do Not Disturb (DND) lists
Best practices:
- Implement double opt-in for marketing messages
- Include clear sender identification
- Provide easy opt-out instructions (e.g., "Reply STOP to unsubscribe")
- Maintain message sending rate limits per operator guidelines
Compliance Resources
- MACRA Official Website: https://macra.mw
- Regulations: https://macra.mw/regulations
- Numbering Plan: https://macra.mw/numbering
- Data Protection Authority: https://www.dpa.mw
- Contact MACRA:
- Phone: +265 (0) 1 810 497
- Email: kelious.mlenga@macra.mw
- Address: Area 13, Green Heritage House, P.O. Box 30214, Lilongwe 3, Malawi
TNM vs Airtel: Malawi Mobile Network Operators & Coverage
Malawi's telecommunications market is served by two major mobile network operators:
Telekom Networks Malawi (TNM)
- Market Position: Largest operator with approximately 45% mobile subscriber market share
- Services: Mobile voice, data (2G/3G/4G/5G), fixed wireless, and enterprise solutions
- 5G Launch: TNM launched 5G in Lilongwe in July 2025, covering key areas including BICC, Area 9, Capital Hill, and Kanengo
- Mobile Prefixes: 088 (primary), 084 (legacy)
- Network Coverage: Strong presence in urban and peri-urban areas; expanding rural coverage
Developer Resources:
- Contact TNM for API documentation and bulk messaging services
- Enterprise solutions and developer partnerships available
Airtel Malawi
- Market Position: Second-largest operator with strong presence in mobile money services
- Services: Mobile voice, data (2G/3G/4G), mobile money (Airtel Money), and enterprise solutions
- Subscriber Base: 8.1 million customers as of 2024, adding 1 million new customers in 2024
- Data Growth: 37.2% increase in data usage in 2024
- Mobile Prefixes: 099 (primary), 098 (legacy, previously Zain)
- Network Coverage: Comprehensive urban coverage; active rural expansion
Developer Resources:
- Airtel Money API available for mobile payments integration
- Enterprise bulk SMS and messaging APIs
Network Infrastructure Comparison
| Feature | TNM | Airtel |
|---|---|---|
| 5G Availability | β (Lilongwe, 2025) | In planning |
| 4G Coverage | Extensive | Extensive |
| Market Share | ~45% | ~40β45% |
| Mobile Money | TNM Mpamba | Airtel Money |
| API Availability | Enterprise APIs | Airtel Money API, bulk SMS |
Note: As of 2025, there are no active Mobile Virtual Network Operators (MVNOs) in Malawi. The market is served exclusively by licensed MNOs (TNM and Airtel) and fixed-line operators (Access Communications Ltd).
Common Issues: Troubleshooting Malawi Phone Number Integration
Issue: Validation Fails for Valid Numbers
Symptoms: Legitimate Malawian numbers rejected by validation logic
Causes:
- Incomplete prefix coverage (missing legacy prefixes 084, 098)
- Not handling formatted input (spaces, hyphens)
- Incorrect E.164 conversion
Solutions:
- Use the comprehensive regex patterns provided in this guide (include all prefixes: 088, 084, 099, 098)
- Always normalize input before validation
- Test with the provided test cases
Issue: MNP Lookup Unavailable
Symptoms: Cannot determine current operator due to MNP service outage
Solution:
- Implement fallback to prefix-based detection (see Handle Number Portability section)
- Cache MNP results to reduce real-time dependency
- Set appropriate timeout values (2β3 seconds maximum)
Issue: International Format Confusion
Symptoms: Users report numbers not accepted when dialing internationally
Causes:
- Incorrect E.164 conversion
- Including leading zero in international format
Solutions:
- Strip leading zero when converting to E.164
- Validate conversion with toE164() function provided above
- Display numbers in both formats to users: domestic and international
Issue: Rate Limiting on Bulk SMS
Symptoms: Messages fail to send or experience delays
Solutions:
- Implement message queuing with operator-recommended rate limits (typically 10β30 messages/second)
- Contact operators for bulk sender accounts with higher limits
- Distribute load across multiple sender IDs if permitted
Next Steps
You now have the foundation to work with Malawi's phone numbering system. To implement robust phone number handling:
- Implement validation using the multi-language regex patterns and normalization functions provided
- Design for MNP by avoiding hard-coded operator mappings and planning for future MNP database integration
- Ensure compliance with MACRA's SIM registration regulations and data protection requirements
- Test thoroughly using the test cases provided to cover edge cases and formatting variations
- Monitor and update your validation logic as MACRA releases numbering plan updates
Additional Resources:
- MACRA Numbering Plan β Official number allocations
- MACRA Regulations β SIM registration and compliance
- Data Protection Authority β Privacy compliance guidance
- ITU Malawi Country Profile β Telecommunications statistics
For technical support and regulatory guidance, contact MACRA directly at +265 (0) 1 810 497 or kelious.mlenga@macra.mw.
Validate & Send SMS to Malawi With SMSRoute
Regex catches syntax mistakes, but it cannot tell you whether a mobile number is active, ported to another carrier, or reachable over SMS. Before launching OTP or transactional campaigns into Malawi, pair E.164 normalization with live carrier intelligence and direct Tier-1 termination on SMSRoute.
curl -X POST https://api.sendsmsnokyc.com/v3/messages \
-H "x-api-key: $SMSROUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": ["+14155551234"],
"channel": ["sms"],
"body": "Your verification code is 482910"
}'
- Live HLR & Carrier Lookup: Verify active status, roaming, and current serving network before you pay to send via SMSRoute HLR Lookup.
- Handset-Verified Route Testing: Audit real SIM delivery, DLR latency, and Sender ID preservation with Live Carrier Testing.
- No-KYC Instant Onboarding: Fund with crypto (BTC/USDT) or card and check exact per-country rates on our live pricing page.
Deliver Global SMS With Direct Carrier Routes
Validate E.164 numbers with live HLR lookup and deliver high-priority OTPs and alerts across 190+ countries on SMSRoute.
Try SMSRoute HLR Lookup β