Hungary Phone Numbers: Format, Area Code & Validation Guide
This guide provides a detailed overview of the Hungarian phone numbering system, covering geographic and mobile formats, validation, emergency services, best practices, and regulatory considerations. This information is crucial for developers building applications that interact with Hungarian phone numbers, ensuring accurate communication and compliance with local regulations.
Geographic Numbering
Hungary's geographic numbering system, overseen by the National Media and Infocommunications Authority (NMHH), divides the country into distinct regions, each with its own area code.
Budapest (Metropolitan Area)
- Area Code: 1
- Format:
06 1 XXX XXXX
(7 digits after the national prefix) - Coverage: All 23 districts of Budapest
Budapest phone numbers are seven digits long following the national prefix (06), providing a capacity of approximately 8 million numbers.
Regional Area Codes
Outside Budapest, two-digit area codes are used. Here are a few examples:
- 22: Székesfehérvár region
- 23: Biatorbágy region
- 24: Szigetszentmiklós region
- 25: Dunaújváros region
- 32: Salgótarján region
- 36: Eger region
- 42: Nyíregyháza region
- 46: Miskolc region
- 52: Debrecen region
- 62: Szeged region
- 72: Pécs region
- 92: Zalaegerszeg region
- 96: Győr region
- 99: Sopron region
Numbers in these regions have six digits following the area code and national prefix. For instance, a number in Székesfehérvár might look like 06 22 XXX XXX
.
Mobile Numbering
Hungarian mobile numbers utilize specific prefixes for operator identification.
Prefix | Operator | Network Technology |
---|---|---|
20 | Yettel (formerly Telenor) | 4G/5G |
30 | Magyar Telekom | 4G/5G |
31 | Digi Mobile | 4G |
70 | Vodafone | 4G/5G |
All mobile numbers are seven digits long after the prefix and national prefix (06), resulting in a format like 06 30 XXX XXXX
. Keep in mind that number portability is implemented in Hungary, so the prefix doesn't guarantee the current operator. You should always perform a portability check if accurate operator information is required.
Validating Mobile Numbers
Here's a JavaScript example for validating mobile numbers:
const validateMobileNumber = (number) => {
const pattern = /^06(20|30|31|70)\d{7}$/;
return pattern.test(number);
};
// Example usage
console.log(validateMobileNumber("06301234567")); // true
console.log(validateMobileNumber("0611234567")); // false (geographic number)
console.log(validateMobileNumber("0620123456")); // false (incorrect length)
Emergency Services
Hungary utilizes Advanced Mobile Location (AML) technology, providing accurate location data to emergency services. AML boasts a horizontal accuracy of ≤ 50 meters, a response time of < 30 seconds, and a 95% reliability rate. The system uses SMS-based location transmission with HTTPS fallback and end-to-end encryption. Emergency call centers also employ a multi-language support system.
Implementation Guidelines
Validation Patterns
Here are robust regular expressions for validating Hungarian phone numbers:
// Geographic numbers (including Budapest)
const geoPattern = /^06([1-9][0-9])\d{6,7}$/;
// Mobile numbers
const mobilePattern = /^06(20|30|31|70)\d{7}$/;
Emergency Access
Integrating emergency services into your application requires careful consideration of these factors:
-
Zero-rating: Emergency calls must be free of charge (zero-rated). Implement network-level zero-rating and verify it at least every 24 hours. A local cache mechanism can serve as a fallback.
-
Location Services: Ensure AML is activated when dialing emergency numbers. Implement fallback mechanisms for devices that don't support AML. Adhere to privacy regulations and data retention policies.
-
Critical Warning: Emergency service implementation must comply with NMHH regulation 2/2015. (III. 30.) on emergency call handling.
Understanding Hungarian Phone Numbers: A Quick Reference
- Country Code: +36
- International Prefix: 00
- National Prefix: 06
- Emergency Number: 112
Local Dialing Rules and Formatting
function formatHungarianNumber(number, type) {
switch(type) {
case 'local':
return number.replace(/(\d{3})(\d{4})/, '$1 $2'); // For local calls within the same area code
case 'national':
return `06 ${number.replace(/(\d{2})(\d{3})(\d{4})/, '$1 $2 $3')}`; // Within Hungary
case 'international':
return `+36 ${number.replace(/(\d{2})(\d{3})(\d{4})/, '$1 $2 $3')}`; // From abroad
}
}
Number Portability
Best Practice: Always check number portability before routing calls. This ensures calls are directed to the correct operator. Here's a Python example demonstrating a basic portability check:
def validate_portability_request(msisdn):
if not is_valid_hungarian_number(msisdn):
raise ValidationError("Invalid number format")
if is_in_porting_process(msisdn):
raise PortingError("Number already in porting process")
return True
You'll need to implement the is_valid_hungarian_number
and is_in_porting_process
functions based on your chosen portability database or API.
Market Analysis and Operator Distribution (2023)
According to Statista, the mobile market share distribution in 2023 was approximately:
- Magyar Telekom: 46%
- Yettel: 26%
- Vodafone Hungary: 26%
- DIGI: 2%
Technical Requirements Checklist
This checklist summarizes key technical requirements for developers:
Number Block Management
- Implement monitoring for minimum 65% utilization of allocated number blocks.
- Track number block recovery over a 24-month period.
- Automate reporting to the NMHH.
Service Quality Monitoring
- Set up alerts for maintenance windows exceeding 4 hours.
- Track and maintain 99.9% service availability.
- Prioritize emergency services routing.
Technical Restrictions and Regulations
Golden Numbers and Special Allocations
Premium or "golden" numbers (e.g., easily memorable sequences) are subject to NMHH oversight and may have specific allocation requirements. Premium services often require explicit user consent and cost notifications.
Number Blocking
Hungary implements number blocking for various purposes (reserved, restricted, temporary). Consult the NMHH's blocked range database regularly.
Consumer Protection
Transparency is paramount. Provide clear service information, pricing, and terms. Give users at least 30 days' notice for any changes. Guarantee access to emergency services (112) regardless of account status.
Critical Warning: Non-compliance with NMHH regulations can lead to severe penalties, including substantial fines and potential license suspension. Maintain thorough compliance documentation and regular audit trails.