Frequently Asked Questions
The area code for the Greater Tunis Region in Tunisia is 71. This two-digit prefix is used for landline numbers within the capital and surrounding areas.
The Tunisia country code is +216. This code precedes the 8-digit National Significant Number (NSN) when dialing internationally to Tunisia, ensuring the call is correctly routed.
Tunisian phone numbers locally are formatted as XX XXX XXX, separating the 8-digit NSN into three groups. For example, a Tunis landline number would be formatted as 71 234 567.
Use the regular expression /^(2[0-9]|5[0-9]|9[0-9])\d{6}$/ to validate Tunisian mobile numbers. This regex checks for the correct operator prefixes (20-29 for Tunisie Telecom, 50-59 for Ooredoo, and 90-99 for Orange) followed by six digits.
Regional prefixes for landlines (71-78) in Tunisia identify specific regions within the country. For instance, 71 designates the Greater Tunis Region while 72 points to Northern Tunisia. This system helps geographically categorize calls and services.
The emergency number for the police in Tunisia is 190. This number, along with other emergency numbers like 197 for fire and 198 for ambulance, are accessible 24/7 from any phone, even without a SIM card.
Toll-free numbers in Tunisia begin with the prefix 80, followed by six more digits (80 XXX XXX). Identifying these allows for special handling in applications, often excluding charges or applying alternative routing logic.
Consider MNP when building applications that require accurate operator information. Because users can keep their numbers when switching providers, relying solely on prefixes can be misleading. Using a real-time number lookup service or consulting the INT's SLA for MNP guidelines are crucial steps.
To format with the country code, remove all non-digit characters, then prepend '+216 ' and group the remaining digits: +216 XX XXX XXX
. Example: +216 20 123 456. This ensures international compatibility.
Special service numbers in Tunisia, like toll-free (80 XXX XXX), premium rate (88 XXX XXX), and shared cost (81 XXX XXX), require specific handling within applications. This might involve different billing logic or specialized routing compared to standard calls.
Tunisia has four primary mobile operators: Tunisie Telecom, Ooredoo, Orange Tunisia, and Lycamobile. This competitive market, combined with the government's efforts for digitalization, has resulted in a standardized numbering system.
You can determine the area code by examining the first two digits of the 8-digit National Significant Number (NSN). Valid area codes for geographic numbers range from 71 to 78, representing different regions across the country.
Understanding Tunisia's telecommunications system is crucial for developers as it allows them to correctly validate, format, and process phone numbers. The country's high mobile penetration rate and ongoing digitalization efforts make this knowledge even more important for effective integration.
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
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):
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:
Recent Regulatory Updates:
Technical Standards:
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:
Key characteristics:
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:
Format Patterns:
7X XXX XXX
(7 + region digit + 6 digits)71 234 567
(Greater Tunis region)+216 71 234 567
Validation Regex:
Note: Legacy patterns include
3[0-2]
for special geographic prefixes. For standard landline validation, use7[1-8]
patterns exclusively.Implementation strategy:
7[1-8]
pattern+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):
Format Patterns:
XX XXX XXX
(8 digits total)20 123 456
(originally Tunisie Telecom)+216 20 123 456
Validation Regex:
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:
DO use MNP lookup for:
Implementation requirements:
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):
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:
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:
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:
Format Patterns:
8X XXX XXX
(80/81/88 + 6 digits)80 100 123
81 234 567
88 123 456
Validation Regex:
Regulatory Compliance (INT Requirements):
You must:
Implementation Requirements:
Billing Distinction:
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:
This validation function handles all Tunisian number types and strips common formatting before validation.
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:
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:
Validation strategy:
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
20 123 456
→ Tunisie Telecom20 123 456
→ May be Ooredoo, Orange, or LycamobileReal-time lookup required for carrier-dependent operations
Porting process timeline and constraints
Implementation Best Practices:
Caching Strategy:
Regulatory Compliance:
Per INT regulations, applications must:
Testing MNP Implementation:
INT provides test numbers for MNP validation:
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:
20 123 456
+216 20 123 456
+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:
This pattern matches:
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:
For 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
: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:
20
(originally Tunisie Telecom) may now be served by any operatorDeveloper impact:
What are Tunisia's emergency numbers?
Tunisia uses standardized 3-digit emergency numbers accessible from any device, even without a SIM card:
Source: U.S. Embassy Tunisia, UK Foreign Travel Advice
Critical requirements:
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):
80 XXX XXX
Shared Cost (81):
81 XXX XXX
Premium Rate (88):
88 XXX XXX
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:
20 123 456
→20123456
21620123456
→20123456
20123456
→+21620123456
JavaScript implementation:
Which operators serve Tunisia's mobile market?
Tunisia's mobile market has 4 licensed operators with market shares as of 2024:
Ooredoo Tunisia:
Tunisie Telecom:
Orange Tunisia:
Lycamobile:
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:
Pattern breakdown:
(2[0-9]|4[0-9]|5[0-9]|9[0-9])
+ 6 digits7[1-8]
+ 6 digits(80|81|88)
+ 6 digits190
,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:
Early warning signs:
Conclusion
Implement reliable Tunisian phone number handling using the validation patterns, MNP strategies, and regulatory compliance guidelines in this guide.
Implementation Priorities:
+216XXXXXXXX
for all database storage and API interactionsRegulatory Compliance Resources:
INT (Instance Nationale des Télécommunications) regulates Tunisia's telecommunications sector. Access official resources:
Implementation Checklist:
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:
Additional Resources:
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.