Phone numbers come in many formats worldwide—from local conventions to international standards. Understanding these formats is essential for building applications that handle phone numbers correctly, especially for SMS delivery and international calling.
E.164: The International Standard
E.164 is the ITU-T recommendation for international phone number formatting. It consists of a plus sign (+), country code, and subscriber number—with no spaces or punctuation. For example, +14155551234 for a US number. E.164 is the required format for most SMS APIs (Twilio, MessageBird) and calling services. It uniquely identifies any phone number worldwide and is the best format to store in databases.
National vs International Formats
National format shows numbers as dialed locally: (415) 555-1234 in the US, or 020 7946 0958 in the UK. International format adds the country code: +1 415 555 1234. When users enter numbers, they typically use national format. Your application should parse the input, validate it, and convert to E.164 for storage and API calls.
Country Codes and Calling Codes
Each country has a unique calling code: +1 (US/Canada), +44 (UK), +81 (Japan), +91 (India). Some codes are shared—+1 covers the entire North American Numbering Plan including Canada and Caribbean nations. When validating numbers, you need to know the country to properly parse local formats.
Handling User Input
Users enter numbers in countless formats: with spaces, dashes, parentheses, or none. Some include country codes, others don't. A robust validation API parses any reasonable input format, validates the structure for the given country, and returns standardized E.164 output. Always normalize to E.164 before storing or using with SMS/calling APIs.