Italy Phone Number Format: +39 Country Code, Area Codes & Validation
Complete guide to Italian phone number formats: +39 country code, area codes (02 Milan, 06 Rome), mobile prefixes, E.164 validation, AGCOM regulations, and GDPR compliance for Italy.
Italy phone numbers use the +39 country code and follow a structured format regulated by AGCOM (Autorità per le Garanzie nelle Comunicazioni). This comprehensive guide covers Italian phone number formats, validation, and implementation—including landline area codes (02 for Milan, 06 for Rome), mobile prefixes (3XX starting with 330-399), E.164 formatting rules, number portability regulations, and GDPR compliance requirements for handling Italian telecommunications data.
Understanding Italian Phone Number Regulations and AGCOM
AGCOM (Autorità per le Garanzie nelle Comunicazioni) is Italy's independent telecommunications regulatory authority, established by Law 249 of July 31, 1997. AGCOM oversees telecommunications, audiovisual, publishing, postal services, and online platforms. In its 2024 Annual Report, AGCOM reported the total value of the telecommunications and audiovisual markets in Italy reached approximately €53.85 billion in 2023.
The Italian Electronic Communications Code (Legislative Decree No. 259 of August 1, 2003) implements the EU regulatory framework (Directive 2002/21/EC) and was significantly updated by Legislative Decree 207 of November 8, 2021, and most recently by Legislative Decree 48 of March 24, 2024. This modernized framework provides:
Enhanced Service Quality: Higher standards for telecommunications services
Stronger Consumer Protection: Safeguards for consumer rights under AGCOM supervision
Streamlined Digital Integration: Easier integration of digital services including VoIP (regulated under AGCOM Resolution No. 11/06/CIR)
Improved Number Portability: Simplified phone number transfers between providers (relevant for developers since number ownership can change while the number stays the same)
These improvements align with EU initiatives to harmonize electronic communications services, emphasizing competition, investment, and consumer choice.
Accessing AGCOM Resources
For developers validating Italian phone numbers, AGCOM provides several resources:
Carrier Portability Data: Third-party HLR (Home Location Register) lookup services query operator databases to determine current carrier assignments
Regulatory Updates: AGCOM publishes resolutions and technical specifications through their official channels
Italian Phone Number Formats: Complete Structure Guide
Italian phone numbers follow an open dialing plan with a predictable structure. Understanding the format is essential for validation, whether you're implementing phone verification, SMS services, or international calling features.
Italian Landline Numbers (Geographic Numbers)
Format:0xx[x] + XXXXXXX
Examples:
02 12345678 (Milan area code)
06 12345678 (Rome area code)
055 1234567 (Florence)
081 1234567 (Naples)
Structure:
Area Code: 2–4 digits, always starts with 0. Mandatory even for local calls within Italy.
Subscriber Number: 6–8 digits
Total Length: 9–11 digits
Important: When calling Italian landlines from abroad, you must keep the leading zero after the +39 country code. For example: +39 06 12345678 (not +39 6 12345678).
Major Italian City Area Codes:
City
Area Code
Example
Milan
02
02 12345678
Rome
06
06 12345678
Turin
011
011 1234567
Florence
055
055 1234567
Naples
081
081 1234567
Bologna
051
051 1234567
Genoa
010
010 1234567
Venice
041
041 1234567
Palermo
091
091 1234567
Italian Mobile Phone Numbers
Format:3XY XXXXXXX
Example:339 1234567 or +39 339 1234567 (international format)
Structure:
Prefix: Always starts with 3, followed by carrier identifier (0–9). Identifies the mobile network operator that originally assigned the number.
Subscriber Part: 7–8 digits
Total Length: 9–10 digits
All Italian mobile numbers begin with the digit 3. Common prefixes include 330-339 (TIM), 340-349 (Vodafone), 320-329 (WindTre), and 350-351 (Iliad).
Original Carrier Prefixes (note: number portability means numbers can move between carriers):
Iliad Italia: 350, 351 (launched 2018, growing MVNO with ~15% market share as of 2024)
PosteMobile: 371, 373 (managed by PostePay, MVNO with ~5.5% market share)
Fastweb Mobile: 378 (MVNO operator, part of Swisscom Group)
Italy has three main mobile network operators (MNOs): TIM, Vodafone Italia (acquired by Swisscom in December 2024), and WindTre. Additionally, several Mobile Virtual Network Operators (MVNOs) like Iliad, PosteMobile, and Fastweb operate on these networks. Due to number portability, prefixes indicate original assignment but not current carrier.
VoIP Numbers
Italy reserves specific number ranges for Voice over IP (VoIP) services under AGCOM regulation:
Format:5X XXXXXXXX or 55 XXXXXXXX
Primary Ranges:
5-prefix: Numbers starting with 5 are assigned to nomadic VoIP services
55-prefix: Numbers starting with 55 are specifically designated for VoIP services
Length: Typically 9-10 digits total
Regulation: Governed by AGCOM Resolution No. 11/06/CIR (2006), which equates VoIP services with traditional telephony
VoIP numbers follow E.164 formatting and support standard protocols including SIP. Providers must meet quality of service (QoS) requirements and provide access to emergency services (112).
Special Service Numbers
Service Type
Format
Example
Notes
Emergency
112
112
EU standard emergency number (Legislative Decree No. 259/2003). Free from all phones, including those without SIM cards or credit. Sole emergency number in most of Italy.
Toll-free
800 XXXXXX or 803 XXXXXX
800 123456
No charge to caller. Known as "numero verde." Prefix changed from 167 to 800 in 1999.
Premium Rate
892 XXXXXX
892 123456
6-digit format for social and informational services (e.g., directory services). Annual activation fee: €27,500.
Premium Rate
899 XXX XXXX
899 123 4567
9-digit format for entertainment and direct sales services. No maximum price cap (unlike other premium services). Often disabled by default on landlines.
Information
12XX
1254
Directory and information services.
Shared Cost
840 XXXXXX
840 123456
Call charges shared between caller and recipient. Rates vary by provider, typically €0.08-€0.15 per minute from landlines, higher from mobile.
Market research identification (AGCOM Resolution 156/18/CIR)
Italy Number Portability: How It Works
Italy supports robust number portability under AGCOM supervision. Users can keep their numbers when switching providers. AGCOM Resolution 86/21/CIR, effective November 7, 2022, modernized the mobile number portability process.
Mobile Portability: A number originally with TIM (339 XXXXXXX) can move to Vodafone and remain 339 XXXXXXX.
Geographic Portability: Landlines can port within the same area code.
Porting Timeline: The actual porting process takes 7–21 business days. A minimum 30-day retention period with the original operator may apply before initiating the port.
Checking Current Carrier for Ported Numbers
Number portability means the prefix no longer reliably identifies the current carrier. To determine the active carrier for a ported number:
APIs return current carrier, porting status, and line type
Typical response time: 1-3 seconds
Cost: ~€0.005-€0.02 per lookup depending on volume
Implementation Considerations:
Cache carrier lookup results with appropriate TTL (24-48 hours recommended)
Implement fallback logic when carrier lookup fails
Don't rely solely on prefix-based validation for carrier identification
Use HLR lookup for fraud prevention, message routing optimization, and carrier-specific features
VoIP and Digital Services in Italy
The Electronic Communications Code addresses modern communication methods. AGCOM Resolution No. 11/06/CIR (2006) equates VoIP services with traditional phone services, applying the same general authorization regime.
VoIP: Regulated under the general authorization framework. Supports SIP protocol, E.164 formatting, and QoS requirements. The National Numbering Plan governs VoIP number allocation (5-prefix and 55-prefix ranges).
OTT Services: Focuses on integration with traditional networks, number-based identification, and emergency service access (including 112 access from VoIP).
Regulatory Requirements: VoIP providers must register with AGCOM, provide emergency access, maintain service quality standards, and comply with lawful intercept requirements.
How to Validate Italian Phone Numbers: Technical Implementation
Phone Number Validation with Regular Expressions
Use regular expressions for initial validation, but they're not foolproof due to number portability. For definitive carrier information and number validity, use HLR lookup services.
JavaScript
// Comprehensive validation for Italian phone numbersconst italianPhonePatterns = {
landline: /^0\d{2,3}\d{6,8}$/,
mobile: /^3[0-9]\d{7,8}$/,
voip: /^5[05]?\d{7,8}$/,
tollFree: /^80[03]\d{6}$/,
premiumRate892: /^892\d{6}$/,
premiumRate899: /^899\d{6}$/,
sharedCost: /^840\d{6}$/,
callCenterID: /^084[34]\d{6}$/,
emergency: /^11[2-8]$/
};
functionvalidateItalianPhone(phoneNumber, type = 'any') {
// Remove spaces and non-numeric characters except +const cleaned = phoneNumber.replace(/[\s\-\(\)]/g, '');
// Extract national number (remove country code if present)let nationalNumber = cleaned;
if (cleaned.startsWith('+39')) {
nationalNumber = cleaned.substring(3);
} elseif (cleaned.startsWith('0039')) {
nationalNumber = cleaned.substring(4);
}
// Validate based on typeif (type === 'any') {
returnObject.values(italianPhonePatterns).some(pattern =>
pattern.test(nationalNumber)
);
}
const pattern = italianPhonePatterns[type];
if (!pattern) {
thrownewError(`Unknown phone type: ${type}`);
}
return pattern.test(nationalNumber);
}
// Error handling examplefunctionvalidateWithErrorHandling(phoneNumber) {
try {
if (!phoneNumber || typeof phoneNumber !== 'string') {
return {
valid: false,
error: 'INVALID_INPUT',
message: 'Phone number must be a non-empty string'
};
}
const isValid = validateItalianPhone(phoneNumber);
if (!isValid) {
return {
valid: false,
error: 'INVALID_FORMAT',
message: 'Phone number does not match any valid Italian format'
};
}
return {
valid: true,
number: phoneNumber
};
} catch (error) {
return {
valid: false,
error: 'VALIDATION_ERROR',
message: error.message
};
}
}
// Example usageconsole.log(validateItalianPhone('339 1234567', 'mobile')); // trueconsole.log(validateItalianPhone('06 12345678', 'landline')); // trueconsole.log(validateWithErrorHandling('+39 339 1234567'));
// { valid: true, number: '+39 339 1234567' }
Python validation example:
Python
import re
from typing importDict, Optional, UnionclassItalianPhoneValidator:
PATTERNS = {
'landline': re.compile(r'^0\d{2,3}\d{6,8}$'),
'mobile': re.compile(r'^3[0-9]\d{7,8}$'),
'voip': re.compile(r'^5[05]?\d{7,8}$'),
'toll_free': re.compile(r'^80[03]\d{6}$'),
'premium_892': re.compile(r'^892\d{6}$'),
'premium_899': re.compile(r'^899\d{6}$'),
'shared_cost': re.compile(r'^840\d{6}$'),
'emergency': re.compile(r'^11[2-8]$')
}
@staticmethoddefnormalize(phone_number: str) -> str:
"""Remove formatting characters and extract national number"""
cleaned = re.sub(r'[\s\-\(\)]', '', phone_number)
if cleaned.startswith('+39'):
return cleaned[3:]
elif cleaned.startswith('0039'):
return cleaned[4:]
return cleaned
@classmethoddefvalidate(cls, phone_number: str, phone_type: str = 'any') -> Dict[str, Union[bool, str]]:
"""
Validate Italian phone number
Returns:
dict: {'valid': bool, 'type': str, 'error': str (optional)}
"""try:
ifnot phone_number ornotisinstance(phone_number, str):
return {
'valid': False,
'error': 'INVALID_INPUT',
'message': 'Phone number must be a non-empty string'
}
national_number = cls.normalize(phone_number)
if phone_type == 'any':
for ptype, pattern in cls.PATTERNS.items():
if pattern.match(national_number):
return {'valid': True, 'type': ptype}
return {
'valid': False,
'error': 'INVALID_FORMAT',
'message': 'Number does not match any valid Italian format'
}
pattern = cls.PATTERNS.get(phone_type)
ifnot pattern:
return {
'valid': False,
'error': 'UNKNOWN_TYPE',
'message': f'Unknown phone type: {phone_type}'
}
is_valid = bool(pattern.match(national_number))
if is_valid:
return {'valid': True, 'type': phone_type}
else:
return {
'valid': False,
'error': 'INVALID_FORMAT',
'message': f'Number does not match {phone_type} format'
}
except Exception as e:
return {
'valid': False,
'error': 'VALIDATION_ERROR',
'message': str(e)
}
# Example usage
validator = ItalianPhoneValidator()
print(validator.validate('+39 339 1234567')) # {'valid': True, 'type': 'mobile'}print(validator.validate('06 12345678', 'landline')) # {'valid': True, 'type': 'landline'}
Converting Italian Numbers to E.164 International Format
Store and transmit phone numbers in E.164 format for international compatibility. This format includes the plus sign (+) followed by the country code (39 for Italy) and the national number.
Important: Italy is an exception to typical E.164 rules. You must retain the leading zero for landlines after the country code. Many developers mistakenly omit the zero, but both +39 and the zero are required for landlines.
Examples:
Landline (Rome):
National: 06 12345678
E.164: +390612345678 or +39 06 12345678 (zero retained)
Mobile:
National: 339 1234567
E.164: +393391234567 or +39 339 1234567 (no leading zero to remove)
VoIP:
National: 55 12345678
E.164: +395512345678 or +39 55 12345678
Conversion Code Examples:
JavaScript
functiontoE164(nationalNumber, includeSpaces = false) {
// Remove all formattingconst cleaned = nationalNumber.replace(/[\s\-\(\)]/g, '');
// Validate it's a valid Italian numberif (!validateItalianPhone(cleaned)) {
thrownewError('Invalid Italian phone number');
}
// For Italy, keep the leading 0 for landlinesconst e164 = '+39' + cleaned;
if (includeSpaces) {
// Add space after country code for readabilityreturn'+39 ' + cleaned;
}
return e164;
}
functionfromE164(e164Number) {
if (!e164Number.startsWith('+39')) {
thrownewError('Not an Italian phone number');
}
// Remove +39 to get national formatreturn e164Number.substring(3);
}
// Example usageconsole.log(toE164('06 12345678')); // +390612345678console.log(toE164('339 1234567', true)); // +39 3391234567console.log(fromE164('+390612345678')); // 0612345678
Common formatting errors to avoid:
❌ Removing the leading zero from landlines: +3961234567 (incorrect)
✅ Keeping the leading zero for landlines: +390612345678 (correct)
❌ Adding a zero to mobile numbers: +390339123456 (incorrect)
✅ Mobile numbers without extra zero: +393391234567 (correct)
Implement these security measures as required by GDPR Article 32:
Encryption: Encrypt stored phone numbers using industry-standard algorithms:
AES-256 for data at rest
TLS 1.3 for data in transit
Consider field-level encryption for sensitive databases
Pseudonymization: Use techniques like hashing with salt or tokenization where appropriate to reduce privacy risk
Access Control: Implement role-based access control (RBAC) to restrict phone number data access to authorized personnel only
Data Minimization: Collect and store only necessary phone number information. Don't collect phone numbers if not required for the service.
Purpose Limitation: Use phone numbers only for the specified purpose disclosed at collection time
Regular Testing: Test security measures quarterly to ensure ongoing confidentiality, integrity, and resilience
Incident Response: Maintain documented incident response plan with ability to restore access and availability within 72 hours
Data Retention and Deletion
Retention Limits: Under Italian law, telecommunications data can be retained for up to 6 years for legal obligations, but marketing data should be deleted when no longer necessary
Active Consent Period: Phone numbers collected for marketing should be re-validated annually
Deletion Requests: Honor GDPR Article 17 "right to erasure" requests within 30 days
Automated Deletion: Implement automated deletion for inactive accounts (recommended: 2-3 years of inactivity)
Process for handling data subject access requests (DSAR)
Process for handling deletion requests within 30 days
Performance
Caching:
Cache compiled regular expressions (store as constants)
Cache area code lookups with TTL of 30 days
Cache HLR carrier lookups with TTL of 24-48 hours
Use Redis or Memcached for distributed caching
Rate Limiting:
Implement rate limiting on validation APIs: 100 requests/minute per IP recommended
Use exponential backoff for HLR lookup failures
Consider batch validation for bulk operations (validate 100-1000 numbers per request)
Database Indexing: Index phone number fields for quick lookups. Use partial indexes for frequently queried formats.
Optimization Metrics:
Target validation response time: <50ms for regex, <2s for HLR lookup
Cache hit ratio target: >80% for production systems
Error Handling
Provide informative error messages and implement appropriate fallback mechanisms. Log validation failures for analysis and troubleshooting while respecting privacy.
Standard Error Codes:
Error Code
HTTP Status
Description
User Message
INVALID_FORMAT
400
Number doesn't match Italian format
"Please enter a valid Italian phone number"
INVALID_COUNTRY
400
Wrong country code
"Please enter an Italian phone number (+39)"
INVALID_LENGTH
400
Number too short or too long
"Phone number must be 9-11 digits"
INVALID_PREFIX
400
Unassigned or invalid prefix
"This phone number prefix is not recognized"
CARRIER_LOOKUP_FAILED
503
HLR lookup service unavailable
"Unable to verify number. Please try again."
RATE_LIMIT_EXCEEDED
429
Too many validation requests
"Too many attempts. Please wait and try again."
PORTED_NUMBER
200
Number has been ported
"Number verified (carrier may differ from prefix)"
Privacy-Safe Logging: Hash or mask phone numbers in logs (e.g., +39 3XX XXX X567)
Structured Logging: Use JSON format with error codes, timestamps, and context
Log Retention: Limit validation log retention to 90 days maximum per GDPR
Monitoring: Set up alerts for validation error rate thresholds (>10% failure rate)
Frequently Asked Questions About Italian Phone Numbers
What is the country code for Italy?
The country code for Italy is +39. When calling Italy from abroad, dial +39 followed by the full Italian phone number, including the leading zero for landlines. For example, to call a Rome landline, dial +39 06 12345678. For mobile numbers, dial +39 followed by the mobile number starting with 3 (e.g., +39 339 1234567).
What are the area codes for Rome and Milan?
Rome uses area code 06, and Milan uses area code 02. Italian area codes range from 2 to 4 digits and always start with 0. You must dial the full area code even for local calls within the same city.
How do I format Italian phone numbers in E.164 international format?
For E.164 formatting, use +39 followed by the complete number. Important: Unlike most countries, Italy requires you to keep the leading zero for landlines. Example: The Rome number 06 12345678 becomes +390612345678 in E.164 format.
Do Italian mobile numbers start with a specific prefix?
Yes, Italian mobile numbers always start with 3, followed by a carrier identifier (0-9). For example, TIM uses prefixes like 330, 333, 339, while Vodafone uses 340, 342, 347. Iliad uses 350, 351. Mobile numbers are 9-10 digits long in total.
Can phone numbers be ported between carriers in Italy?
Yes, Italy supports full number portability regulated by AGCOM Resolution 86/21/CIR (effective November 7, 2022). Mobile numbers can move between any carriers, and landlines can port within the same area code. The porting process takes 7-21 business days.
What is Italy's emergency number?
Italy uses 112 as the primary EU standard emergency number. It's free to call from any phone, including those without SIM cards or credit. In some regions, legacy numbers (113 for police, 118 for ambulance) still operate alongside 112.
How do I handle common validation errors?
Common validation errors include:
Wrong format: Use regex patterns to validate structure before processing
Missing country code: Normalize input by adding +39 if missing
Leading zero confusion: Remember landlines keep the 0, mobiles don't have one
Ported numbers: Use HLR lookup to verify current carrier, not just prefix
How can I test phone number validation in development?
For testing Italian phone validation:
Test numbers: Use AGCOM's reserved test ranges (contact AGCOM for details)
Mock HLR responses: Create mock carrier lookup responses for unit tests
Sample numbers: Use format-valid but unassigned numbers like +39 338 0000000
Validation libraries: Test with libraries like libphonenumber for format validation
Never use real customer phone numbers in test environments
How do I dial internationally from Italy?
To call internationally from Italy:
Dial 00 (international access prefix)
Dial the country code (e.g., 1 for USA, 44 for UK)
Dial the phone number (without the leading 0 if present)
Example: To call +1 202 555 0123 (USA) from Italy, dial 00 1 202 555 0123
Best Practices
Normalize Input: Remove spaces, hyphens, parentheses, and non-numeric characters before validation. Handle both +39 and 0039 country code formats.
Store in E.164: Always store phone numbers in E.164 format (+39XXXXXXXXX) for consistency and international compatibility
Validate Against Official Data: Use HLR lookup services for accurate carrier validation and to detect inactive numbers
Security First: Implement AES-256 encryption at rest, TLS 1.3 in transit, and strict access controls
Monitor Performance: Track validation success rates, API response times, and error patterns. Set up alerts for anomalies.
User Experience:
Accept multiple input formats (with/without spaces, country code)
Show clear formatting examples in input placeholders
Provide real-time validation feedback without being intrusive
Display user-friendly error messages, not technical codes
Testing Strategy:
Unit test all number format variations (landline, mobile, VoIP, special)
Integration test HLR lookup with proper mocking
Load test validation endpoints (target: 1000 requests/second)
Test error handling and fallback mechanisms
Compliance:
Audit GDPR compliance quarterly
Document all consent mechanisms
Train staff on data protection requirements annually
Maintain incident response procedures
Follow these guidelines to ensure your applications handle Italian phone numbers correctly, improving reliability, security, and user experience while maintaining full GDPR compliance.
Related Resources
For additional information on international phone number formats and validation:
Learn more about phone number validation for other European countries and explore comprehensive guides for implementing telecommunication compliance across different regions.
Frequently asked questions
Use the E.164 format, which includes a plus sign (+), the country code (39 for Italy), and the national number. For example, a national number like 02 12345678 becomes +39 2 12345678 in E.164. Remember to retain the leading zero for landlines after the country code.
Italian landline numbers follow the format 0xx[x] + XXXXXXX, where 0 is the trunk prefix, xx[x] is a 2-4 digit area code, and XXXXXXX is a 6-8 digit subscriber number. The area code is mandatory, even for local calls.
While regular expressions like /^0\d{2,3}\d{6,8}$/ for landlines and /^3[1-9]\d{7,8}$/ for mobiles can be used for basic validation, they are not foolproof due to number portability. Always validate against AGCOM's official database for definitive results.
Number portability allows users to switch providers while keeping their number. This means the prefix or area code no longer definitively identifies the carrier, making simple regex validation unreliable. Checking against AGCOM's database becomes essential for accurate validation.
AGCOM (Autorit?? per le Garanzie nelle Comunicazioni) regulates Italy's telecommunications sector. It focuses on enhancing service quality, protecting consumers, streamlining digital integration, and improving number portability, all in line with EU directives.
Italian mobile numbers begin with a 3, followed by a 1-2 digit carrier identifier and a 7-8 digit subscriber number (3XY XXXXXXX). For instance, 339 1234567 is a valid mobile number format.
The standard European emergency number, 112, is used in Italy. It's classified as a special service number within the Italian numbering plan.
E.164 formatting is crucial for international compatibility. Always store and transmit phone numbers in E.164 format (+39 followed by the national number, including the leading zero for landlines) to ensure seamless global communication.
Toll-free numbers in Italy start with 800, followed by six digits (800 XXXXXX). Premium-rate numbers, where the caller incurs additional charges, begin with 89X XXXXXX.
Landline numbers can be ported, but only within the same geographic area code. They cannot be ported to a mobile network. Mobile numbers, however, can be ported between mobile operators while retaining the same number.
Under GDPR, phone numbers are personal data. Protect them by encrypting stored numbers, restricting access, minimizing data collection, and adhering to purpose limitation, using numbers only for their intended use.
The Italian Electronic Communications Code modernizes the telecommunications framework, focusing on enhanced service quality, stronger consumer protection, streamlined digital integration, and improved number portability, reflecting broader EU initiatives.
Cache compiled regular expressions and frequently accessed data like area codes to speed up validation. Implement rate limiting to prevent abuse of validation APIs and improve overall system performance.
Normalize input by removing non-numeric characters, store numbers in E.164 format, validate against AGCOM's official database, implement robust security measures, and monitor validation performance and error rates for continuous improvement.
Italy phone numbers use the +39 country code and follow a structured format regulated by AGCOM (Autorità per le Garanzie nelle Comunicazioni). This comprehensive guide covers Italian phone number formats, validation, and implementation—including landline area codes (02 for Milan, 06 for Rome), mobile prefixes (3XX starting with 330-399), E.164 formatting rules, number portability regulations, and GDPR compliance requirements for handling Italian telecommunications data.
Understanding Italian Phone Number Regulations and AGCOM
AGCOM (Autorità per le Garanzie nelle Comunicazioni) is Italy's independent telecommunications regulatory authority, established by Law 249 of July 31, 1997. AGCOM oversees telecommunications, audiovisual, publishing, postal services, and online platforms. In its 2024 Annual Report, AGCOM reported the total value of the telecommunications and audiovisual markets in Italy reached approximately €53.85 billion in 2023.
The Italian Electronic Communications Code (Legislative Decree No. 259 of August 1, 2003) implements the EU regulatory framework (Directive 2002/21/EC) and was significantly updated by Legislative Decree 207 of November 8, 2021, and most recently by Legislative Decree 48 of March 24, 2024. This modernized framework provides:
These improvements align with EU initiatives to harmonize electronic communications services, emphasizing competition, investment, and consumer choice.
Accessing AGCOM Resources
For developers validating Italian phone numbers, AGCOM provides several resources:
Italian Phone Number Formats: Complete Structure Guide
Italian phone numbers follow an open dialing plan with a predictable structure. Understanding the format is essential for validation, whether you're implementing phone verification, SMS services, or international calling features.
Italian Landline Numbers (Geographic Numbers)
0xx[x] + XXXXXXX02 12345678(Milan area code)06 12345678(Rome area code)055 1234567(Florence)081 1234567(Naples)0. Mandatory even for local calls within Italy.Important: When calling Italian landlines from abroad, you must keep the leading zero after the +39 country code. For example:
+39 06 12345678(not+39 6 12345678).Major Italian City Area Codes:
Italian Mobile Phone Numbers
3XY XXXXXXX339 1234567or+39 339 1234567(international format)3, followed by carrier identifier (0–9). Identifies the mobile network operator that originally assigned the number.All Italian mobile numbers begin with the digit 3. Common prefixes include 330-339 (TIM), 340-349 (Vodafone), 320-329 (WindTre), and 350-351 (Iliad).
Original Carrier Prefixes (note: number portability means numbers can move between carriers):
Italy has three main mobile network operators (MNOs): TIM, Vodafone Italia (acquired by Swisscom in December 2024), and WindTre. Additionally, several Mobile Virtual Network Operators (MVNOs) like Iliad, PosteMobile, and Fastweb operate on these networks. Due to number portability, prefixes indicate original assignment but not current carrier.
VoIP Numbers
Italy reserves specific number ranges for Voice over IP (VoIP) services under AGCOM regulation:
5X XXXXXXXXor55 XXXXXXXX5are assigned to nomadic VoIP services55are specifically designated for VoIP servicesVoIP numbers follow E.164 formatting and support standard protocols including SIP. Providers must meet quality of service (QoS) requirements and provide access to emergency services (112).
Special Service Numbers
112112800 XXXXXXor803 XXXXXX800 123456892 XXXXXX892 123456899 XXX XXXX899 123 456712XX1254840 XXXXXX840 1234560843 XXXXXX0843 1234560844 XXXXXX0844 123456Italy Number Portability: How It Works
Italy supports robust number portability under AGCOM supervision. Users can keep their numbers when switching providers. AGCOM Resolution 86/21/CIR, effective November 7, 2022, modernized the mobile number portability process.
339 XXXXXXX) can move to Vodafone and remain339 XXXXXXX.Checking Current Carrier for Ported Numbers
Number portability means the prefix no longer reliably identifies the current carrier. To determine the active carrier for a ported number:
Third-Party HLR Lookup APIs:
Implementation Considerations:
VoIP and Digital Services in Italy
The Electronic Communications Code addresses modern communication methods. AGCOM Resolution No. 11/06/CIR (2006) equates VoIP services with traditional phone services, applying the same general authorization regime.
How to Validate Italian Phone Numbers: Technical Implementation
Phone Number Validation with Regular Expressions
Use regular expressions for initial validation, but they're not foolproof due to number portability. For definitive carrier information and number validity, use HLR lookup services.
// Comprehensive validation for Italian phone numbers const italianPhonePatterns = { landline: /^0\d{2,3}\d{6,8}$/, mobile: /^3[0-9]\d{7,8}$/, voip: /^5[05]?\d{7,8}$/, tollFree: /^80[03]\d{6}$/, premiumRate892: /^892\d{6}$/, premiumRate899: /^899\d{6}$/, sharedCost: /^840\d{6}$/, callCenterID: /^084[34]\d{6}$/, emergency: /^11[2-8]$/ }; function validateItalianPhone(phoneNumber, type = 'any') { // Remove spaces and non-numeric characters except + const cleaned = phoneNumber.replace(/[\s\-\(\)]/g, ''); // Extract national number (remove country code if present) let nationalNumber = cleaned; if (cleaned.startsWith('+39')) { nationalNumber = cleaned.substring(3); } else if (cleaned.startsWith('0039')) { nationalNumber = cleaned.substring(4); } // Validate based on type if (type === 'any') { return Object.values(italianPhonePatterns).some(pattern => pattern.test(nationalNumber) ); } const pattern = italianPhonePatterns[type]; if (!pattern) { throw new Error(`Unknown phone type: ${type}`); } return pattern.test(nationalNumber); } // Error handling example function validateWithErrorHandling(phoneNumber) { try { if (!phoneNumber || typeof phoneNumber !== 'string') { return { valid: false, error: 'INVALID_INPUT', message: 'Phone number must be a non-empty string' }; } const isValid = validateItalianPhone(phoneNumber); if (!isValid) { return { valid: false, error: 'INVALID_FORMAT', message: 'Phone number does not match any valid Italian format' }; } return { valid: true, number: phoneNumber }; } catch (error) { return { valid: false, error: 'VALIDATION_ERROR', message: error.message }; } } // Example usage console.log(validateItalianPhone('339 1234567', 'mobile')); // true console.log(validateItalianPhone('06 12345678', 'landline')); // true console.log(validateWithErrorHandling('+39 339 1234567')); // { valid: true, number: '+39 339 1234567' }Python validation example:
import re from typing import Dict, Optional, Union class ItalianPhoneValidator: PATTERNS = { 'landline': re.compile(r'^0\d{2,3}\d{6,8}$'), 'mobile': re.compile(r'^3[0-9]\d{7,8}$'), 'voip': re.compile(r'^5[05]?\d{7,8}$'), 'toll_free': re.compile(r'^80[03]\d{6}$'), 'premium_892': re.compile(r'^892\d{6}$'), 'premium_899': re.compile(r'^899\d{6}$'), 'shared_cost': re.compile(r'^840\d{6}$'), 'emergency': re.compile(r'^11[2-8]$') } @staticmethod def normalize(phone_number: str) -> str: """Remove formatting characters and extract national number""" cleaned = re.sub(r'[\s\-\(\)]', '', phone_number) if cleaned.startswith('+39'): return cleaned[3:] elif cleaned.startswith('0039'): return cleaned[4:] return cleaned @classmethod def validate(cls, phone_number: str, phone_type: str = 'any') -> Dict[str, Union[bool, str]]: """ Validate Italian phone number Returns: dict: {'valid': bool, 'type': str, 'error': str (optional)} """ try: if not phone_number or not isinstance(phone_number, str): return { 'valid': False, 'error': 'INVALID_INPUT', 'message': 'Phone number must be a non-empty string' } national_number = cls.normalize(phone_number) if phone_type == 'any': for ptype, pattern in cls.PATTERNS.items(): if pattern.match(national_number): return {'valid': True, 'type': ptype} return { 'valid': False, 'error': 'INVALID_FORMAT', 'message': 'Number does not match any valid Italian format' } pattern = cls.PATTERNS.get(phone_type) if not pattern: return { 'valid': False, 'error': 'UNKNOWN_TYPE', 'message': f'Unknown phone type: {phone_type}' } is_valid = bool(pattern.match(national_number)) if is_valid: return {'valid': True, 'type': phone_type} else: return { 'valid': False, 'error': 'INVALID_FORMAT', 'message': f'Number does not match {phone_type} format' } except Exception as e: return { 'valid': False, 'error': 'VALIDATION_ERROR', 'message': str(e) } # Example usage validator = ItalianPhoneValidator() print(validator.validate('+39 339 1234567')) # {'valid': True, 'type': 'mobile'} print(validator.validate('06 12345678', 'landline')) # {'valid': True, 'type': 'landline'}Converting Italian Numbers to E.164 International Format
Store and transmit phone numbers in E.164 format for international compatibility. This format includes the plus sign (+) followed by the country code (39 for Italy) and the national number.
Important: Italy is an exception to typical E.164 rules. You must retain the leading zero for landlines after the country code. Many developers mistakenly omit the zero, but both +39 and the zero are required for landlines.
Examples:
06 12345678+390612345678or+39 06 12345678(zero retained)339 1234567+393391234567or+39 339 1234567(no leading zero to remove)55 12345678+395512345678or+39 55 12345678Conversion Code Examples:
function toE164(nationalNumber, includeSpaces = false) { // Remove all formatting const cleaned = nationalNumber.replace(/[\s\-\(\)]/g, ''); // Validate it's a valid Italian number if (!validateItalianPhone(cleaned)) { throw new Error('Invalid Italian phone number'); } // For Italy, keep the leading 0 for landlines const e164 = '+39' + cleaned; if (includeSpaces) { // Add space after country code for readability return '+39 ' + cleaned; } return e164; } function fromE164(e164Number) { if (!e164Number.startsWith('+39')) { throw new Error('Not an Italian phone number'); } // Remove +39 to get national format return e164Number.substring(3); } // Example usage console.log(toE164('06 12345678')); // +390612345678 console.log(toE164('339 1234567', true)); // +39 3391234567 console.log(fromE164('+390612345678')); // 0612345678Common formatting errors to avoid:
+3961234567(incorrect)+390612345678(correct)+390339123456(incorrect)+393391234567(correct)GDPR Compliance for Italian Phone Numbers
Phone numbers are personal data under GDPR. Italy revised its Personal Data Protection Code on December 19, 2018, to align with GDPR. The Italian Data Protection Authority (Garante per la protezione dei dati personali) oversees enforcement.
Data Security Measures
Implement these security measures as required by GDPR Article 32:
Data Retention and Deletion
Consent Requirements for SMS Marketing
Under GDPR Article 6 and Italy's e-Privacy Directive implementation:
GDPR Compliance Checklist for Phone Number Handling:
Performance
Error Handling
Provide informative error messages and implement appropriate fallback mechanisms. Log validation failures for analysis and troubleshooting while respecting privacy.
Standard Error Codes:
INVALID_FORMATINVALID_COUNTRYINVALID_LENGTHINVALID_PREFIXCARRIER_LOOKUP_FAILEDRATE_LIMIT_EXCEEDEDPORTED_NUMBERError Handling Implementation:
class PhoneValidationError extends Error { constructor(code, message, details = {}) { super(message); this.code = code; this.details = details; this.name = 'PhoneValidationError'; } } async function validateWithHLR(phoneNumber) { try { // Step 1: Format validation const formatted = toE164(phoneNumber); // Step 2: HLR Lookup const hlrResult = await hlrLookup(formatted); if (!hlrResult.active) { throw new PhoneValidationError( 'INACTIVE_NUMBER', 'This phone number is not currently active', { number: formatted, hlrStatus: hlrResult.status } ); } return { valid: true, formatted: formatted, carrier: hlrResult.carrier, ported: hlrResult.ported, type: hlrResult.lineType }; } catch (error) { // Log error (without sensitive data) logger.error('Phone validation failed', { errorCode: error.code, // Don't log actual phone number in production timestamp: new Date().toISOString() }); if (error instanceof PhoneValidationError) { throw error; } // Fallback for unexpected errors throw new PhoneValidationError( 'VALIDATION_ERROR', 'Unable to validate phone number', { originalError: error.message } ); } }Logging Best Practices:
+39 3XX XXX X567)Frequently Asked Questions About Italian Phone Numbers
What is the country code for Italy?
The country code for Italy is +39. When calling Italy from abroad, dial +39 followed by the full Italian phone number, including the leading zero for landlines. For example, to call a Rome landline, dial +39 06 12345678. For mobile numbers, dial +39 followed by the mobile number starting with 3 (e.g., +39 339 1234567).
What are the area codes for Rome and Milan?
Rome uses area code 06, and Milan uses area code 02. Italian area codes range from 2 to 4 digits and always start with 0. You must dial the full area code even for local calls within the same city.
How do I format Italian phone numbers in E.164 international format?
For E.164 formatting, use +39 followed by the complete number. Important: Unlike most countries, Italy requires you to keep the leading zero for landlines. Example: The Rome number 06 12345678 becomes +390612345678 in E.164 format.
Do Italian mobile numbers start with a specific prefix?
Yes, Italian mobile numbers always start with 3, followed by a carrier identifier (0-9). For example, TIM uses prefixes like 330, 333, 339, while Vodafone uses 340, 342, 347. Iliad uses 350, 351. Mobile numbers are 9-10 digits long in total.
Can phone numbers be ported between carriers in Italy?
Yes, Italy supports full number portability regulated by AGCOM Resolution 86/21/CIR (effective November 7, 2022). Mobile numbers can move between any carriers, and landlines can port within the same area code. The porting process takes 7-21 business days.
What is Italy's emergency number?
Italy uses 112 as the primary EU standard emergency number. It's free to call from any phone, including those without SIM cards or credit. In some regions, legacy numbers (113 for police, 118 for ambulance) still operate alongside 112.
How do I handle common validation errors?
Common validation errors include:
How can I test phone number validation in development?
For testing Italian phone validation:
+39 338 0000000libphonenumberfor format validationHow do I dial internationally from Italy?
To call internationally from Italy:
00(international access prefix)1for USA,44for UK)Example: To call +1 202 555 0123 (USA) from Italy, dial
00 1 202 555 0123Best Practices
Follow these guidelines to ensure your applications handle Italian phone numbers correctly, improving reliability, security, and user experience while maintaining full GDPR compliance.
Related Resources
For additional information on international phone number formats and validation:
Learn more about phone number validation for other European countries and explore comprehensive guides for implementing telecommunication compliance across different regions.