phone number standards
phone number standards
Hungary Phone Numbers: Format, Area Code & Validation Guide
Comprehensive guide covering Hungarian phone number formats, validation patterns, and area codes for developers building telephony applications.
Hungary Phone Numbers: Format, Area Code & Validation Guide
This comprehensive guide covers Hungarian phone number formats, validation patterns, and area codes for developers building telephony applications. Learn how to implement E.164 validation, handle mobile number portability, integrate emergency services, and maintain regulatory compliance with Hungary's National Media and Infocommunications Authority (NMHH).
Quick Navigation:
- Geographic Phone Numbers
- Mobile Phone Numbers
- Emergency Services
- Phone Number Validation
- Technical Requirements
Geographic Numbering
Hungary's geographic phone numbering system divides the country into distinct regions, each with its own area code. The National Media and Infocommunications Authority (NMHH) oversees the official numbering plan and regulatory framework for all Hungarian telecommunications.
Budapest Phone Numbers (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 use seven digits after the national prefix (06), providing approximately 8 million available numbers for the capital region.
Example: 06 1 234 5678
Hungarian Regional Area Codes
Outside Budapest, Hungarian phone numbers use two-digit area codes. Major regional area codes include:
- 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
Note: This list includes major regional codes. For the complete official numbering plan, consult the NMHH National Numbering Plan database.
Regional numbers use six digits after the area code and national prefix.
Example: Székesfehérvár number: 06 22 345 678
Hungarian Mobile Phone Numbers
Hungarian mobile phone numbers utilize specific prefixes for operator identification. All mobile numbers follow the format 06 XX XXX XXXX with the country code +36 for international dialing.
| 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 use seven digits after the prefix and national prefix (06), formatted as 06 30 XXX XXXX. Important: Number portability means the prefix doesn't guarantee the current operator. Always perform a portability check if you need accurate operator information.
Number portability was introduced in Hungary in July 2004, allowing subscribers to change operators while retaining their phone numbers. The porting process typically takes 1–2 business days.
Validating Hungarian Mobile Numbers
Here's a JavaScript example for validating Hungarian mobile phone 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)For international format validation:
const validateInternationalMobile = (number) => {
// Remove spaces and handle both +36 and 0036 formats
const cleaned = number.replace(/\s+/g, '');
const pattern = /^(\+36|0036)(20|30|31|70)\d{7}$/;
return pattern.test(cleaned);
};
// Example usage
console.log(validateInternationalMobile("+36 30 123 4567")); // true
console.log(validateInternationalMobile("0036201234567")); // trueHungarian Emergency Services and Phone Numbers
Hungary uses Advanced Mobile Location (AML) technology to provide accurate location data to emergency services when calling 112 or other emergency numbers:
- Accuracy: ≤ 50 meters horizontal
- Response Time: < 30 seconds
- Reliability: 95%
- Transmission: SMS-based with HTTPS fallback and end-to-end encryption
- Language Support: English, German, and other major European languages
Hungarian Phone Number Validation: Implementation Guidelines
Validation Patterns and Regular Expressions
Here are robust regular expressions for validating Hungarian phone numbers in your application:
// 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
When integrating emergency services, consider these requirements:
-
Zero-rating: Make emergency calls free of charge (zero-rated). Implement network-level zero-rating, verify it every 24 hours, and use a local cache as fallback.
-
Location Services: Activate AML when dialing emergency numbers. Implement fallback mechanisms for devices that don't support AML and adhere to privacy regulations and data retention policies.
-
GDPR Compliance: Process location data only for emergency response purposes, transmit it securely, and retain it only as necessary (typically 24–72 hours for non-incident data). User consent is not required for emergency location data under GDPR Article 6(1)(d) (vital interests).
-
Data Retention: Retain emergency call records for at least 12 months per Hungarian telecommunications law. Anonymize location data after the retention period expires.
-
Critical Warning: Emergency service implementation must comply with NMHH regulation 2/2015. (III. 30.) on emergency call handling. This regulation mandates free emergency access, accurate location transmission, and 24/7 service availability.
Understanding Hungarian Phone Numbers: A Quick Reference
- Country Code: +36
- International Prefix: 00
- National Prefix: 06
- Emergency Number: 112 (universal EU emergency number)
- Police: 107
- Fire Service: 105
- Ambulance: 104
Local Dialing Rules and Formatting
function formatHungarianNumber(number, type) {
if (!number) throw new Error('Number is required');
if (!['local', 'national', 'international'].includes(type)) {
throw new Error('Type must be local, national, or international');
}
const cleaned = number.replace(/\s+/g, '');
switch(type) {
case 'local':
return cleaned.replace(/(\d{3})(\d{4})/, '$1 $2');
case 'national':
return `06 ${cleaned.replace(/(\d{2})(\d{3})(\d{4})/, '$1 $2 $3')}`;
case 'international':
return `+36 ${cleaned.replace(/(\d{2})(\d{3})(\d{4})/, '$1 $2 $3')}`;
}
}
// Example usage
console.log(formatHungarianNumber('301234567', 'national')); // "06 30 123 4567"
console.log(formatHungarianNumber('301234567', 'international')); // "+36 30 123 4567"Hungarian Mobile Number Portability
Best Practice: Always verify number portability before routing calls to ensure calls reach the correct operator network. Here's a Python example for implementing portability checks:
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 TrueImplementation for validation and portability checking:
def is_valid_hungarian_number(msisdn):
"""Validate Hungarian mobile number format"""
import re
# Accept formats: 06XXXXXXXXX or +36XXXXXXXXX
pattern = r'^(06|\+36)(20|30|31|70)\d{7}$'
cleaned = re.sub(r'\s+', '', msisdn)
return bool(re.match(pattern, cleaned))
def is_in_porting_process(msisdn):
"""Check if number is currently being ported
This requires integration with a portability database.
Common providers include:
- NMHH Central Reference Database (official)
- Operator-specific portability APIs
"""
# Placeholder - implement with actual API integration
# Example: query your portability database
# response = portability_api.check_status(msisdn)
# return response.status == 'IN_PROGRESS'
raise NotImplementedError("Integrate with portability database API")Portability Database Access: Contact the NMHH or your telecommunications operator for access to the Central Reference Database (CRD) for real-time portability checks. Most operators provide API access to authorized service providers.
Performance Expectations:
- Response time: 50–200 ms
- Rate limits: 100–1,000 requests per minute (varies by service agreement)
Market Analysis and Operator Distribution (2023)
Mobile market share distribution (2023):
- Magyar Telekom: 46%
- Yettel: 26%
- Vodafone Hungary: 26%
- DIGI: 2%
Note: Market shares change frequently. Check NMHH statistics for current data.
Technical Requirements Checklist
This checklist summarizes key technical requirements for developers:
Number Block Management
Number block management refers to the allocation and monitoring of phone number ranges assigned to telecommunications operators by the NMHH. This applies to licensed operators and service providers who hold number block allocations, not to end-user application developers.
For licensed operators:
- Monitor minimum 65% utilization of allocated number blocks
- Track number block recovery over 24 months
- 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 (easily memorable sequences like 06 30 111 1111, repeating digits, or sequential patterns) are subject to NMHH oversight and may have specific allocation requirements. Premium services require explicit user consent and cost notifications.
Common Golden Number Patterns:
- Repeating digits:
06 30 111 1111 - Sequential:
06 30 123 4567 - Palindromes:
06 30 121 1210
Contact the NMHH or your telecommunications operator to apply for golden number allocations.
Number Blocking
Hungary implements number blocking for various purposes:
- Reserved numbers: Set aside for future use or special services
- Restricted numbers: Blocked for regulatory or legal reasons
- Temporary blocks: Applied during porting or administrative processes
Check the NMHH's blocked range database regularly to ensure compliance. Implement a validation layer that checks numbers against the blocked range list before processing.
const isNumberBlocked = async (phoneNumber) => {
// Fetch blocked ranges from NMHH or cached list
const blockedRanges = await getBlockedRanges();
return blockedRanges.some(range =>
phoneNumber >= range.start && phoneNumber <= range.end
);
};Consumer Protection
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 result in:
- Fines: Hundreds of thousands to millions of HUF (depending on violation severity)
- License suspension
- Service interruption
Maintain thorough compliance documentation and regular audit trails. Contact NMHH for specific penalty schedules.