Singapore Phone Number Validation: +65 Format Guide & 8-Digit Number Verification (2025)
Learn how to validate Singapore phone numbers with +65 country code. Complete 2025 guide covering IMDA 8-digit format, mobile prefixes (8, 9), landline prefix (6), E.164 formatting, JavaScript validation code, VoIP integration, and emergency numbers. Get production-ready regex patterns for accurate phone number verification.
Looking to validate Singapore phone numbers in your application? This comprehensive guide covers everything you need: the +65 country code, IMDA's 8-digit format requirements, mobile prefixes (8 and 9), landline prefix (6), and production-ready validation code. Whether you're building a contact form, authentication system, or VoIP service, you'll learn how to correctly validate and format Singapore phone numbers according to official IMDA standards.
All Singapore numbers follow a simple 8-digit format with no area codes, making validation straightforward once you understand the prefix rules. Learn E.164 international formatting, regex validation patterns, and common edge cases to handle in production.
Understanding Singapore's Phone Number Format & Numbering System
The Infocomm Media Development Authority (IMDA) governs Singapore's telecommunications and enforces strict numbering conventions. Singapore uses a closed numbering plan with no area codes, simplifying validation compared to countries with regional variations. All Singapore phone numbers are 8 digits long, preceded by +65 for international calls.
Historical Evolution:
Understand this context to anticipate future changes. Prior to 2002, fixed line numbers were 7 digits. On 1 September 1995, mobile and pager numbers became 8 digits with the '9' prefix 1. The universal 8-digit system completed on 1 March 2002 when the '6' prefix was added to all fixed lines 1. This migration followed telecommunications liberalisation in April 2000, increasing numbering capacity tenfold to 60 million numbers 1. In March 2004, the '8' prefix for mobile numbers was introduced to address mobile growth 2. Stay current with IMDA regulations at www.imda.gov.sg – changes, while infrequent, can impact your application's functionality.
Singapore Phone Number Format: Prefix Guide by Number Type
The 8-digit subscriber number is categorized by prefix, indicating service type:
Domestic toll-free (free from landlines; mobile airtime charges apply) Access internationally via +65 6XXX XXXX 1
—
1900
Premium
Premium-rate services for specialized information/entertainment
—
1, 4, 5
IoT/M2M
Internet of Things and Machine-to-Machine devices
—
Use these prefixes to pre-filter numbers and tailor your application's behavior based on number type.
How to Validate Singapore Phone Numbers: JavaScript Implementation
Implement validation with this production-ready JavaScript function:
JavaScript
/**
* Validates Singapore phone numbers according to IMDA standards.
* @param {string} number - The phone number to validate.
* @returns {Object} Validation result with type, formatting, and potential errors.
*/functionvalidateSGPhoneNumber(number) {
// Handle null/undefined inputsif (!number || typeof number !== 'string') {
return { isValid: false, error: 'Phone number must be a non-empty string.' };
}
// Sanitize input: Remove spaces, hyphens, and the optional +65 country code.const cleanedNumber = number.replace(/[\s-+]*/g, '').replace(/^65/, '');
// Regular expressions for each number type. Notice the use of capturing groups for later formatting.const patterns = {
landline: /^6(\d{4})(\d{3})$/, // Landline: 6XXXX XXXXmobile: /^[89](\d{4})(\d{3})$/, // Mobile: 8/9XXXX XXXXtollFree: /^800(\d{3})(\d{4})$/, // Toll-free: 800 XXX XXXXpremiumRate: /^1900(\d{3})(\d{4})$/, // Premium-rate: 1900 XXX XXXXvirtualNumber: /^3(\d{4})(\d{3})$/, // Virtual: 3XXXX XXXXiotDevice: /^[145](\d{4})(\d{3})$/// IoT/M2M: 1/4/5XXXX XXXX
};
// Iterate through patterns and return detailed results upon a match.for (const [type, pattern] ofObject.entries(patterns)) {
const match = cleanedNumber.match(pattern);
if (match) {
// Format the number according to local conventions.const formattedNumber = `+65 ${match[1]}${match[2]}`;
return { isValid: true, type, formattedNumber };
}
}
// If no match is found, return an error object.return { isValid: false, error: 'Invalid Singapore phone number format.' };
}
// Example usage:console.log(validateSGPhoneNumber('+65 9123 4567')); // Valid mobile numberconsole.log(validateSGPhoneNumber('61234567')); // Valid landline numberconsole.log(validateSGPhoneNumber('12345')); // Invalid numberconsole.log(validateSGPhoneNumber('+65 8001234567')); // Valid toll-free numberconsole.log(validateSGPhoneNumber(null)); // Error: must be non-empty string
Edge Case Handling:
Adapt this code to your application needs and consider additional edge cases like extremely long strings or special characters.
Best Practices for Singapore Phone Number Validation
Implement these best practices for a seamless user experience:
Input Sanitization
Sanitize user input before validation. Remove whitespace, hyphens, and non-numeric characters to prevent unexpected behavior and ensure consistent results.
Error Handling
Provide specific error messages:
JavaScript
const errorMessages = {
empty: 'Enter a phone number.',
tooShort: 'Singapore numbers must be 8 digits. You entered X digits.',
tooLong: 'Singapore numbers must be 8 digits. You entered X digits.',
invalidPrefix: 'Invalid prefix. Singapore numbers start with 1, 3, 4, 5, 6, 8, or 9.',
invalidFormat: 'Invalid format. Use +65 XXXX XXXX or 8 digits without country code.'
};
Internationalization
Design for international numbers from the start. Use libraries like libphonenumber-js for multi-country support.
Performance & Security
Cache validation results for repeated lookups using a Map or Redis cache
Rate limit validation requests to prevent abuse (e.g., 100 requests/minute per IP)
Validate input length before regex matching to prevent ReDoS (Regular Expression Denial of Service) attacks
Sanitize inputs to prevent injection attacks: number.replace(/[^0-9+]/g, '')
VoIP Integration: Singapore Phone Number Requirements
For VoIP services, address these factors:
SIP Protocol Support
Comply with IMDA's SIP (Session Initiation Protocol) specifications. Configure your SIP trunk:
Monitor with tools like Wireshark, VoIP Spear, or your SIP provider's dashboard.
Frequently Asked Questions
How do I validate a Singapore phone number in my application?
Use the validation function provided in this guide:
JavaScript
const result = validateSGPhoneNumber('+65 9123 4567');
if (result.isValid) {
console.log(`Valid ${result.type}: ${result.formattedNumber}`);
} else {
console.error(result.error);
}
The function checks for 8-digit length after removing +65, then matches prefixes: 6 (landline), 8/9 (mobile), 3 (VoIP), 800/1800 (toll-free), 1900 (premium-rate).
What is the country code for Singapore?
+65
When dialing internationally, prefix the 8-digit local number with +65 (e.g., +65 9123 4567). Within Singapore, use only the 8-digit number. The +65 code is mandatory for E.164 international formatting.
What are the Singapore mobile number prefixes?
Both 8 and 9 indicate mobile numbers. The 9 prefix has been used since 1 September 1995. The 8 prefix was introduced in March 2004 to provide additional capacity 2. Both work identically with no functional difference.
How do I format Singapore phone numbers in E.164 format?
+65 XXXX XXXX (e.g., +65 9123 4567)
JavaScript
functionformatE164(number) {
const cleaned = number.replace(/[^0-9]/g, '').replace(/^65/, '');
if (cleaned.length !== 8) returnnull;
return`+65${cleaned}`; // Or +65 XXXX XXXX for display
}
What is IMDA and how does it regulate Singapore phone numbers?
The Infocomm Media Development Authority (IMDA) is Singapore's telecommunications regulator. IMDA manages the National Numbering Plan, enforces numbering conventions, allocates ranges to providers, and updates policies. All operators must comply with IMDA standards. Visit www.imda.gov.sg for authoritative documentation.
Does Singapore use area codes for phone numbers?
No. Singapore uses a closed numbering plan with no area codes. All numbers are 8 digits regardless of location. The first digit indicates service type, not geography.
How do I distinguish between Singapore landline and mobile numbers?
What are Singapore's emergency numbers and how should VoIP apps handle them?
999 (Police) and 995 (SCDF Fire/Ambulance) are primary emergency numbers. Non-emergency: 1777 (ambulance), 993 (MOH special ambulance).
VoIP apps must route these per IMDA SIP specifications. SMS alternatives: 70999 (Police), 70995 (SCDF) for deaf, hard-of-hearing, or unsafe-to-call situations.
How do toll-free numbers work in Singapore?
800 = International toll-free
1800 = Domestic toll-free (free from landlines; mobile airtime charges apply)
1800 numbers can be reached internationally by replacing 1800 with +65 6 (e.g., 1800 123 4567 becomes +65 6123 4567).
When did Singapore transition to 8-digit phone numbers?
Phase 1: 1 September 1995 – Mobile/pager numbers became 8 digits (9 prefix added)
Phase 2: 1 March 2002 – Fixed lines completed transition (6 prefix added)
This migration followed telecommunications liberalisation in April 2000, increasing capacity tenfold to 60 million numbers 1.
Summary
You now have production-ready knowledge for Singapore phone number validation:
Stay informed about IMDA regulations to ensure compliance. Consult the IMDA website regularly for National Numbering Plan updates.
References
Footnotes
Telephone numbers in Singapore. Wikipedia. Details the complete history of Singapore's telephone numbering system including the 1 September 1995 addition of '9' prefix to mobile numbers, the 1 March 2002 addition of '6' prefix to fixed lines completing the universal 8-digit system, and the tenfold increase to 60 million numbering capacity. Source: Wikipedia - Telephone numbers in Singapore. ↩↩2↩3↩4↩5↩6↩7
IDA Issues Mobile Phone Numbers with Prefix '8'. Infocomm Media Development Authority (IMDA). Press release dated March 2004 announcing the introduction of mobile phone numbers beginning with digit '8' to address the rapid growth of mobile phone usage and complement existing '9' prefix mobile numbers. Source: IMDA Press Release (2004). ↩↩2↩3
IDA Launches New Policy Framework for Internet Protocol (IP) Telephony. Infocomm Media Development Authority (IMDA). Announcement from 2005 introducing the policy framework governing IP telephony services and 8-digit phone numbers starting with digit '3' for VoIP services. Source: IMDA IP Telephony Policy (2005). ↩
Singapore Emergency Services. Official Singapore government emergency contact numbers: 999 (Police), 995 (SCDF Fire/Ambulance), 1777 (Non-emergency ambulance), 993 (MOH special ambulance), with SMS alternatives 70999 (Police) and 70995 (SCDF) for deaf, hard-of-hearing, or situations where voice calls are unsafe. Sources: Singapore Civil Defence Force, Singapore Police Force, and Gov.sg Contact Directory. ↩↩2
Frequently asked questions
Validate Singapore phone numbers by first sanitizing the input to remove non-numeric characters. Then, use regular expressions designed for each number type (landline, mobile, toll-free, etc.) to check against the cleaned number. The provided JavaScript function offers a robust way to perform this validation and provides details such as number type and formatted output upon successful validation.
Singapore mobile numbers are eight digits long and begin with either 8 or 9. They follow the format 8/9XXXX XXXX. The '8' prefix was introduced later in March 2004 due to growing demand.
Singapore switched to an 8-digit system in 2002 to accommodate the rapid growth of telecommunications after market liberalization in 2000. This replaced the older system with shorter numbers for fixed lines and varying lengths for mobile numbers. This streamlined the system and allowed for more capacity.
The +65 country code is required for international calls to Singapore. For domestic calls within Singapore, the +65 code is optional. It's best practice to sanitize user input to handle both cases effectively in your application.
Yes, the prefix of a Singapore phone number indicates its type. '6' denotes landlines, '8' and '9' are for mobile, '3' signifies virtual operators, '800' is for toll-free numbers, '1900' marks premium-rate services, and '1', '4', and '5' are reserved for IoT and M2M devices.
The Infocomm Media Development Authority (IMDA) governs Singapore's telecommunications landscape and enforces strict numbering conventions. Developers should stay updated on IMDA regulations as changes can impact application functionality.
When integrating VoIP services, ensure appropriate routing for emergency numbers like 999 (Police) and 995 (Fire/Ambulance). Also, consider the non-emergency ambulance number (1777) and the Ministry of Health's ambulance service at 993. This is crucial for any application handling calls.
Always sanitize user input before validating Singapore phone numbers. This involves removing whitespace, hyphens, and other non-numeric characters to prevent unexpected behavior and ensure consistent validation results.
For optimal VoIP performance in Singapore, monitor latency (aim for under 150ms), jitter (under 30ms), and packet loss (under 1%). These benchmarks ensure clear and reliable voice communication and a smooth user experience.
Singapore phone numbers are typically formatted as +65 XXXX XXXX, including the country code and a space separating the first four and last four digits. The provided JavaScript function includes capturing groups in the regular expressions to enable proper formatting.
Virtual numbers in Singapore use the prefix '3', followed by four digits and then three digits, formatted as 3XXXX XXXX. These numbers are often used for digital communication and VoIP services.
Introduction
Looking to validate Singapore phone numbers in your application? This comprehensive guide covers everything you need: the +65 country code, IMDA's 8-digit format requirements, mobile prefixes (8 and 9), landline prefix (6), and production-ready validation code. Whether you're building a contact form, authentication system, or VoIP service, you'll learn how to correctly validate and format Singapore phone numbers according to official IMDA standards.
All Singapore numbers follow a simple 8-digit format with no area codes, making validation straightforward once you understand the prefix rules. Learn E.164 international formatting, regex validation patterns, and common edge cases to handle in production.
Understanding Singapore's Phone Number Format & Numbering System
The Infocomm Media Development Authority (IMDA) governs Singapore's telecommunications and enforces strict numbering conventions. Singapore uses a closed numbering plan with no area codes, simplifying validation compared to countries with regional variations. All Singapore phone numbers are 8 digits long, preceded by +65 for international calls.
Historical Evolution: Understand this context to anticipate future changes. Prior to 2002, fixed line numbers were 7 digits. On 1 September 1995, mobile and pager numbers became 8 digits with the '9' prefix 1. The universal 8-digit system completed on 1 March 2002 when the '6' prefix was added to all fixed lines 1. This migration followed telecommunications liberalisation in April 2000, increasing numbering capacity tenfold to 60 million numbers 1. In March 2004, the '8' prefix for mobile numbers was introduced to address mobile growth 2. Stay current with IMDA regulations at www.imda.gov.sg – changes, while infrequent, can impact your application's functionality.
Singapore Phone Number Format: Prefix Guide by Number Type
The 8-digit subscriber number is categorized by prefix, indicating service type:
8: Mar 2004 2
Access internationally via +65 6XXX XXXX 1
Use these prefixes to pre-filter numbers and tailor your application's behavior based on number type.
How to Validate Singapore Phone Numbers: JavaScript Implementation
Implement validation with this production-ready JavaScript function:
/** * Validates Singapore phone numbers according to IMDA standards. * @param {string} number - The phone number to validate. * @returns {Object} Validation result with type, formatting, and potential errors. */ function validateSGPhoneNumber(number) { // Handle null/undefined inputs if (!number || typeof number !== 'string') { return { isValid: false, error: 'Phone number must be a non-empty string.' }; } // Sanitize input: Remove spaces, hyphens, and the optional +65 country code. const cleanedNumber = number.replace(/[\s-+]*/g, '').replace(/^65/, ''); // Regular expressions for each number type. Notice the use of capturing groups for later formatting. const patterns = { landline: /^6(\d{4})(\d{3})$/, // Landline: 6XXXX XXXX mobile: /^[89](\d{4})(\d{3})$/, // Mobile: 8/9XXXX XXXX tollFree: /^800(\d{3})(\d{4})$/, // Toll-free: 800 XXX XXXX premiumRate: /^1900(\d{3})(\d{4})$/, // Premium-rate: 1900 XXX XXXX virtualNumber: /^3(\d{4})(\d{3})$/, // Virtual: 3XXXX XXXX iotDevice: /^[145](\d{4})(\d{3})$/ // IoT/M2M: 1/4/5XXXX XXXX }; // Iterate through patterns and return detailed results upon a match. for (const [type, pattern] of Object.entries(patterns)) { const match = cleanedNumber.match(pattern); if (match) { // Format the number according to local conventions. const formattedNumber = `+65 ${match[1]} ${match[2]}`; return { isValid: true, type, formattedNumber }; } } // If no match is found, return an error object. return { isValid: false, error: 'Invalid Singapore phone number format.' }; } // Example usage: console.log(validateSGPhoneNumber('+65 9123 4567')); // Valid mobile number console.log(validateSGPhoneNumber('61234567')); // Valid landline number console.log(validateSGPhoneNumber('12345')); // Invalid number console.log(validateSGPhoneNumber('+65 8001234567')); // Valid toll-free number console.log(validateSGPhoneNumber(null)); // Error: must be non-empty stringEdge Case Handling:
Adapt this code to your application needs and consider additional edge cases like extremely long strings or special characters.
Best Practices for Singapore Phone Number Validation
Implement these best practices for a seamless user experience:
Input Sanitization
Sanitize user input before validation. Remove whitespace, hyphens, and non-numeric characters to prevent unexpected behavior and ensure consistent results.
Error Handling
Provide specific error messages:
const errorMessages = { empty: 'Enter a phone number.', tooShort: 'Singapore numbers must be 8 digits. You entered X digits.', tooLong: 'Singapore numbers must be 8 digits. You entered X digits.', invalidPrefix: 'Invalid prefix. Singapore numbers start with 1, 3, 4, 5, 6, 8, or 9.', invalidFormat: 'Invalid format. Use +65 XXXX XXXX or 8 digits without country code.' };Internationalization
Design for international numbers from the start. Use libraries like
libphonenumber-jsfor multi-country support.Performance & Security
number.replace(/[^0-9+]/g, '')VoIP Integration: Singapore Phone Number Requirements
For VoIP services, address these factors:
SIP Protocol Support
Comply with IMDA's SIP (Session Initiation Protocol) specifications. Configure your SIP trunk:
const sipConfig = { domain: 'sip.yourprovider.sg', port: 5060, transport: 'UDP', countryCode: '+65', emergencyRouting: true // Enable emergency number routing };Emergency Services Routing
Implement mandatory routing for emergency numbers 4:
SMS alternatives serve deaf, hard-of-hearing, speech-impaired users, or situations where voice calls are unsafe 4.
Quality of Service (QoS)
Monitor and maintain these thresholds:
Monitor with tools like Wireshark, VoIP Spear, or your SIP provider's dashboard.
Frequently Asked Questions
How do I validate a Singapore phone number in my application?
Use the validation function provided in this guide:
const result = validateSGPhoneNumber('+65 9123 4567'); if (result.isValid) { console.log(`Valid ${result.type}: ${result.formattedNumber}`); } else { console.error(result.error); }The function checks for 8-digit length after removing +65, then matches prefixes: 6 (landline), 8/9 (mobile), 3 (VoIP), 800/1800 (toll-free), 1900 (premium-rate).
What is the country code for Singapore?
+65
When dialing internationally, prefix the 8-digit local number with +65 (e.g., +65 9123 4567). Within Singapore, use only the 8-digit number. The +65 code is mandatory for E.164 international formatting.
What are the Singapore mobile number prefixes?
Both 8 and 9 indicate mobile numbers. The 9 prefix has been used since 1 September 1995. The 8 prefix was introduced in March 2004 to provide additional capacity 2. Both work identically with no functional difference.
How do I format Singapore phone numbers in E.164 format?
+65 XXXX XXXX (e.g., +65 9123 4567)
function formatE164(number) { const cleaned = number.replace(/[^0-9]/g, '').replace(/^65/, ''); if (cleaned.length !== 8) return null; return `+65${cleaned}`; // Or +65 XXXX XXXX for display }What is IMDA and how does it regulate Singapore phone numbers?
The Infocomm Media Development Authority (IMDA) is Singapore's telecommunications regulator. IMDA manages the National Numbering Plan, enforces numbering conventions, allocates ranges to providers, and updates policies. All operators must comply with IMDA standards. Visit www.imda.gov.sg for authoritative documentation.
Does Singapore use area codes for phone numbers?
No. Singapore uses a closed numbering plan with no area codes. All numbers are 8 digits regardless of location. The first digit indicates service type, not geography.
How do I distinguish between Singapore landline and mobile numbers?
Check the first digit:
const type = number[0] === '6' ? 'landline' : ['8','9'].includes(number[0]) ? 'mobile' : 'other';What are Singapore's emergency numbers and how should VoIP apps handle them?
999 (Police) and 995 (SCDF Fire/Ambulance) are primary emergency numbers. Non-emergency: 1777 (ambulance), 993 (MOH special ambulance).
VoIP apps must route these per IMDA SIP specifications. SMS alternatives: 70999 (Police), 70995 (SCDF) for deaf, hard-of-hearing, or unsafe-to-call situations.
How do toll-free numbers work in Singapore?
800 = International toll-free 1800 = Domestic toll-free (free from landlines; mobile airtime charges apply)
1800 numbers can be reached internationally by replacing 1800 with +65 6 (e.g., 1800 123 4567 becomes +65 6123 4567).
When did Singapore transition to 8-digit phone numbers?
Phase 1: 1 September 1995 – Mobile/pager numbers became 8 digits (9 prefix added) Phase 2: 1 March 2002 – Fixed lines completed transition (6 prefix added)
This migration followed telecommunications liberalisation in April 2000, increasing capacity tenfold to 60 million numbers 1.
Summary
You now have production-ready knowledge for Singapore phone number validation:
Next Steps
libphonenumber-jsfor international number handlingConclusion
Troubleshooting Common Issues
Validation fails for valid numbers:
False positives:
Performance bottlenecks:
Testing Tools:
+65 ${9000 + Math.floor(Math.random() * 1000)} ${Math.floor(Math.random() * 10000)}Stay informed about IMDA regulations to ensure compliance. Consult the IMDA website regularly for National Numbering Plan updates.
References
Footnotes
Telephone numbers in Singapore. Wikipedia. Details the complete history of Singapore's telephone numbering system including the 1 September 1995 addition of '9' prefix to mobile numbers, the 1 March 2002 addition of '6' prefix to fixed lines completing the universal 8-digit system, and the tenfold increase to 60 million numbering capacity. Source: Wikipedia - Telephone numbers in Singapore. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7
IDA Issues Mobile Phone Numbers with Prefix '8'. Infocomm Media Development Authority (IMDA). Press release dated March 2004 announcing the introduction of mobile phone numbers beginning with digit '8' to address the rapid growth of mobile phone usage and complement existing '9' prefix mobile numbers. Source: IMDA Press Release (2004). ↩ ↩2 ↩3
IDA Launches New Policy Framework for Internet Protocol (IP) Telephony. Infocomm Media Development Authority (IMDA). Announcement from 2005 introducing the policy framework governing IP telephony services and 8-digit phone numbers starting with digit '3' for VoIP services. Source: IMDA IP Telephony Policy (2005). ↩
Singapore Emergency Services. Official Singapore government emergency contact numbers: 999 (Police), 995 (SCDF Fire/Ambulance), 1777 (Non-emergency ambulance), 993 (MOH special ambulance), with SMS alternatives 70999 (Police) and 70995 (SCDF) for deaf, hard-of-hearing, or situations where voice calls are unsafe. Sources: Singapore Civil Defence Force, Singapore Police Force, and Gov.sg Contact Directory. ↩ ↩2