Frequently Asked Questions
The country code for San Marino is +378. This code is required when dialing a San Marino number from another country. All San Marino numbers, regardless of type, are prefixed with +378.
Use the E.164 format, which is +378 followed by the 8-digit subscriber number. For example, a landline number would be formatted as +37805491234, and a mobile number as +37861234567. This international standard ensures compatibility with global systems.
Use the regular expression ^\+378 0549 \d{4}$
to validate San Marino landline numbers. This regex checks for the correct country code (+378), area code (0549), and four-digit subscriber number. Ensure the regex is appropriately escaped for your programming language.
The area code for all landlines in San Marino is 0549. This area code is used for domestic routing and is also reachable using the Italian country code +39 due to historical ties.
+378 is the internationally assigned country code for San Marino, designated by the International Telecommunication Union (ITU-T). This code uniquely identifies San Marino in the global telecommunications system and ensures interoperability with other countries.
San Marino mobile numbers are identifiable by the leading '6' after the country code. They follow the format +378 6XXX XXXX. This allows for easy distinction from landlines and premium rate services.
Premium rate services in San Marino are identified by the prefix '7' after the country code (+378). These numbers usually indicate specialized services or higher call charges. The full format is +378 7XXX XXXX.
Store San Marino phone numbers in a VARCHAR(15) field in your database, using the E.164 format (+378XXXXXXX). Include a separate field for the number type (landline, mobile, premium) and implement a check constraint to ensure only valid numbers are stored.
The Information and Communication Technology Authority (ICT Authority) regulates and supervises San Marino's telecommunications landscape. Established by Delegated Decree no. 146/2018, it ensures the ongoing development, security, and stability of the telecom system.
The Italian country code (+39) may work for San Marino landlines due to historical ties, but the official and recommended practice is always to use the San Marino country code (+378). Use +39 only when dealing with legacy systems that may require it.
San Marino's telecommunications network boasts comprehensive Fiber to the Home (FTTH) coverage and advanced 5G mobile network implementation. This infrastructure is remarkably advanced, positioning San Marino as a leader in technological adoption, often outpacing larger countries.
Remove all non-digit characters from the phone number and prepend +378 if not already present. For example, the javascript function formatToE164('0549 1234')
will return '+37805491234'. This ensures your number strings adhere to the international standard.
For the most up-to-date information about regulations and future developments in San Marino telecommunications, consult the official ICT Authority website and their technical documentation. The Telecommunication Sector, contactable at tlc@pa.sm or +378 0549 882552, also handles technical and administrative aspects.
Key emergency numbers in San Marino include 112 (European emergency number), 113 (Police), and 118 (Medical emergencies). Ensure your applications comply with regulations regarding accessibility to these numbers.
San Marino Phone Numbers: Format, Area Code & Validation Guide
The San Marino country code is +378. San Marino phone numbers follow an 8-digit format with the 0549 area code for landlines. This comprehensive guide covers everything you need to know about calling San Marino – phone number formats, validation rules, the +378 vs +39 dialing situation, and integration best practices for developers implementing San Marino telecommunications.
Quick Reference: How to Call San Marino
Essential information for calling San Marino internationally:
Understanding San Marino's Telecommunications System
San Marino operates an advanced telecommunications infrastructure. The Information and Communication Technology Authority (ICT Authority) oversees a state-of-the-art digital network with comprehensive Fiber to the Home (FTTH) coverage. This small nation has pioneered new technologies, often outpacing larger countries.
Digital Transformation and the ICT Authority
San Marino's compact size (61 km²) enables swift deployment of cutting-edge technologies. Key advancements include:
The ICT Authority, established by Delegated Decree no. 146/2018 (ratified by Delegated Decree no. 109 on 30 August 2018), regulates and supervises this landscape, ensuring continued development and security. [Source: San Marino Ministry of Foreign Affairs] This provides a stable, well-regulated environment for telecommunications development.
San Marino Phone Number Format: How Numbers Are Structured
San Marino's telephone system adheres to International Telecommunication Union (ITU-T) recommendations, ensuring global compatibility and simplifying integration with international systems.
General Number Format
San Marino phone numbers use 6–10 digits, preceded by the country code:
Where:
+378
is the country code for San Marino.XXXX XXXX
represents the subscriber number (typically 8 digits for standard services).Service-Specific Number Formats
San Marino uses distinct prefixes to differentiate service types. Understand these distinctions to ensure accurate number processing.
1. Geographic Numbers (Landlines):
All San Marino landlines use the 0549 area code – the sole geographic prefix for landline numbers.
Dual Country Code Access: Due to historical ties (San Marino used the Italian numbering plan until 1996), landlines can be reached using either:
+378 0549 XXXX
(official San Marino country code)+39 0549 XXXX
(via Italian country code +39)When implementing phone number handlers, normalize to +378 for storage while accepting both formats in user input. The +39 0549 prefix maintains legacy system compatibility and cross-border convenience. [Source: Wikipedia]
2. Mobile Numbers:
Mobile numbers start with
6
. Major mobile operators include San Marino Telecom (SMT), Telefonia Mobile Sammarinese (TMS), and Telecom Italia (TIM) San Marino. [Source: ITU 5G Country Profile]3. IP Telephony Services:
Numbers starting with
5
are used for VoIP and IP telephony services. [Source: ITU National Numbering Plan]4. Premium Rate Services:
Premium rate services start with
7
. These numbers typically have specialized services or higher call charges.Compliance Warning: Premium rate services often incur significantly higher costs than standard calls. Businesses using premium numbers must:
Premium services typically cost €0.50–€3.00 per minute or connection. Consult current ICT Authority guidelines for compliance requirements.
Phone Number Validation: Implementation Guidelines for Developers
This section provides practical guidance on validating, formatting, and handling San Marino phone numbers in your applications.
Validate San Marino Phone Numbers
Validate user input to ensure data integrity and correct phone number handling.
Using libphonenumber (Recommended)
For production applications, use Google's libphonenumber library, the industry-standard tool for international phone number validation, formatting, and parsing:
JavaScript Example:
Python Example:
Custom Regular Expression Validation
For lightweight validation without external dependencies, use these regular expressions:
Number Formatting
Consistent formatting enhances usability and interoperability. The E.164 format (
+CountryCodeSubscriberNumber
) is the international standard for storing phone numbers.Best Practice: Store all phone numbers in E.164 format (no spaces, hyphens, or parentheses) in your database. Format for display only when presenting to users.
Database Schema Design
Use this production-ready SQL schema for efficient data management and GDPR compliance:
Key Design Decisions:
+37861234567
) for consistency and easy international integrationdeleted_at
timestamp instead of hard deletes to maintain audit trail and support GDPR complianceError Handling
Use this production-ready error handling approach:
Advanced Technical Considerations
This section covers advanced aspects of San Marino's telecommunications infrastructure.
Network Infrastructure
San Marino's network infrastructure is highly advanced:
Fixed Network: The FTTH network provides 100% coverage with symmetric gigabit connections. Over 50% of users connect via fiber, with average fixed internet speeds of 96.8 Mbps (outperforming Italy's ~91.8 Mbps). The government plans to phase out copper (DSL) by 2027. [Source: Digital Watch Observatory] Leverage this infrastructure for high-bandwidth, low-latency applications.
Mobile Network: San Marino achieved full 5G coverage (~99% of territory) by late 2018, becoming the first European country to do so. The network features:
[Sources: ITU 5G Country Profile, Digital Watch]
For IoT implementations, contact operators directly for M2M/IoT number provisioning, which typically uses the standard mobile number ranges (6XXX) with specialized data plans.
Emergency Services Integration
Emergency numbers must always be accessible, even without a SIM card or from locked devices. San Marino uses the following emergency numbers:
[Source: Wikipedia]
Compliance Requirements for VoIP/App-Based Services:
Applications providing voice or emergency calling functionality must:
Testing Procedures:
Test emergency service integration without disrupting actual services:
[Source: ITU National Numbering Plan]
Never test emergency functionality using live emergency numbers.
Future Developments and Regulatory Oversight
Monitor future developments for long-term planning.
Number Portability
As of 2024, comprehensive information on mobile number portability (MNP) implementation in San Marino is limited. While MNP is growing across Europe, specific timelines or regulatory frameworks for San Marino have not been published.
For current status: Contact the ICT Authority or Telecommunication Sector for number portability availability and implementation plans.
Planned Developments
Potential future changes include:
Regulatory Contacts
Telecommunication Sector Public Administration Office Borgo Maggiore, 192 Via 28 Luglio 47893 San Marino Email: tlc@pa.sm Phone: +378 0549 882552
ICT Authority Established by Delegated Decree no. 146/2018 (ratified by Delegated Decree no. 109 on 30 August 2018)
For current regulatory information and technical documentation:
Troubleshooting Common Implementation Issues
Issue 1: Numbers Not Validating
Symptoms: Valid San Marino numbers fail validation
Common Causes:
Solution:
Issue 2: Database Storage Inconsistencies
Symptoms: Duplicate numbers stored with different formatting
Solution:
Issue 3: International Calling Issues
Symptoms: Outbound calls to San Marino fail
Common Causes:
Solution:
Frequently Asked Questions About San Marino Phone Numbers
Q: What is the country code for San Marino? A: The San Marino country code is +378. When dialing from the US, dial 011-378 followed by the local number. From mobile phones internationally, dial +378 directly.
Q: Should I store phone numbers with +378 or +39 prefix? A: Always store using +378 (the official San Marino country code) in E.164 format. Accept both formats in user input but normalize to +378 for storage.
Q: Do I need to implement number portability checks? A: As of 2024, number portability implementation status in San Marino is not well-documented. Contact the ICT Authority for current requirements. Implement flexible type detection that doesn't hardcode prefix-to-operator mappings.
Q: Can I use the same validation logic for +39 Italy numbers? A: No. While San Marino landlines can be reached via +39 0549, Italian numbers have different formats and prefixes. Treat them as separate country codes in your application.
Q: How do I call a San Marino mobile number? A: San Marino mobile numbers start with 6 after the country code. Dial +378 6XXX XXXX (8 digits total after +378).
Q: What's the best library for phone number validation? A: Use Google's libphonenumber library. It handles San Marino numbers correctly, including both +378 and +39 0549 formats, and is regularly updated with carrier metadata.
Q: Are there special considerations for SMS delivery? A: Yes. San Marino has specific SMS regulations. For detailed SMS compliance guidance, see San Marino SMS Best Practices, which covers GDPR compliance, sender ID options, and carrier restrictions.
Q: How do I handle emergency numbers in my VoIP application? A: Emergency numbers (112, 113, 115, 118) must be accessible without authentication. Contact the Telecommunication Sector (tlc@pa.sm) for testing procedures. Never test with live emergency numbers.
Additional Code Examples
Java Implementation Using libphonenumber
PHP Implementation
Conclusion
You now have the essential knowledge to handle San Marino phone numbers in your applications. With this understanding of numbering structure, validation rules, formatting best practices, and telecommunications context, you can confidently integrate San Marino's telecommunications system.
Key Takeaways:
Stay informed about future developments and regulatory changes through official channels to ensure your applications remain compliant and future-proof.