phone number standards
phone number standards
Tunisia Phone Number Format: +216 Country Code Validation Guide
Complete guide to Tunisia phone number format with +216 country code, 8-digit validation, area codes, and regex patterns. Learn E.164 formatting, operator prefixes (Tunisie Telecom, Ooredoo, Orange), mobile number portability, and implementation code for developers.
Tunisia Phone Numbers: Format, Area Code & Validation Guide
Introduction
Tunisia uses the +216 country code with an 8-digit phone number format for all standard numbers. This comprehensive guide covers everything developers need to validate, format, and handle Tunisian phone numbers correctly—from understanding area codes and operator prefixes to implementing Mobile Number Portability (MNP) and E.164 compliance.
Whether you're building authentication systems, SMS platforms, or call routing applications, you'll learn how to validate +216 numbers, implement proper formatting, handle carrier-specific routing, and integrate with Tunisia's telecommunications regulations managed by INT (Instance Nationale des Télécommunications).
Table of Contents
- Background on Tunisia's Telecommunications Landscape
- Number Formats in Tunisia
- Implementation Guide for Developers
- Handling Mobile Number Portability (MNP)
- Frequently Asked Questions
- Conclusion
Background on Tunisia's Telecommunications Landscape
Understand Tunisia's regulatory environment to implement reliable phone number handling. Tunisia's telecommunications sector operates under INT (Instance Nationale des Télécommunications) oversight, ensuring standardized numbering practices and consumer protection.
Market Overview (2024):
- Mobile penetration: 149.7% as of 2022 (U.S. International Trade Administration), with over 15.9 million mobile lines
- Operators: 4 licensed operators (Tunisie Telecom, Ooredoo, Orange Tunisia, Lycamobile)
- Market share (2024): Ooredoo leads with 41.84%, followed by Tunisie Telecom at 39.7%, and Orange Tunisia at 22.9% (Telecom Trust Consulting, December 2024)
- Internet subscribers: Over 12.3 million as of 2022, with 81.3% accessing via smartphones
Regulatory Framework:
The sector is regulated by INT (Instance Nationale des Télécommunications), Tunisia's telecommunications regulatory authority established under Tunisian law. INT oversees:
- Numbering plan allocation and management (INT Numérotation regulations)
- Mobile Number Portability (MNP) implementation (confirmed operational in ITU DataHub 2024)
- E.164 compliance enforcement per ITU-T E.164 standard
- Operator licensing and consumer protection
- Tariff approval and roaming agreements
Recent Regulatory Updates:
- July 2024: INT issued Decision Coll-Reg-2024-08 establishing new numbering plan management rules (INT official announcement)
- 5G Planning: Tunisia announced plans to launch 5G licenses by end of 2024, with INT completing feasibility studies on social and economic impact
Technical Standards:
- Country code: +216 (ITU-T E.164 compliant, registered with ITU)
- Number structure: 8-digit National Significant Number (NSN)
- MNP status: Fully operational across all 4 operators since implementation
- Emergency services: Standardized 1XX format (190, 193, 197, 198) per national regulations
Check INT's official website (intt.tn) for the latest regulatory updates, numbering plan changes, and operator licensing information.
Number Formats in Tunisia
How many digits is a Tunisia phone number? All Tunisian phone numbers use exactly 8 digits (the National Significant Number or NSN), preceded by the +216 country code for international dialing. Tunisia follows ITU-T E.164, the international standard for telephone numbering.
E.164 Structure:
| Component | Value | Notes |
|---|---|---|
| Country Code | +216 | Required for international dialing |
| NSN Length | 8 digits | No area code/subscriber split |
| International Format | +216 XX XXX XXX | Use for storage and APIs |
| National Format | XX XXX XXX | Use for local display |
Key characteristics:
- Uniform length: All standard numbers use exactly 8 digits (emergency numbers use 3)
- No area code split: The 8-digit NSN is not divided into area code and subscriber number
- Predictable patterns: First 2 digits identify number type (landline, mobile, special service)
- E.164 compliance: Mandatory for all operators per INT regulations
This consistent structure simplifies parsing, validation, and international dialing integration.
Geographic Numbers (Landlines)
Identify landline regions using the first two digits of the 8-digit NSN. Geographic numbers always start with 7 followed by a region digit (1-8).
Regional Prefix Map:
| Prefix | Region | Major Cities/Governorates |
|---|---|---|
| 71 | Greater Tunis | Tunis, Ariana, Ben Arous, Manouba |
| 72 | Northern Tunisia | Bizerte, Béja, Jendouba, Kef, Siliana |
| 73 | Central-East Coast | Sousse, Monastir, Mahdia, Kairouan |
| 74 | South-East | Sfax, Gabès, Médenine, Tataouine |
| 75 | Central-West | Kasserine, Sidi Bouzid, Gafsa |
| 76 | North-West | Zaghouan, Nabeul |
| 77 | Reserved/Special | Reserved for future allocation |
| 78 | South-West | Tozeur, Kébili |
Format Patterns:
- Structure:
7X XXX XXX(7 + region digit + 6 digits) - Example:
71 234 567(Greater Tunis region) - International:
+216 71 234 567
Validation Regex:
^7[1-8]\d{6}$Note: Legacy patterns include 3[0-2] for special geographic prefixes. For standard landline validation, use 7[1-8] patterns exclusively.
Implementation strategy:
- Extract first 2 digits to identify region
- Validate 8-digit length requirement
- Confirm prefix matches
7[1-8]pattern - Store in E.164 format:
+21671234567
Mobile Numbers
Tunisian mobile numbers start with 2, 4, 5, or 9 followed by 7 more digits. Validate mobile numbers using operator-allocated prefixes, but never rely on prefixes for carrier identification due to Mobile Number Portability (MNP).
Operator Prefix Allocations (INT-assigned):
| Prefix Range | Original Operator | Launch Year | Notes |
|---|---|---|---|
| 20-29 | Tunisie Telecom | Legacy | State-owned incumbent |
| 50-59 | Ooredoo Tunisia | 2002 | Formerly Tunisiana |
| 90-99 | Orange Tunisia | 2010 | Third major operator |
| 40-49 | Lycamobile/Reserved | 2010s | Smaller operator/future allocation |
Format Patterns:
- Structure:
XX XXX XXX(8 digits total) - Example:
20 123 456(originally Tunisie Telecom) - International:
+216 20 123 456
Validation Regex:
^(2[0-9]|4[0-9]|5[0-9]|9[0-9])\d{6}$Critical: MNP Impact on Development
⚠️ Operator prefixes no longer guarantee the current carrier. A number starting with 20 (Tunisie Telecom allocation) may now be served by Ooredoo or Orange after porting.
Do NOT use prefixes for:
- Carrier-specific billing rates
- Call routing decisions
- Operator-specific API selection
- SIM card provisioning
DO use MNP lookup for:
- Real-time carrier identification (query INT's MNP database)
- Accurate routing to current operator
- Billing rate determination
- Carrier-specific feature availability
Implementation requirements:
- Validate format using regex patterns
- Query MNP database for current operator (if carrier identification needed)
- Cache MNP results for 24-48 hours to optimize performance
- Implement fallback to prefix-based lookup if MNP query fails
Use prefix-based identification only as a fallback when MNP lookup services are unavailable.
Emergency Service Numbers
Never block or filter emergency numbers in your application. Tunisia uses standardized 1XX emergency numbers accessible from any device, including phones without SIM cards or with blocked accounts.
Emergency Numbers (24/7 Availability):
| Number | Service | Organization | Response |
|---|---|---|---|
| 190 | Ambulance | SAMU (Emergency Medical Services) | Emergency medical services |
| 193 | National Guard | Gendarmerie Nationale | Rural/highway emergencies |
| 197 | Police | National Police | Emergency dispatch |
| 198 | Fire Brigade | Civil Protection (Pompiers) | Fire and rescue |
Source: U.S. Embassy Tunisia Emergency Assistance, UK Foreign Travel Advice, verified across multiple official government sources.
Regulatory Requirements (INT-Mandated):
Per INT regulations, you must:
- Allow emergency calls even when device has no credit, no SIM, or blocked account
- Never apply rate limiting to emergency number dialing attempts
- Prioritize routing for emergency calls over regular traffic
- Route at no charge – operators must handle emergency calls free of charge
Implementation Checklist:
✅ Exclude emergency numbers from validation that blocks "invalid" numbers ✅ Allow emergency calls in offline/airplane mode ✅ Skip authentication requirements for emergency dialing ✅ Disable call duration limits for emergency numbers ✅ Log emergency call attempts for compliance auditing
Testing Guidelines:
❌ Never test with live emergency calls – you'll tie up actual emergency services ✅ Use INT-approved test numbers – request from INT or your operator ✅ Simulate emergency routing in development environments ✅ Test validation bypass – ensure emergency numbers pass through filters
Validation pattern:
^(190|193|197|198)$Handle emergency numbers as a distinct category in your validation logic – they follow 3-digit format unlike standard 8-digit numbers.
Special Service Numbers
Identify and handle special service numbers separately due to billing implications. These 8X prefix numbers have distinct charging models regulated by INT.
Service Types and Billing Models:
| Prefix | Service Type | French Name | Billing Model | Use Cases |
|---|---|---|---|---|
| 80 | Toll-Free | Numéro Vert | Caller: Free / Recipient: Full cost | Customer support, hotlines |
| 81 | Shared Cost | Numéro Azur | Caller: Partial / Recipient: Partial | Technical support, information lines |
| 88 | Premium Rate | Numéro Indigo | Caller: Premium rates | Entertainment, paid information services |
Format Patterns:
- Structure:
8X XXX XXX(80/81/88 + 6 digits) - Examples:
- Toll-free:
80 100 123 - Shared cost:
81 234 567 - Premium rate:
88 123 456
- Toll-free:
Validation Regex:
^(80|81|88)\d{6}$Regulatory Compliance (INT Requirements):
You must:
- Display cost warnings before connecting premium rate (88) calls
- Obtain user consent before dialing premium rate numbers
- Provide cost information – show per-minute rates when available
- Implement parental controls – optionally block premium rate for child accounts
Implementation Requirements:
// Example: Show warning before premium rate call
function dialSpecialService(number) {
const prefix = number.substring(0, 2);
if (prefix === '88') {
// Required: Display warning for premium rate
showWarning('Premium rate call. Higher charges apply. Continue?');
} else if (prefix === '81') {
showInfo('Shared cost call. Standard rates apply.');
}
// 80 (toll-free) requires no warning
// Proceed with call after user confirmation
}Billing Distinction:
- Validation: Treat special service numbers as valid but distinct from mobile/landline
- Routing: May use different routing paths than standard calls
- Display: Label clearly (e.g., "Toll-Free", "Premium Rate") in call logs
- Analytics: Track separately for billing analysis and fraud detection
Implement clear visual indicators (icons, colors, text labels) to distinguish premium rate numbers from standard calls.
Implementation Guide for Developers
Implement Tunisian phone number handling with these production-ready code examples. All examples follow E.164 standards and INT regulatory requirements.
Validation and Formatting in JavaScript
Here's how to validate and format Tunisian phone numbers using JavaScript with E.164 compliance:
- Comprehensive Validation:
// Tunisian mobile numbers (20-29, 40-49, 50-59, 90-99)
const mobileRegex = /^(2[0-9]|4[0-9]|5[0-9]|9[0-9])\d{6}$/;
// Tunisian landline numbers (71-78 for standard geographic)
const landlineRegex = /^7[1-8]\d{6}$/;
// Special service numbers (80, 81, 88)
const specialServiceRegex = /^(80|81|88)\d{6}$/;
// Emergency numbers (190, 193, 197, 198)
const emergencyRegex = /^(190|193|197|198)$/;
// Validate any Tunisian number
function validateTunisianNumber(number) {
// Remove spaces, hyphens, and country code
const cleaned = number.replace(/[\s\-+]/g, '').replace(/^216/, '');
return {
isMobile: mobileRegex.test(cleaned),
isLandline: landlineRegex.test(cleaned),
isSpecialService: specialServiceRegex.test(cleaned),
isEmergency: emergencyRegex.test(cleaned),
isValid: mobileRegex.test(cleaned) || landlineRegex.test(cleaned) ||
specialServiceRegex.test(cleaned) || emergencyRegex.test(cleaned)
};
}
// Example usage
console.log(validateTunisianNumber("20123456"));
// { isMobile: true, isLandline: false, isSpecialService: false, isEmergency: false, isValid: true }
console.log(validateTunisianNumber("+216 71 234 567"));
// { isMobile: false, isLandline: true, isSpecialService: false, isEmergency: false, isValid: true }
console.log(validateTunisianNumber("190"));
// { isMobile: false, isLandline: false, isSpecialService: false, isEmergency: true, isValid: true }This validation function handles all Tunisian number types and strips common formatting before validation.
- Number Formatting (E.164 and Local):
function formatTunisianNumber(number, format = 'local') {
// Remove all non-digit characters
let cleaned = number.replace(/\D/g, '');
// Remove country code if present
if (cleaned.startsWith('216')) {
cleaned = cleaned.substring(3);
}
// Handle emergency numbers (3 digits)
if (cleaned.length === 3 && /^(190|193|197|198)$/.test(cleaned)) {
return cleaned; // Emergency numbers don't need formatting
}
// Validate length (must be 8 digits for standard numbers)
if (cleaned.length !== 8) {
throw new Error('Invalid Tunisian phone number length. Expected 8 digits.');
}
// Format based on requested output
switch (format) {
case 'e164':
// ITU-T E.164 international format
return `+216${cleaned}`;
case 'international':
// International format with spacing
return `+216 ${cleaned.slice(0, 2)} ${cleaned.slice(2, 5)} ${cleaned.slice(5)}`;
case 'local':
default:
// Local format with spacing
return `${cleaned.slice(0, 2)} ${cleaned.slice(2, 5)} ${cleaned.slice(5)}`;
}
}
// Example usage
console.log(formatTunisianNumber("20123456", "e164")); // Output: +21620123456
console.log(formatTunisianNumber("20123456", "international")); // Output: +216 20 123 456
console.log(formatTunisianNumber("+216 71 234 567", "local")); // Output: 71 234 567
console.log(formatTunisianNumber("190")); // Output: 190 (emergency numbers unchanged)This enhanced formatter supports E.164 format (required for international SMS/voice APIs), international display format, and local Tunisian format.
Advanced Implementation with TypeScript
For type-safe phone number handling, define comprehensive interfaces and enums:
// Enum for number types
enum TunisianNumberType {
MOBILE = 'mobile',
LANDLINE = 'landline',
TOLL_FREE = 'toll_free',
SHARED_COST = 'shared_cost',
PREMIUM_RATE = 'premium_rate',
EMERGENCY = 'emergency'
}
// Enum for operators (note: MNP means prefix doesn't guarantee current operator)
enum MobileOperator {
TUNISIE_TELECOM = 'Tunisie Telecom',
OOREDOO = 'Ooredoo',
ORANGE = 'Orange Tunisia',
LYCAMOBILE = 'Lycamobile',
UNKNOWN = 'Unknown'
}
// Geographic regions for landlines
enum GeographicRegion {
TUNIS = 'Greater Tunis',
NORTH = 'Northern Tunisia',
CENTRAL_EAST = 'Central-East Coast',
SOUTH_EAST = 'South-East',
CENTRAL_WEST = 'Central-West',
NORTH_WEST = 'North-West',
SOUTH_WEST = 'South-West'
}
// Main phone number interface
interface TunisianPhoneNumber {
countryCode: '+216';
nsn: string; // National Significant Number (8 digits)
numberType: TunisianNumberType;
allocatedOperator?: MobileOperator; // Prefix-based operator (may differ due to MNP)
currentOperator?: MobileOperator; // Actual operator (requires MNP lookup)
region?: GeographicRegion; // For landline numbers
e164Format: string; // +21620123456
localFormat: string; // 20 123 456
}
// Validation result interface
interface ValidationResult {
valid: boolean;
numberType?: TunisianNumberType;
errors: string[];
warnings: string[];
}
// Example class with validation methods
class TunisianPhoneValidator {
static validate(number: string): ValidationResult {
const cleaned = number.replace(/[\s\-+]/g, '').replace(/^216/, '');
const errors: string[] = [];
const warnings: string[] = [];
let numberType: TunisianNumberType | undefined;
// Emergency numbers
if (/^(190|193|197|198)$/.test(cleaned)) {
return { valid: true, numberType: TunisianNumberType.EMERGENCY, errors: [], warnings: [] };
}
// Check 8-digit requirement
if (cleaned.length !== 8) {
errors.push(`Invalid length: expected 8 digits, got ${cleaned.length}`);
return { valid: false, errors, warnings };
}
// Check number type
if (/^(2[0-9]|4[0-9]|5[0-9]|9[0-9])\d{6}$/.test(cleaned)) {
numberType = TunisianNumberType.MOBILE;
warnings.push('Operator prefix may not reflect current operator due to MNP');
} else if (/^7[1-8]\d{6}$/.test(cleaned)) {
numberType = TunisianNumberType.LANDLINE;
} else if (/^80\d{6}$/.test(cleaned)) {
numberType = TunisianNumberType.TOLL_FREE;
} else if (/^81\d{6}$/.test(cleaned)) {
numberType = TunisianNumberType.SHARED_COST;
warnings.push('Shared cost number - caller and recipient split charges');
} else if (/^88\d{6}$/.test(cleaned)) {
numberType = TunisianNumberType.PREMIUM_RATE;
warnings.push('Premium rate number - higher charges apply');
} else {
errors.push('Number does not match any known Tunisian format');
return { valid: false, errors, warnings };
}
return { valid: true, numberType, errors: [], warnings };
}
static determineAllocatedOperator(nsn: string): MobileOperator {
const prefix = nsn.substring(0, 2);
if (/^2[0-9]$/.test(prefix)) return MobileOperator.TUNISIE_TELECOM;
if (/^5[0-9]$/.test(prefix)) return MobileOperator.OOREDOO;
if (/^9[0-9]$/.test(prefix)) return MobileOperator.ORANGE;
if (/^4[0-9]$/.test(prefix)) return MobileOperator.LYCAMOBILE;
return MobileOperator.UNKNOWN;
}
static getRegion(nsn: string): GeographicRegion | undefined {
const prefix = nsn.substring(0, 2);
const regionMap: Record<string, GeographicRegion> = {
'71': GeographicRegion.TUNIS,
'72': GeographicRegion.NORTH,
'73': GeographicRegion.CENTRAL_EAST,
'74': GeographicRegion.SOUTH_EAST,
'75': GeographicRegion.CENTRAL_WEST,
'76': GeographicRegion.NORTH_WEST,
'78': GeographicRegion.SOUTH_WEST
};
return regionMap[prefix];
}
}
// Example usage
const result = TunisianPhoneValidator.validate('+216 20 123 456');
console.log(result);
// { valid: true, numberType: 'mobile', errors: [], warnings: ['Operator prefix may not reflect...'] }This TypeScript implementation provides type safety, comprehensive validation, and clear error/warning messages for production applications.
Geographic Number Validation with Area Code Check
Enhance validation by verifying both format and area code validity:
// Validate geographic numbers with explicit area code checking
function validateGeographicNumber(number) {
// Remove whitespace and formatting
const cleanNumber = number.replace(/\s+/g, '');
// Extract first 2 digits (area code)
const areaCode = cleanNumber.substring(0, 2);
// Valid area codes: 71-78 (77 reserved but included)
const validAreaCodes = ['71', '72', '73', '74', '75', '76', '77', '78'];
const hasValidArea = validAreaCodes.includes(areaCode);
// Check overall pattern: 7X followed by 6 digits
const matchesPattern = /^7[1-8]\d{6}$/.test(cleanNumber);
return hasValidArea && matchesPattern;
}
// Test cases
console.log(validateGeographicNumber('71234567')); // true (Tunis)
console.log(validateGeographicNumber('72345678')); // true (Bizerte)
console.log(validateGeographicNumber('79123456')); // false (79 not allocated)
console.log(validateGeographicNumber('20123456')); // false (mobile number)Validation strategy:
- Normalize input – Remove spaces, hyphens, country code
- Check length – Must be exactly 8 digits
- Verify area code – First 2 digits must be in valid range (71-78)
- Match pattern – Confirm structure with regex
- Return boolean – True only if all checks pass
Use this two-stage validation (area code + pattern) to catch edge cases that simple regex might miss.
Handling Mobile Number Portability (MNP)
Implement MNP handling to ensure accurate carrier identification. Tunisia's MNP system, managed by INT (Instance Nationale des Télécommunications), allows subscribers to switch operators while keeping their phone numbers. All four major operators—Tunisie Telecom, Ooredoo, Orange Tunisia, and Lycamobile—participate in the MNP framework established by INT regulations.
MNP Status: Tunisia has implemented mobile number portability as confirmed by ITU DataHub 2024, making it mandatory for all licensed mobile operators.
Critical Concept: Operator prefixes no longer indicate the current carrier. You must query INT's MNP database or operator APIs for real-time carrier information.
MNP System Characteristics:
Impact on Development:
-
Prefix-based identification fails for ported numbers
- Original allocation:
20 123 456→ Tunisie Telecom - After porting:
20 123 456→ May be Ooredoo, Orange, or Lycamobile - Consequence: Billing errors, routing failures, incorrect carrier-specific features
- Original allocation:
-
Real-time lookup required for carrier-dependent operations
- MNP database source: INT centralized database
- Access method: Operator APIs or third-party MNP services
- Lookup latency: 50-200ms typical response time
- Update frequency: Real-time (database updated within minutes of porting completion)
-
Porting process timeline and constraints
- Processing time: 2-7 business days per INT regulations
- User requirements: No outstanding debt, account active 3+ months
- Notification: Users receive SMS confirmation when porting completes
- Downtime: Minimal (typically <4 hours during porting window)
Implementation Best Practices:
// MNP lookup with caching and fallback
class MNPLookupService {
constructor(apiKey, cacheTimeout = 86400000) { // 24-hour cache
this.apiKey = apiKey;
this.cache = new Map();
this.cacheTimeout = cacheTimeout;
}
async getCurrentOperator(nsn) {
// Check cache first
const cached = this.cache.get(nsn);
if (cached && Date.now() - cached.timestamp < this.cacheTimeout) {
return cached.operator;
}
try {
// Query INT MNP database or operator API
const response = await fetch(`https://mnp-api.example.tn/lookup/${nsn}`, {
headers: { 'Authorization': `Bearer ${this.apiKey}` }
});
if (!response.ok) throw new Error('MNP lookup failed');
const data = await response.json();
const operator = data.currentOperator;
// Cache the result
this.cache.set(nsn, { operator, timestamp: Date.now() });
return operator;
} catch (error) {
console.error('MNP lookup error:', error);
// Fallback to prefix-based determination
return this.determineOperatorByPrefix(nsn);
}
}
determineOperatorByPrefix(nsn) {
const prefix = nsn.substring(0, 2);
if (/^2[0-9]$/.test(prefix)) return 'Tunisie Telecom';
if (/^5[0-9]$/.test(prefix)) return 'Ooredoo';
if (/^9[0-9]$/.test(prefix)) return 'Orange Tunisia';
if (/^4[0-9]$/.test(prefix)) return 'Lycamobile';
return 'Unknown';
}
clearCache() {
this.cache.clear();
}
}
// Usage example
const mnpService = new MNPLookupService('your-api-key');
async function processCall(phoneNumber) {
const nsn = phoneNumber.replace(/[\s\-+]/g, '').replace(/^216/, '');
// Get current operator via MNP lookup
const currentOperator = await mnpService.getCurrentOperator(nsn);
// Route call based on actual operator
console.log(`Routing call to ${currentOperator}`);
// ... routing logic
}Caching Strategy:
- Cache TTL: 24-48 hours balances accuracy with performance
- Cache invalidation: Clear cache on MNP notification webhooks (if available)
- Fallback: Always implement prefix-based fallback for lookup failures
- Cost optimization: MNP lookups may incur per-query charges; aggressive caching reduces costs
Regulatory Compliance:
Per INT regulations, applications must:
- Not block or delay calls during MNP lookup
- Provide fallback routing if MNP service is unavailable
- Respect user privacy (do not store MNP lookup results beyond operational needs)
Testing MNP Implementation:
INT provides test numbers for MNP validation:
- Request test credentials from INT or your operator
- Use sandbox MNP API for development
- Test scenarios: ported numbers, non-ported numbers, lookup failures
Frequently Asked Questions
What is the country code for Tunisia?
Tunisia's country code is +216. This prefix must be used before the 8-digit National Significant Number (NSN) when dialing from outside Tunisia or storing numbers in international E.164 format. The +216 country code is also used for WhatsApp, international SMS, and all telecommunications services.
Examples:
- Local format:
20 123 456 - International format:
+216 20 123 456 - E.164 format:
+21620123456
For WhatsApp and international services, always store phone numbers in E.164 format (+21620123456) for database consistency and API compatibility.
How do I validate a Tunisian mobile phone number?
Tunisian mobile numbers start with 2, 4, 5, or 9 followed by 7 more digits (8 digits total). Validate Tunisian mobile numbers using this regex pattern:
^(2[0-9]|4[0-9]|5[0-9]|9[0-9])\d{6}$This pattern matches:
- 20-29: Tunisie Telecom numbers
- 40-49: Lycamobile/reserved numbers
- 50-59: Ooredoo numbers
- 90-99: Orange Tunisia numbers
Important: Due to Mobile Number Portability (MNP), the prefix no longer indicates the current operator. Use INT's MNP database or operator APIs for accurate carrier identification.
JavaScript validation example:
const mobileRegex = /^(2[0-9]|4[0-9]|5[0-9]|9[0-9])\d{6}$/;
const isValid = mobileRegex.test('20123456'); // trueFor a complete validation tool, see the implementation examples above.
What are Tunisia's area codes for landline numbers?
Tunisia uses 8 geographic area codes for landlines, all starting with 7:
| Area Code | Region | Major Cities |
|---|---|---|
| 71 | Greater Tunis | Tunis, Ariana, Ben Arous |
| 72 | Northern Tunisia | Bizerte, Béja, Jendouba |
| 73 | Central-East Coast | Sousse, Monastir, Kairouan |
| 74 | South-East | Sfax, Gabès, Médenine |
| 75 | Central-West | Kasserine, Sidi Bouzid, Gafsa |
| 76 | North-West | Zaghouan, Nabeul |
| 77 | Reserved/Special | Reserved for future use |
| 78 | South-West | Tozeur, Kébili |
All landline numbers follow the format 7X XXX XXX (8 digits total).
How does Mobile Number Portability (MNP) work in Tunisia?
Tunisia's MNP system, managed by INT (Instance Nationale des Télécommunications), allows subscribers to switch operators while keeping their phone numbers. The porting process takes 2-7 business days.
Key points:
- All 4 operators participate: Tunisie Telecom, Ooredoo, Orange Tunisia, Lycamobile
- MNP confirmed operational: ITU DataHub 2024 confirms Tunisia has implemented mobile number portability
- Prefix unreliability: A number with prefix
20(originally Tunisie Telecom) may now be served by any operator - Real-time lookup required: Query INT's MNP database or operator APIs for accurate carrier identification
- Lookup latency: 50-200ms typical response time
Developer impact:
- Don't use prefixes for billing, routing, or carrier-specific features
- Implement MNP lookup with 24-48 hour caching
- Always provide fallback to prefix-based identification if MNP lookup fails
What are Tunisia's emergency numbers?
Tunisia uses standardized 3-digit emergency numbers accessible from any device, even without a SIM card:
- 190: Ambulance (SAMU - Emergency Medical Services)
- 193: National Guard (Gendarmerie Nationale)
- 197: Police (National Police)
- 198: Fire Brigade (Civil Protection - Pompiers)
Source: U.S. Embassy Tunisia, UK Foreign Travel Advice
Critical requirements:
- Never block emergency numbers in validation logic
- Allow calls even when device has no credit or is offline
- Don't apply rate limiting to emergency dialing
- Route at no charge per INT regulations
Validation pattern: ^(190|193|197|198)$
What's the difference between toll-free and premium rate numbers in Tunisia?
Tunisia uses three types of special service numbers with distinct billing models:
Toll-Free (80):
- Format:
80 XXX XXX - Billing: Caller pays nothing; recipient pays full cost
- Use cases: Customer support, hotlines
Shared Cost (81):
- Format:
81 XXX XXX - Billing: Cost split between caller and recipient
- Use cases: Technical support, information lines
Premium Rate (88):
- Format:
88 XXX XXX - Billing: Caller pays premium rates (higher than standard)
- Use cases: Entertainment, paid information services
Regulatory requirement: INT mandates that applications display cost warnings before connecting premium rate (88) calls.
How do I convert a Tunisian phone number to E.164 format?
E.164 format is the international standard for phone numbers, required by most SMS APIs, WhatsApp Business API, and telecom systems. Convert Tunisian numbers to E.164 format by removing formatting and adding the +216 country code:
Conversion steps:
- Remove spaces, hyphens, and other formatting:
20 123 456→20123456 - Remove country code if already present:
21620123456→20123456 - Add +216 prefix:
20123456→+21620123456
JavaScript implementation:
function toE164(number) {
// Remove formatting
let cleaned = number.replace(/[\s\-+]/g, '');
// Remove country code if present
if (cleaned.startsWith('216')) {
cleaned = cleaned.substring(3);
}
// Add +216 prefix
return `+216${cleaned}`;
}
console.log(toE164('20 123 456')); // +21620123456
console.log(toE164('+216 71 234 567')); // +21671234567Which operators serve Tunisia's mobile market?
Tunisia's mobile market has 4 licensed operators with market shares as of 2024:
Ooredoo Tunisia:
- Status: Private operator (privatized 2002, 90% owned by Qatar Telecom)
- Former name: Tunisiana
- Prefixes: 50-59
- Market share: 41.84% (Q3 2024, Telecom Trust Consulting)
Tunisie Telecom:
- Status: State-owned incumbent
- Prefixes: 20-29
- Market share: 39.7% (2022, U.S. ITA)
- Coverage: Nationwide, largest infrastructure
Orange Tunisia:
- Status: Private operator (launched 2010, 51% Tunisian / 49% French)
- Prefixes: 90-99
- Market share: 22.9% (2022)
- Parent company: Orange S.A. (France Télécom)
Lycamobile:
- Status: MVNO/smaller operator
- Prefixes: 40-49 (reserved range)
- Market share: Insignificant
- Focus: International calling, niche market
Important: Due to MNP, prefixes no longer guarantee current operator. Always use MNP lookup for accurate carrier identification.
What regex pattern validates all Tunisian phone numbers?
Use this comprehensive regex to validate all Tunisian number types:
// All standard numbers (8 digits)
const allNumbersRegex = /^(2[0-9]|4[0-9]|5[0-9]|7[1-8]|80|81|88|9[0-9])\d{6}$/;
// Or validate by type:
const mobileRegex = /^(2[0-9]|4[0-9]|5[0-9]|9[0-9])\d{6}$/;
const landlineRegex = /^7[1-8]\d{6}$/;
const specialServiceRegex = /^(80|81|88)\d{6}$/;
const emergencyRegex = /^(190|193|197|198)$/;Pattern breakdown:
- Mobile:
(2[0-9]|4[0-9]|5[0-9]|9[0-9])+ 6 digits - Landline:
7[1-8]+ 6 digits - Special service:
(80|81|88)+ 6 digits - Emergency: Exactly
190,193,197, or198
Best practice: Validate by number type rather than using a single catch-all pattern. This enables type-specific handling (MNP lookup for mobile, billing warnings for premium rate, etc.).
How often should I update my Tunisia phone number validation rules?
Update your validation logic on these schedules:
Quarterly: Check INT website (intt.tn) for new operator allocations or prefix assignments
Semi-annually: Review operator API documentation for MNP lookup changes
Monitor regulatory updates: INT issued Decision Coll-Reg-2024-08 in July 2024 establishing new numbering plan management rules
As-needed: Immediately when validation failures spike for legitimate numbers
Best practices:
- Monitor INT announcements: Subscribe to INT or operator mailing lists
- Version validation rules: Track changes with timestamps and source citations
- Implement graceful degradation: Accept unknown but structurally valid numbers
- Log validation failures: Track patterns that indicate numbering changes
Early warning signs:
- Increased validation failures for numbers from specific prefixes
- User reports of rejected valid numbers
- Operator announcements of new number ranges
- INT regulatory updates on numbering plan changes
Conclusion
Implement reliable Tunisian phone number handling using the validation patterns, MNP strategies, and regulatory compliance guidelines in this guide.
Implementation Priorities:
- Store in E.164 format – Use
+216XXXXXXXXfor all database storage and API interactions - Validate number types – Distinguish mobile, landline, special service, and emergency numbers
- Implement MNP lookup – Query INT database or operator APIs for carrier identification; cache 24-48 hours
- Never block emergency numbers – Allow 190, 193, 197, 198 in all validation contexts
- Display billing warnings – Show cost alerts for premium rate (88) numbers per INT requirements
- Use TypeScript – Leverage type safety for production applications
Regulatory Compliance Resources:
INT (Instance Nationale des Télécommunications) regulates Tunisia's telecommunications sector. Access official resources:
- INT website: intt.tn (Arabic/French) – official regulations and announcements
- Latest regulations: Decision Coll-Reg-2024-08 (July 2024) on numbering plan management
- Numbering plan: Request from INT or your operator – detailed prefix allocations
- MNP technical specs: Contact INT or operator APIs – database query protocols
- E.164 standard: ITU-T E.164 – international numbering format
- ITU National Numbering Plans: ITU Tunisia (+216)
Implementation Checklist:
- Implement regex validation for all number types (mobile, landline, special, emergency)
- Build or integrate MNP lookup service with caching
- Test with numbers from all 4 operators (Tunisie Telecom, Ooredoo, Orange, Lycamobile)
- Add emergency number bypass in all validation filters
- Display billing warnings for premium rate numbers
- Store all numbers in E.164 format (+216XXXXXXXX)
- Implement fallback logic for MNP lookup failures
- Monitor INT website for numbering plan updates
- Set up cache invalidation strategy for MNP lookups
- Test cross-operator scenarios (ported numbers)
Common Implementation Mistakes:
❌ Using prefixes for carrier identification – MNP makes this unreliable; always use MNP lookup ❌ Blocking emergency numbers – Violates INT regulations and creates safety risks ❌ Hard-coding operator prefixes – New allocations or operators render code obsolete ❌ Ignoring special service numbers – Billing disputes arise without proper warnings ❌ Not caching MNP lookups – Performance degrades and API costs increase unnecessarily ❌ Storing in local format – E.164 format required for international integration ❌ Skipping TypeScript – Type safety prevents entire categories of validation errors
Next Steps:
- Test validation logic – Run test suite with valid/invalid numbers from all categories
- Integrate MNP service – Set up operator API credentials or third-party MNP provider
- Implement caching layer – Use Redis or similar with 24-48 hour TTL
- Monitor INT announcements – Subscribe to operator mailing lists or INT updates
- Deploy incrementally – Test with small traffic percentage before full rollout
Additional Resources:
- E.164 Phone Format Guide – Comprehensive E.164 standard explanation
- Phone Number Lookup Tool – Validate and identify phone numbers globally
- INT Official Website – Tunisia's telecommunications regulator
- U.S. Embassy Tunisia Emergency Numbers – Official emergency contact information
- UK Foreign Travel Advice - Tunisia – Emergency services verification
- ITU Tunisia Numbering Plan – International telecommunications standards
- ITU DataHub MNP Status – Mobile number portability verification
- U.S. ITA Tunisia Telecom Guide – Market data and statistics
Maintain compliance with INT regulations, implement robust MNP handling, and follow E.164 standards to build production-ready phone number validation for Tunisia's telecommunications market.