Peru Phone Numbers: +51 Country Code, Format & Validation Guide
Master Peru phone number formats with +51 country code. Complete guide to landline/mobile validation, area codes, E.164 format, OSIPTEL regulations, and implementation code for developers.
Learn Peru phone number formats, validation rules, and implementation best practices—from understanding Peru's +51 country code to mastering OSIPTEL regulations and E.164 standards.
Peru's telecommunications sector transformed from a state-owned monopoly to a competitive market since the 1990s. OSIPTEL (Organismo Supervisor de Inversión Privada en Telecomunicaciones) now regulates the system. Key milestones:
1994: Privatization begins. The government auctions state-owned companies Compañía Peruana de Teléfonos S.A. (CPT) and Entel Perú to Telefónica de España. Entel Perú merges into CPT, becoming Telefónica del Perú S.A. (TdP).
2010: Mobile number portability (MNP) launches January 1, 2010, allowing consumers to switch carriers while retaining their numbers. The initial process takes seven business days with no fees.
2014: OSIPTEL relaunches mobile number portability July 16, 2014, reducing porting time from seven business days to 24 hours. Fixed number portability (FNP) launches July 26, 2014, extending portability to landlines. This coincides with 9-digit mobile number standardization and a streamlined MNP process.
2024: OSIPTEL approves regulatory improvements via Board of Directors Resolution No. 00030-2024-CD/OSIPTEL to enhance telecommunications regulation quality. A public contest selects the centralized number porting database manager for April 2024–April 2029.
These reforms fostered competition, improved service quality, and expanded consumer choice. As of December 2024, Peru's mobile market reached 42.70 million lines – 3.28% growth from 2023.
Source: OSIPTEL, El Peruano (Official Gazette), December 2024
Peru Phone Number Format: Landline vs Mobile Structure
Peruvian phone numbers follow distinct structures depending on whether you're dialing a landline or mobile phone. Understanding these formats is essential for proper validation and international calling.
Peru Landline Number Format
Landline numbers consist of 9 digits total (including the national prefix):
Source: Wikipedia "Telephone numbers in Peru"; Ministry of Transport and Communications
Peru Mobile Phone Number Format
Mobile numbers consist of 9 digits:
Code
9 + [Subscriber Number (8 digits)]
All mobile numbers begin with 9, followed by an 8-digit subscriber number. Since September 4, 2010, Peru's Mobile Virtual Area (MVA) makes all mobile numbers non-geographical – not attached to any region.
Source: Ministry of Transport and Communications, September 4, 2010
Special Number Categories
In addition to standard landline and mobile numbers, Peru uses several special number categories:
Toll-Free:0800 + 5 digits.
Premium Rate:0805 + 5 digits for voting, entertainment, and professional consultations.
Shared Cost:0801 + 5 digits for services where caller and receiver share costs (customer service, technical support).
Emergency Services:
105 – Police (National Police emergency number)
106 – Ambulance (SAMU – Sistema de Atención Móvil de Urgencia, Ministry of Health)
116 – Fire (Cuerpo General de Bomberos Voluntarios del Perú)
911 – Emergency switchboard (connects to police and other emergency services)
115 – Peruvian Red Cross (for large-scale emergencies and disasters)
Government Services: Often use 1800 series numbers for priority routing.
Operator Services: Typically use 100 series numbers for customer service and technical support.
Information Services:103 for telephone information.
Note: All emergency calls are free of charge.
Source: Wikipedia "Telephone numbers in Peru"; New Peruvian emergency services guide
Phone Number Validation and Implementation for Developers
Implementing Peru phone number validation requires understanding specific patterns for different number types. Below are production-ready code examples for handling Peruvian phone numbers in your applications.
Input Sanitization
Sanitize user input before validation. Remove common formatting characters users may enter:
Validate area codes: Cross-reference with OSIPTEL's official list. Peru has 23 area codes: 1 for Lima/Callao, 2-digit codes for other regions.
Check number length: Verify digits based on type and region – 7 for Lima/Callao landlines, 6 for provincial landlines, 9 for mobile.
Verify prefixes: Ensure prefix matches service type (9 for mobile, 0800 for toll-free).
Account for Mobile Virtual Area: Mobile numbers are non-geographical since September 2010 – area codes don't apply.
Understanding E.164 International Phone Number Format
E.164 is the ITU-T (International Telecommunication Union) standard for phone number formats. It ensures every phone number is globally unique and routeable.
E.164 Format Structure:
Starts with +
Country code: 1–3 digits (Peru: 51)
Subscriber number: up to 12 digits (area code + local number)
Maximum: 15 digits
Peru E.164 Examples:
Lima landline: +511234567 (country code 51 + area code 1 + 7-digit local number)
Arequipa landline: +5154123456 (country code 51 + area code 54 + 6-digit local number)
Mobile: +51987654321 (country code 51 + 9-digit mobile number)
Source: ITU-T Recommendation E.164 (11/2010)
Convert to E.164 format:
JavaScript
functiontoE164(number, defaultCountryCode = '51') {
// Sanitize inputlet cleaned = number.replace(/[^\d+]/g, '');
// Already in E.164 formatif (cleaned.startsWith('+')) {
return cleaned;
}
// Remove country code if present without +if (cleaned.startsWith('51') && cleaned.length >= 11) {
return'+' + cleaned;
}
// National format with leading 0 (landline)if (cleaned.startsWith('0')) {
// Remove the leading 0 and add +51return'+' + defaultCountryCode + cleaned.substring(1);
}
// Mobile number (starts with 9)if (cleaned.startsWith('9') && cleaned.length === 9) {
return'+' + defaultCountryCode + cleaned;
}
// If we can't determine format, return as-is with country codereturn'+' + defaultCountryCode + cleaned;
}
// Example usage:console.log(toE164('011234567')); // '+511234567'console.log(toE164('054123456')); // '+5154123456'console.log(toE164('987654321')); // '+51987654321'console.log(toE164('+51 1 234567')); // '+511234567'console.log(toE164('51987654321')); // '+51987654321'
Convert from E.164 format:
JavaScript
functionfromE164(e164Number, format = 'national') {
// Remove the + and country codelet cleaned = e164Number.replace(/^\+51/, '');
if (format === 'national') {
// Mobile numbers stay as-isif (cleaned.startsWith('9')) {
return cleaned;
}
// Landlines get leading 0return'0' + cleaned;
}
if (format === 'international') {
return'+51 ' + cleaned;
}
return cleaned;
}
// Example usage:console.log(fromE164('+511234567', 'national')); // '011234567'console.log(fromE164('+5154123456', 'national')); // '054123456'console.log(fromE164('+51987654321', 'national')); // '987654321'console.log(fromE164('+511234567', 'international')); // '+51 1234567'
CREATE TABLE users (
id SERIAL PRIMARY KEY,
phone_e164 VARCHAR(15) NOT NULLUNIQUE, -- E.164 format: +51987654321
phone_country_code VARCHAR(3) DEFAULT'PE',
phone_type VARCHAR(20), -- 'mobile', 'landline', 'tollfree', etc.
created_at TIMESTAMPDEFAULT NOW()
);
-- Create index for fast lookupsCREATE INDEX idx_phone_e164 ON users(phone_e164);
Storage Tips:
Store in E.164 format (with +) as VARCHAR(15)
Index phone number column
Store phone type separately
Validate before storing
Store original input separately for display preferences
Source: Database design best practices for phone numbers
Peru Mobile Operators: Market Share and Coverage (2024)
Peru's telecommunications market has four major operators (December 2024):
Claro:12.83 million lines (30.05%), full services. 2.75% YoY growth.
Movistar:11.35 million lines (26.57%), full services, extensive legacy infrastructure. 1.95% YoY decline.
Entel:9.66 million lines (22.61%), mobile and data, known for quality. 3.94% YoY growth.
Bitel:8.75 million lines (20.49%), mobile and data, expanding rural coverage. Strongest growth: 12.39% YoY.
All four operators hold 20–30% market share. Bitel gains rapidly; Movistar loses share despite infrastructure advantages.
Source: OSIPTEL, December 2024
Future Trends: 5G and IoT in Peru's Telecommunications
OSIPTEL shapes Peru's numbering plan to accommodate:
5G deployment: Requires S/18,000 million (~$4.8B USD) investment by 2025 from public and private sectors.
IoT integration: Meeting growing demand for connected device numbers.
Enhanced portability: Streamlining and securing processes. Centralized database contract runs through April 2029.
Digital convergence: Adapting to telecommunications and digital service integration.
Fraud prevention: Strengthening security against stolen phone fraud.
OSIPTEL manages number allocation through structured application, evaluation, and implementation phases – ensuring efficient use of limited resources. Telecommunications investments increased 3.4% in 2024, with operating revenues reaching S/21,129 million (1.1% increase from 2023).
Source: OSIPTEL, 2024-2025 reports
Additional Resources
OSIPTEL Official Website:https://www.osiptel.gob.pe – The primary source for regulations and official information.
Consult OSIPTEL's official documentation for the most up-to-date information and regulations.
Common Questions About Peru Phone Numbers (FAQ)
What is Peru's country code for international calls?
Peru's country code is +51. Call Peru from abroad by dialing your country's international access code (e.g., 00 from most countries, 011 from the US/Canada), followed by 51, then the area code and local number. For example, to call a Lima landline (01 234 5678) from the US, dial 011-51-1-2345678. Mobile numbers don't require an area code – dial +51 followed by the 9-digit mobile number starting with 9.
How do I format Peru phone numbers correctly?
Peru phone numbers follow specific formats: Landlines use 0 + area code (1-2 digits) + local number (6-7 digits). Lima/Callao landlines have 7-digit local numbers (e.g., 01 234 5678), while provincial landlines have 6-digit local numbers (e.g., 054 123456 for Arequipa). Mobile numbers are 9 digits starting with 9 (e.g., 987 654 321). For international format, use +51 followed by the number without the leading 0 for landlines.
What are the main area codes in Peru?
Peru has 23 area codes. Lima and Callao use area code 1. Major provincial codes include: 54 (Arequipa), 84 (Cusco), 44 (Trujillo/La Libertad), 73 (Piura), 74 (Chiclayo/Lambayeque), 76 (Cajamarca), 51 (Puno), 64 (Huancayo/Junín), 43 (Huaraz/Ancash), and 65 (Iquitos/Loreto). All provincial area codes are 2 digits long. Mobile numbers don't use area codes since the creation of the Mobile Virtual Area (MVA) in September 2010.
How can I validate Peru phone numbers in my application?
Validate Peru phone numbers using regex patterns that account for format differences. For Lima/Callao landlines, use /^(0)(1)\d{7}$/ (01 + 7 digits). For provincial landlines, use /^(0)([2-9][0-9])\d{6}$/ (0 + 2-digit code + 6 digits). For mobile numbers, use /^9\d{8}$/ (9 + 8 digits). Always sanitize input first (remove spaces, dashes, parentheses) and cross-reference area codes against OSIPTEL's official list. For production use, consider Google's libphonenumber library for comprehensive validation.
What is number portability in Peru and how does it work?
Number portability in Peru allows you to switch telecommunications operators while keeping your phone number. Mobile number portability (MNP) launched January 1, 2010, and was relaunched July 16, 2014 with 24-hour porting time. Fixed number portability (FNP) launched July 26, 2014. The process is free, managed through a centralized database (contract period: April 2024–April 2029), and regulated by OSIPTEL. Verify portability status at https://www.osiptel.gob.pe/portabilidad.
What are Peru's emergency phone numbers?
Peru's emergency numbers are: 105 (Police – National Police emergency), 106 (Ambulance – SAMU, Ministry of Health), 116 (Fire – Bomberos Voluntarios), 911 (Emergency switchboard connecting to police and other services), and 115 (Peruvian Red Cross for large-scale emergencies). 103 provides telephone information. All emergency calls are free of charge. These numbers work from both landlines and mobile phones throughout Peru.
Who are the major mobile operators in Peru?
As of December 2024, Peru has four major operators: Claro (30.05% market share, 12.83 million lines), Movistar (26.57%, 11.35 million lines), Entel (22.61%, 9.66 million lines), and Bitel (20.49%, 8.75 million lines). Bitel shows the strongest growth at 12.39% year-over-year, while Movistar declined 1.95%. The total market reached 42.70 million lines in December 2024, growing 3.28% from 2023. All operators offer mobile number portability.
How do I call internationally from Peru?
Peru uses a "call by call" system where you select a carrier using a 4-digit prefix (19XX format): Claro (1912), Movistar (1911), Bitel (1968), Americatel (1977), Entel (1990), IDT (1914), or Convergia (1960). Format: 19XX + 00 + country code + area code + number. The 19XX prefix is mandatory from fixed lines but optional from mobile phones. Mobile users can alternatively dial + followed by the country code.
What is the Mobile Virtual Area (MVA) in Peru?
Peru's Mobile Virtual Area (MVA) launched September 4, 2010, making all mobile numbers non-geographical – not attached to any specific region. All mobile numbers became 9 digits long (format: 9XX XXX XXX) and area codes no longer apply to mobile numbers. This means you dial mobile numbers the same way anywhere in Peru (just the 9-digit number), and mobile-to-mobile calls don't require area codes or prefixes.
Do Lima and provincial landlines have different formats?
Yes. Lima and Callao (area code 1) use 7-digit local numbers (format: 01 XXX XXXX), totaling 9 digits with the leading 0. All other regions use 6-digit local numbers with 2-digit area codes (format: 0XX XXXXXX), also totaling 9 digits. This distinction is critical for validation – your regex patterns must account for both formats. From abroad, dial +51-1-XXXXXXX for Lima or +51-XX-XXXXXX for provinces.
What is E.164 format and why should I use it?
E.164 is the international standard for phone number formats (ITU-T Recommendation). It ensures globally unique, unambiguous phone numbers. Format: + followed by country code (51 for Peru) and subscriber number, maximum 15 digits total. Example: +51987654321 for a Peru mobile. Benefits: eliminates ambiguity, enables international routing, simplifies validation, recommended for database storage. Use libphonenumber library to convert between E.164 and national formats.
Frequently asked questions
Use regular expressions to validate based on number type: landline (starting with 0), mobile (starting with 9), toll-free (0800), premium (0805), and shared cost (0801). Refer to OSIPTEL for official area codes and ensure the correct number of digits, as landlines and mobile numbers have 9 digits, while special numbers vary.
Peruvian mobile numbers have 9 digits and always start with the prefix '9', followed by an 8-digit subscriber number. For example, a valid mobile number would look like 912345678.
Group digits for readability: mobile numbers as 9XXX XXX XXX and landlines as 0X XXXXXXXX. This formatting enhances user experience by visually separating the parts of the number and making it easier to recognize and remember. You can achieve this using string manipulation functions or regular expressions.
Different prefixes distinguish service types: 9 for mobile, 0 for landlines, 0800 for toll-free, 0805 for premium rate, and 0801 for shared cost. These distinct prefixes facilitate efficient routing and billing, enabling users to easily identify call types and associated costs.
Include the country code (+51) when dialing a Peruvian number from abroad. Omit the leading '0' from the national number when using the country code. Dialing +51 followed by the 9-digit number ensures the call connects correctly from international locations.
Dial the Peru country code (+51), followed by the area code (without the leading 0) and the local number. For instance, to call Lima (area code 01) dial +51 1 XXXXXXXX. Remember to drop the initial zero from the area code.
OSIPTEL (Organismo Supervisor de Inversi??n Privada en Telecomunicaciones) regulates Peru's telecommunications sector. It oversees everything from number allocation to portability processes and ensures fair competition and consumer protection. OSIPTEL's official website is the primary source for regulations and industry news.
Peru's main operators include Movistar, Claro, Entel, and Bitel. Movistar and Claro offer a full range of services, while Entel and Bitel focus primarily on mobile and data, with Bitel actively expanding rural coverage. Each operator has its strengths, contributing to a dynamic market.
Number portability began with mobile numbers in 2010, followed by fixed lines in 2014, with improvements in 2021 and upcoming changes in 2025. These updates aim to make switching carriers easier for consumers while enhancing security and efficiency.
OSIPTEL is preparing for 5G, IoT, and increased digital service integration. Their focus is on accommodating these advancements while enhancing number portability and resource allocation processes. This proactive approach ensures the numbering plan can handle the evolving demands of technology.
Consult OSIPTEL's official website (https://www.osiptel.gob.pe) and the number portability verification system (https://www.osiptel.gob.pe/portabilidad). These resources offer the most accurate and up-to-date details on regulations, number formats, and portability status.
Key emergency numbers include 105 for Police and 116 for Fire. Other specialized emergency services may use different numbers. It's important to be aware of these numbers in case of emergencies.
Besides regular numbers, Peru uses prefixes like 0800 (toll-free), 0805 (premium rate), 0801 (shared cost), 1800 (government services), and 100 (operator services). Each serves specific purposes, providing access to various services.
Learn Peru phone number formats, validation rules, and implementation best practices—from understanding Peru's +51 country code to mastering OSIPTEL regulations and E.164 standards.
Understanding Peru's Telecommunications System: Key Background
Peru's telecommunications sector transformed from a state-owned monopoly to a competitive market since the 1990s. OSIPTEL (Organismo Supervisor de Inversión Privada en Telecomunicaciones) now regulates the system. Key milestones:
These reforms fostered competition, improved service quality, and expanded consumer choice. As of December 2024, Peru's mobile market reached 42.70 million lines – 3.28% growth from 2023.
Source: OSIPTEL, El Peruano (Official Gazette), December 2024
Peru Phone Number Format: Landline vs Mobile Structure
Peruvian phone numbers follow distinct structures depending on whether you're dialing a landline or mobile phone. Understanding these formats is essential for proper validation and international calling.
Peru Landline Number Format
Landline numbers consist of 9 digits total (including the national prefix):
The leading
0is the national prefix for domestic long-distance calls, followed by a 1 or 2-digit area code and the local number.Important distinction:
Example:
01 234 5678(area code 1 + 7-digit local number)054 123456(area code 54 + 6-digit local number)Source: Wikipedia "Telephone numbers in Peru"; Ministry of Transport and Communications
Peru Mobile Phone Number Format
Mobile numbers consist of 9 digits:
All mobile numbers begin with
9, followed by an 8-digit subscriber number. Since September 4, 2010, Peru's Mobile Virtual Area (MVA) makes all mobile numbers non-geographical – not attached to any region.Source: Ministry of Transport and Communications, September 4, 2010
Special Number Categories
In addition to standard landline and mobile numbers, Peru uses several special number categories:
0800+ 5 digits.0805+ 5 digits for voting, entertainment, and professional consultations.0801+ 5 digits for services where caller and receiver share costs (customer service, technical support).1800series numbers for priority routing.100series numbers for customer service and technical support.Note: All emergency calls are free of charge.
Source: Wikipedia "Telephone numbers in Peru"; New Peruvian emergency services guide
Phone Number Validation and Implementation for Developers
Implementing Peru phone number validation requires understanding specific patterns for different number types. Below are production-ready code examples for handling Peruvian phone numbers in your applications.
Input Sanitization
Sanitize user input before validation. Remove common formatting characters users may enter:
function sanitizePhoneNumber(input) { // Remove spaces, dashes, parentheses, and dots return input.replace(/[\s\-\(\)\.]/g, ''); } // Example usage: console.log(sanitizePhoneNumber('(01) 234-5678')); // '011234567' console.log(sanitizePhoneNumber('987 654 321')); // '987654321' console.log(sanitizePhoneNumber('+51 54 123456')); // '+5154123456'Convert international format to national:
function normalizeToNational(number) { // Remove all non-digit characters except leading + let cleaned = number.replace(/[^\d+]/g, ''); // If starts with +51, remove it to get national format if (cleaned.startsWith('+51')) { cleaned = cleaned.substring(3); } else if (cleaned.startsWith('51') && cleaned.length >= 11) { // Starts with 51 without + cleaned = cleaned.substring(2); } return cleaned; } // Example usage: console.log(normalizeToNational('+51 1 234567')); // '1234567' console.log(normalizeToNational('51987654321')); // '987654321' console.log(normalizeToNational('01-234-5678')); // '011234567'Source: Best practices for phone number handling
Validation
Validate Peruvian phone numbers with regular expressions:
const peruPhoneRegex = { landlineLima: /^(0)(1)\d{7}$/, // Lima/Callao: 01 + 7 digits landlineProvince: /^(0)([2-9][0-9])\d{6}$/, // Provinces: 0 + 2-digit code + 6 digits mobile: /^9\d{8}$/, tollFree: /^0800\d{5}$/, premium: /^0805\d{5}$/, sharedCost: /^0801\d{5}$/ }; function validatePeruPhoneNumber(number, type) { // First sanitize the input const cleaned = sanitizePhoneNumber(number); if (!peruPhoneRegex[type]) { return { valid: false, error: 'Invalid number type' }; } const isValid = peruPhoneRegex[type].test(cleaned); return { valid: isValid, error: isValid ? null : `Invalid ${type} number format` }; } // Example usage: console.log(validatePeruPhoneNumber('011234567', 'landlineLima')); // { valid: true, error: null } console.log(validatePeruPhoneNumber('054123456', 'landlineProvince')); // { valid: true, error: null } console.log(validatePeruPhoneNumber('987654321', 'mobile')); // { valid: true, error: null } console.log(validatePeruPhoneNumber('080012345', 'tollFree')); // { valid: true, error: null } console.log(validatePeruPhoneNumber('123', 'mobile')); // { valid: false, error: 'Invalid mobile number format' }Handle errors and edge cases:
function validatePeruPhoneNumberWithDetails(number) { try { // Handle null/undefined if (!number) { return { valid: false, error: 'Phone number is required', type: null }; } // Sanitize input const cleaned = sanitizePhoneNumber(number); // Check minimum length if (cleaned.length < 9) { return { valid: false, error: 'Phone number too short', type: null }; } // Check maximum length (E.164 allows max 15 digits, Peru uses max 9 domestic) if (cleaned.length > 15) { return { valid: false, error: 'Phone number too long', type: null }; } // Detect type and validate if (peruPhoneRegex.mobile.test(cleaned)) { return { valid: true, error: null, type: 'mobile' }; } else if (peruPhoneRegex.landlineLima.test(cleaned)) { return { valid: true, error: null, type: 'landlineLima' }; } else if (peruPhoneRegex.landlineProvince.test(cleaned)) { return { valid: true, error: null, type: 'landlineProvince' }; } else if (peruPhoneRegex.tollFree.test(cleaned)) { return { valid: true, error: null, type: 'tollFree' }; } else if (peruPhoneRegex.premium.test(cleaned)) { return { valid: true, error: null, type: 'premium' }; } else if (peruPhoneRegex.sharedCost.test(cleaned)) { return { valid: true, error: null, type: 'sharedCost' }; } return { valid: false, error: 'Invalid Peru phone number format', type: null }; } catch (e) { return { valid: false, error: 'Validation error: ' + e.message, type: null }; } } // Example usage with edge cases: console.log(validatePeruPhoneNumberWithDetails(null)); // Error: required console.log(validatePeruPhoneNumberWithDetails('')); // Error: required console.log(validatePeruPhoneNumberWithDetails('12')); // Error: too short console.log(validatePeruPhoneNumberWithDetails('999999999')); // Valid mobile console.log(validatePeruPhoneNumberWithDetails('01 234 5678')); // Valid Lima landlineSource: JavaScript validation best practices
Peru Area Codes Reference
Peru has 23 area codes (established March 1, 2003). Use this table when validating landline numbers:
Source: Wikipedia "Telephone numbers in Peru", Ministry of Transport and Communications (March 1, 2003)
Area code validation implementation:
const validPeruAreaCodes = [ 1, 41, 42, 43, 44, 51, 52, 53, 54, 56, 61, 62, 63, 64, 65, 66, 67, 72, 73, 74, 76, 82, 83, 84 ]; function validateAreaCode(areaCode) { return validPeruAreaCodes.includes(parseInt(areaCode)); } function extractAndValidateAreaCode(landlineNumber) { // Remove leading 0 if present const cleaned = landlineNumber.replace(/^0/, ''); // Try 1-digit area code (Lima) const oneDigitCode = parseInt(cleaned.substring(0, 1)); if (oneDigitCode === 1 && cleaned.length === 8) { return { valid: true, areaCode: 1, localNumber: cleaned.substring(1) }; } // Try 2-digit area code (provinces) const twoDigitCode = parseInt(cleaned.substring(0, 2)); if (validateAreaCode(twoDigitCode) && cleaned.length === 8) { return { valid: true, areaCode: twoDigitCode, localNumber: cleaned.substring(2) }; } return { valid: false, areaCode: null, localNumber: null }; } // Example usage: console.log(extractAndValidateAreaCode('011234567')); // { valid: true, areaCode: 1, localNumber: '1234567' } console.log(extractAndValidateAreaCode('0541234')); // { valid: true, areaCode: 54, localNumber: '123456' } console.log(extractAndValidateAreaCode('0991234567')); // { valid: false, ... } - Invalid area codeSource: OSIPTEL area code regulations
Best Practices:
9for mobile,0800for toll-free).Understanding E.164 International Phone Number Format
E.164 is the ITU-T (International Telecommunication Union) standard for phone number formats. It ensures every phone number is globally unique and routeable.
E.164 Format Structure:
+Peru E.164 Examples:
+511234567(country code 51 + area code 1 + 7-digit local number)+5154123456(country code 51 + area code 54 + 6-digit local number)+51987654321(country code 51 + 9-digit mobile number)Source: ITU-T Recommendation E.164 (11/2010)
Convert to E.164 format:
function toE164(number, defaultCountryCode = '51') { // Sanitize input let cleaned = number.replace(/[^\d+]/g, ''); // Already in E.164 format if (cleaned.startsWith('+')) { return cleaned; } // Remove country code if present without + if (cleaned.startsWith('51') && cleaned.length >= 11) { return '+' + cleaned; } // National format with leading 0 (landline) if (cleaned.startsWith('0')) { // Remove the leading 0 and add +51 return '+' + defaultCountryCode + cleaned.substring(1); } // Mobile number (starts with 9) if (cleaned.startsWith('9') && cleaned.length === 9) { return '+' + defaultCountryCode + cleaned; } // If we can't determine format, return as-is with country code return '+' + defaultCountryCode + cleaned; } // Example usage: console.log(toE164('011234567')); // '+511234567' console.log(toE164('054123456')); // '+5154123456' console.log(toE164('987654321')); // '+51987654321' console.log(toE164('+51 1 234567')); // '+511234567' console.log(toE164('51987654321')); // '+51987654321'Convert from E.164 format:
function fromE164(e164Number, format = 'national') { // Remove the + and country code let cleaned = e164Number.replace(/^\+51/, ''); if (format === 'national') { // Mobile numbers stay as-is if (cleaned.startsWith('9')) { return cleaned; } // Landlines get leading 0 return '0' + cleaned; } if (format === 'international') { return '+51 ' + cleaned; } return cleaned; } // Example usage: console.log(fromE164('+511234567', 'national')); // '011234567' console.log(fromE164('+5154123456', 'national')); // '054123456' console.log(fromE164('+51987654321', 'national')); // '987654321' console.log(fromE164('+511234567', 'international')); // '+51 1234567'Source: Twilio E.164 documentation, ITU-T Recommendation
Formatting
Format numbers for readability:
function formatPeruPhoneNumber(number, type) { if (type === 'mobile') { return number.replace(/(\d{3})(\d{3})(\d{3})/, '$1 $2 $3'); } else if (type === 'landlineLima') { return number.replace(/(\d{2})(\d{3})(\d{4})/, '$1 $2 $3'); } else if (type === 'landlineProvince') { return number.replace(/(\d{3})(\d{6})/, '$1 $2'); } return number; // Return as is for other types } // Example usage: console.log(formatPeruPhoneNumber('987654321', 'mobile')); // 987 654 321 console.log(formatPeruPhoneNumber('011234567', 'landlineLima')); // 01 123 4567 console.log(formatPeruPhoneNumber('054123456', 'landlineProvince')); // 054 123456Parse formatted numbers to raw format:
function unformatPeruPhoneNumber(formattedNumber) { // Remove all non-digit characters except leading + return formattedNumber.replace(/[^\d+]/g, ''); } // Example usage: console.log(unformatPeruPhoneNumber('987 654 321')); // '987654321' console.log(unformatPeruPhoneNumber('01 123 4567')); // '011234567' console.log(unformatPeruPhoneNumber('(054) 123-456')); // '054123456' console.log(unformatPeruPhoneNumber('+51 987 654 321')); // '+51987654321'Source: Phone number formatting best practices
How to Call Peru from Abroad: International Dialing Guide
Dial a Peruvian number from another country using this format:
Examples:
01 234 5678) from abroad, dial+51 1 234 5678.054 123456) from abroad, dial+51 54 123456.987 654 321) from abroad, dial+51 987 654 321.International Dialing from Peru:
Peru uses a "call by call" system – choose carriers with 4-digit prefixes (19XX):
Format:
19XX + 00 + country code + area code + phone numberNote: The 19XX prefix is mandatory from fixed lines. Mobile users can dial with + instead.
Source: Wikipedia "Telephone numbers in Peru"
Best Phone Number Validation Libraries and Tools
Use established libraries instead of custom regex for production:
libphonenumber (Google)
libphonenumber is Google's library for parsing, formatting, and validating international phone numbers (Java, C++, JavaScript).
Key features:
JavaScript Example:
// Using libphonenumber-js (lightweight JavaScript port) import { parsePhoneNumber } from 'libphonenumber-js'; const phoneNumber = parsePhoneNumber('987654321', 'PE'); console.log(phoneNumber.isValid()); // true console.log(phoneNumber.format('E.164')); // '+51987654321' console.log(phoneNumber.format('INTERNATIONAL')); // '+51 987 654 321' console.log(phoneNumber.format('NATIONAL')); // '987 654 321' console.log(phoneNumber.getType()); // 'MOBILE'Links:
Source: Google libphonenumber repository
Twilio Lookup API
For server-side validation with real-time carrier and portability information:
// Using Twilio Lookup API const client = require('twilio')(accountSid, authToken); client.lookups.v1.phoneNumbers('+51987654321') .fetch() .then(phone_number => { console.log(phone_number.phoneNumber); // '+51987654321' console.log(phone_number.nationalFormat); // '987 654 321' console.log(phone_number.countryCode); // 'PE' });Features:
Source: Twilio Lookup API documentation
Database Storage Best Practices
Store phone numbers in E.164 format.
Benefits:
Schema recommendations:
CREATE TABLE users ( id SERIAL PRIMARY KEY, phone_e164 VARCHAR(15) NOT NULL UNIQUE, -- E.164 format: +51987654321 phone_country_code VARCHAR(3) DEFAULT 'PE', phone_type VARCHAR(20), -- 'mobile', 'landline', 'tollfree', etc. created_at TIMESTAMP DEFAULT NOW() ); -- Create index for fast lookups CREATE INDEX idx_phone_e164 ON users(phone_e164);Storage Tips:
VARCHAR(15)Source: Database design best practices for phone numbers
Peru Mobile Operators: Market Share and Coverage (2024)
Peru's telecommunications market has four major operators (December 2024):
All four operators hold 20–30% market share. Bitel gains rapidly; Movistar loses share despite infrastructure advantages.
Source: OSIPTEL, December 2024
Future Trends: 5G and IoT in Peru's Telecommunications
OSIPTEL shapes Peru's numbering plan to accommodate:
OSIPTEL manages number allocation through structured application, evaluation, and implementation phases – ensuring efficient use of limited resources. Telecommunications investments increased 3.4% in 2024, with operating revenues reaching S/21,129 million (1.1% increase from 2023).
Source: OSIPTEL, 2024-2025 reports
Additional Resources
Consult OSIPTEL's official documentation for the most up-to-date information and regulations.
Common Questions About Peru Phone Numbers (FAQ)
What is Peru's country code for international calls?
Peru's country code is +51. Call Peru from abroad by dialing your country's international access code (e.g., 00 from most countries, 011 from the US/Canada), followed by 51, then the area code and local number. For example, to call a Lima landline (01 234 5678) from the US, dial 011-51-1-2345678. Mobile numbers don't require an area code – dial +51 followed by the 9-digit mobile number starting with 9.
How do I format Peru phone numbers correctly?
Peru phone numbers follow specific formats: Landlines use 0 + area code (1-2 digits) + local number (6-7 digits). Lima/Callao landlines have 7-digit local numbers (e.g., 01 234 5678), while provincial landlines have 6-digit local numbers (e.g., 054 123456 for Arequipa). Mobile numbers are 9 digits starting with 9 (e.g., 987 654 321). For international format, use +51 followed by the number without the leading 0 for landlines.
What are the main area codes in Peru?
Peru has 23 area codes. Lima and Callao use area code 1. Major provincial codes include: 54 (Arequipa), 84 (Cusco), 44 (Trujillo/La Libertad), 73 (Piura), 74 (Chiclayo/Lambayeque), 76 (Cajamarca), 51 (Puno), 64 (Huancayo/Junín), 43 (Huaraz/Ancash), and 65 (Iquitos/Loreto). All provincial area codes are 2 digits long. Mobile numbers don't use area codes since the creation of the Mobile Virtual Area (MVA) in September 2010.
How can I validate Peru phone numbers in my application?
Validate Peru phone numbers using regex patterns that account for format differences. For Lima/Callao landlines, use
/^(0)(1)\d{7}$/(01 + 7 digits). For provincial landlines, use/^(0)([2-9][0-9])\d{6}$/(0 + 2-digit code + 6 digits). For mobile numbers, use/^9\d{8}$/(9 + 8 digits). Always sanitize input first (remove spaces, dashes, parentheses) and cross-reference area codes against OSIPTEL's official list. For production use, consider Google's libphonenumber library for comprehensive validation.What is number portability in Peru and how does it work?
Number portability in Peru allows you to switch telecommunications operators while keeping your phone number. Mobile number portability (MNP) launched January 1, 2010, and was relaunched July 16, 2014 with 24-hour porting time. Fixed number portability (FNP) launched July 26, 2014. The process is free, managed through a centralized database (contract period: April 2024–April 2029), and regulated by OSIPTEL. Verify portability status at https://www.osiptel.gob.pe/portabilidad.
What are Peru's emergency phone numbers?
Peru's emergency numbers are: 105 (Police – National Police emergency), 106 (Ambulance – SAMU, Ministry of Health), 116 (Fire – Bomberos Voluntarios), 911 (Emergency switchboard connecting to police and other services), and 115 (Peruvian Red Cross for large-scale emergencies). 103 provides telephone information. All emergency calls are free of charge. These numbers work from both landlines and mobile phones throughout Peru.
Who are the major mobile operators in Peru?
As of December 2024, Peru has four major operators: Claro (30.05% market share, 12.83 million lines), Movistar (26.57%, 11.35 million lines), Entel (22.61%, 9.66 million lines), and Bitel (20.49%, 8.75 million lines). Bitel shows the strongest growth at 12.39% year-over-year, while Movistar declined 1.95%. The total market reached 42.70 million lines in December 2024, growing 3.28% from 2023. All operators offer mobile number portability.
How do I call internationally from Peru?
Peru uses a "call by call" system where you select a carrier using a 4-digit prefix (19XX format): Claro (1912), Movistar (1911), Bitel (1968), Americatel (1977), Entel (1990), IDT (1914), or Convergia (1960). Format: 19XX + 00 + country code + area code + number. The 19XX prefix is mandatory from fixed lines but optional from mobile phones. Mobile users can alternatively dial + followed by the country code.
What is the Mobile Virtual Area (MVA) in Peru?
Peru's Mobile Virtual Area (MVA) launched September 4, 2010, making all mobile numbers non-geographical – not attached to any specific region. All mobile numbers became 9 digits long (format: 9XX XXX XXX) and area codes no longer apply to mobile numbers. This means you dial mobile numbers the same way anywhere in Peru (just the 9-digit number), and mobile-to-mobile calls don't require area codes or prefixes.
Do Lima and provincial landlines have different formats?
Yes. Lima and Callao (area code 1) use 7-digit local numbers (format: 01 XXX XXXX), totaling 9 digits with the leading 0. All other regions use 6-digit local numbers with 2-digit area codes (format: 0XX XXXXXX), also totaling 9 digits. This distinction is critical for validation – your regex patterns must account for both formats. From abroad, dial +51-1-XXXXXXX for Lima or +51-XX-XXXXXX for provinces.
What is E.164 format and why should I use it?
E.164 is the international standard for phone number formats (ITU-T Recommendation). It ensures globally unique, unambiguous phone numbers. Format:
+followed by country code (51 for Peru) and subscriber number, maximum 15 digits total. Example:+51987654321for a Peru mobile. Benefits: eliminates ambiguity, enables international routing, simplifies validation, recommended for database storage. Use libphonenumber library to convert between E.164 and national formats.