Frequently Asked Questions
Regular expressions offer a powerful method for validating Mexican phone number formats. Simplified examples include ^\+52(?:1)?[2-9]\d{9,10}$
for basic validation and more specific regex for mobile (^\+521[2-9]\d{9}$
) and landline (^\+52[2-9]\d{9,10}$
) numbers. For production, more robust patterns are recommended to handle edge cases and area code specifics. Consult resources like the IFT website for up-to-date area code information for accurate validation in your applications.
Mexican mobile numbers follow the format +52 1 [Area Code] [Subscriber Number]
. The "1" after the country code (+52) is essential for distinguishing mobile numbers from landlines. This identifier is crucial for routing calls correctly and should always be included when storing or processing mobile numbers from Mexico.
+52 is the internationally recognized country code assigned to Mexico. It must be included when dialing Mexican numbers from outside the country. Within Mexico, 10-digit dialing is now standard, using area code + subscriber number after the 2019 reforms.
The E.164 format (+5215512345678 for mobile, +525512345678 for landline) is the international standard and is recommended for storing phone numbers. This format ensures compatibility with international systems and simplifies processing for various telecommunication applications and services, as it provides a unified structure for storing and managing phone number data from different countries.
Mexico City's area code is 55. Major metropolitan areas in Mexico typically use 2-digit area codes, while smaller cities and rural areas use 3-digit codes. It's important to validate using updated resources, as area codes can change over time, particularly with number portability and regulatory changes.
For improved readability, format numbers with spaces or other separators. For a 12-digit mobile number, a suggested display format is +52 1 AA BBB CCCC
, and for an 11-digit landline, +52 AA BBB CCCC
. Remember to always store the raw E.164 format separately for processing and data consistency.
While regex is useful for initial format validation, relying solely on it for area code validation is insufficient due to number portability and dynamic area code assignments. For accurate validation, consider using a regularly updated area code database or an external API that reflects the latest changes in number assignments and portability.
The 2019 reforms simplified Mexico's dialing system by eliminating long-distance prefixes within the country, standardizing 10-digit dialing (area code + subscriber number), and enhancing number portability. These changes simplified validation and call routing processes, as callers no longer need to dial long-distance prefixes within Mexico.
Number portability allows users to switch carriers while keeping their number. This makes carrier identification based solely on the number unreliable. For accurate carrier identification, consider using a real-time lookup service via API or similar methods.
The IFT (Federal Institute of Telecommunications) is the primary regulatory body for telecommunications in Mexico. Consult their website (ift.org.mx) for the latest regulations, area code updates, and other important information related to Mexico's telecommunications sector.
You can find a list of Mexican area codes on the IFT (Federal Institute of Telecommunications) website, Wikipedia's page on area codes in Mexico, and other online resources. However, be sure to use reliable and up-to-date sources as area codes can change.
Mexico Phone Numbers: Format, Area Code & Validation Guide
Understanding the Mexico phone number format is essential for developers building telecommunications applications, CRM systems, or SMS platforms. This comprehensive guide covers Mexico's +52 country code structure, validation rules, formatting standards, and regulatory compliance requirements to help you implement accurate phone number processing for Mexican telecommunications.
Understanding Mexico's Numbering Plan
Mexico's phone number system blends traditional and modern telecommunications infrastructure. The Federal Institute of Telecommunications (IFT) – Mexico's independent regulatory agency – manages telephone numbers and published the Fundamental Technical Plan for Numbering on May 11, 2013. Understanding these nuances ensures accurate validation and processing.
[Source: IFT Official Documentation, 2013]
How Are Mexican Phone Numbers Structured?
Mexican phone numbers follow a standardized structure:
Area Code and Subscriber Number Correlation:
The total length of area code plus subscriber number always equals exactly 10 digits:
This inverse relationship ensures consistent 10-digit national numbers across all of Mexico.
[Source: IFT Fundamental Technical Plan for Numbering, 2013]
How Do You Distinguish Mobile from Landline Numbers?
Important: Mexico eliminated the distinct mobile number format in August 2020. Both mobile and landline numbers now use the same format:
+52 [Area Code] [Subscriber Number]
.Before August 2020, you had to include a "1" after the country code for mobile numbers (
+52 1 [Area Code] [Subscriber Number]
). Mexico removed this requirement to align with international standards.[Source: Multiple telecom provider announcements, August 2020]
You cannot reliably distinguish mobile from landline numbers by format alone due to number portability and the unified format.
Carrier Identification Methods
When you need to distinguish mobile from landline numbers, use one of these methods:
Developer Recommendation: For production systems requiring mobile/landline distinction, integrate a phone number validation API with caching to balance accuracy and cost. Implement fallback logic that assumes mobile for critical use cases (e.g., SMS delivery) when API calls fail.
[Sources: Tlaloc Web Services documentation, Twilio Lookup API documentation, 2024]
What Changed in Mexico's 2019–2020 Numbering Reforms?
Mexico implemented significant reforms that simplified dialing and number handling:
August 3, 2019 Reform
The IFT approved major changes to standardize domestic dialing:
[Source: IFT Press Release 54/2014]
[Source: IFT Fundamental Technical Plan for Numbering, effective August 3, 2019]
August 2020 International Dialing Change
Mexico eliminated the "1" mobile identifier for international calls:
+52 1 [Area Code] [Subscriber Number]
for mobile numbers+52 [Area Code] [Subscriber Number]
for both mobile and landline numbersThis change aligned Mexico's international dialing format with global standards and simplified calling procedures for international callers. Update any legacy systems still using the old format by removing the "1" after "+52" in your validation logic and stored numbers.
[Source: Telecom provider notifications, August 2020]
These reforms simplify validation and routing logic for developers.
How Do You Validate Mexican Phone Numbers?
Build robust validation that ensures data integrity and delivers a smooth user experience.
Regular Expressions
Use regular expressions to validate number formats:
These regex examples are simplified for illustration. For production environments, build more robust patterns that handle edge cases and validate specific area codes.
Consult the IFT website for current area code information.
Important: Update older validation logic that checks for the "+52 1" mobile format. This format is outdated – use the current unified format implemented in August 2020.
Area Code Validation
Don't rely solely on regex for area code validation. Area codes change and number portability complicates validation. Use a regularly updated area code database or an external API for accurate validation.
Recommended Validation Services:
Cost and Performance Considerations:
Fallback Strategy:
[Sources: Twilio, Telesign, AbstractAPI documentation, 2024]
Best Practices
How to Format Mexican Phone Numbers Correctly
Format numbers consistently for improved readability and data integrity.
E.164 Format
The E.164 format is the international standard. Store phone numbers in this format:
+525512345678
(Mobile or Landline – unified format)+523312345678
(Mobile or Landline – unified format)Why E.164 for Storage:
Store phone numbers in E.164 format because it:
Convert to localized display formats only when presenting to users. This approach ensures data integrity while maintaining user-friendly interfaces.
[Source: ITU-T E.164 Recommendation]
Display Formatting
Format numbers for display purposes to enhance readability:
Note: This function reflects Mexico's current unified format. Remove legacy logic that formatted mobile numbers with the "1" identifier – that format became obsolete in August 2020.
What Regulatory Requirements Apply to Mexican Phone Numbers?
Stay current with Mexican telecommunications regulations.
Key Regulations and Bodies
[Source: IFT Press Release 54/2014]
Data Privacy Compliance
LFPDPPP (Federal Law on Protection of Personal Data Held by Private Parties):
Mexico's primary data privacy law, updated March 21, 2025, applies to all private entities processing personal data in Mexico. Phone numbers qualify as personal data and require:
Enforcement: The Secretariat of Anti-Corruption and Good Governance (Secretaría de la Función Pública) enforces LFPDPPP. Penalties range from 100 to 320,000 times the UMA (Unit of Measurement and Update, ~$108 USD as of 2024). Higher fines apply to sensitive data breaches and repeat violations. Severe violations trigger criminal sanctions.
[Sources: LFPDPPP 2025, Mexican Official Gazette, March 20, 2025]
SMS Compliance Requirements
REPEP Registry (Public Registry to Avoid Advertising):
Federal Telecommunications and Broadcasting Law Requirements:
Prohibited SMS Content: Firearms, gambling, adult content, predatory loans, lead generation, text-to-pay services, controlled substances, cannabis, alcohol, and political campaigns.
For comprehensive SMS compliance guidance, see our Mexico SMS guide.
[Sources: IFT Federal Telecommunications and Broadcasting Law, PROFECO REPEP regulations, 2024]
Best Practices
Additional Resources
Frequently Asked Questions About Mexico Phone Numbers
What is Mexico's country code for phone numbers?
Mexico's country code is +52. Use this prefix when dialing Mexican phone numbers internationally. The complete format is +52 followed by a 10-digit number (area code + subscriber number).
How do you dial a Mexican mobile phone from the US?
Dial 011 (US exit code), then 52 (Mexico country code), followed by the 10-digit Mexican number (area code + subscriber number). For example: 011 52 55 1234 5678. Don't add a "1" after 52 – Mexico eliminated that format in August 2020.
What are the main area codes in Mexico?
Major Mexican area codes include:
For a complete list, consult the Wikipedia area codes reference or the IFT website.
[Source: IFT, Wikipedia]
Can you tell if a Mexican number is mobile or landline?
No. You cannot reliably distinguish mobile from landline numbers by format alone. Since the 2019–2020 reforms, both types use the same format (+52 + 10 digits) and can share area codes due to number portability.
What happened to the +52 1 mobile format?
Mexico eliminated the "+52 1" mobile format in August 2020 to align with international standards. All Mexican numbers now use the unified format +52 [Area Code] [Subscriber Number], regardless of whether they're mobile or landline.
How long does number portability take in Mexico?
IFT regulations require carriers to complete number portability within 24 hours. Users can switch carriers while keeping their existing phone number with minimal disruption.
[Source: IFT Press Release 54/2014]
What is the E.164 format for Mexican phone numbers?
The E.164 format for Mexican phone numbers is +52 followed immediately by 10 digits with no spaces or special characters. Example: +525512345678. This international standard format is recommended for storing phone numbers in databases.
When did Mexico eliminate the 01, 044, and 045 dialing prefixes?
Mexico eliminated these prefixes on August 3, 2019, as part of IFT's numbering reform. The "01" long-distance prefix and "044"/"045" mobile prefixes are no longer needed – all domestic calls now use simple 10-digit dialing.
International SMS and MMS Considerations
SMS Delivery to Mexico
Carrier Network: Mexico's SMS market is dominated by three carriers: Telcel (58.7% market share, Q1 2024), AT&T Mexico (15.6%), and Movistar/Telefónica (16.7%).
Message Encoding:
Sender ID Options:
Two-way SMS: Fully supported with no special restrictions.
MMS Support
MMS messages are automatically converted to SMS with embedded URL links to multimedia content. Ensure URLs are shortened and clearly labeled to encourage engagement.
You cannot send SMS to landline numbers – attempts result in error code 21614 with no charges.
Cost Considerations
Typical International SMS Pricing to Mexico (2024 estimates):
Prices vary by carrier, message type, and volume. Concatenated messages charged per segment. Consult provider pricing pages for current rates.
Throughput: Standard rate: 1 message/second per source number. Burst rate: up to 30 messages/second with proper queuing and carrier agreements.
[Sources: Twilio, Sinch, MessageBird, Plivo pricing pages; Mexico SMS compliance guide, 2024]
Troubleshooting Common Issues
Validation Errors
Issue: Numbers fail validation despite appearing correct
Issue: API validation returns "invalid" for known working numbers
Formatting Errors
Issue: Display formatting produces incorrect spacing
Issue: Users enter numbers in various formats (spaces, dashes, parentheses)
SMS Delivery Failures
Issue: Messages not delivered despite valid numbers
Issue: High bounce rates or carrier filtering
Compliance Issues
Issue: Unable to determine if consent was obtained
Issue: LFPDPPP privacy notice requirements unclear
[Sources: Twilio troubleshooting guides, IFT compliance documentation, developer community reports, 2024]
Follow these guidelines and stay informed about regulatory changes to ensure accurate, compliant handling of Mexican phone numbers in your applications.