Skip to content

Regex for International Phone Number

This regex matches international phone numbers following the E.164 standard. It allows an optional leading plus sign followed by a country code and subscriber number totaling up to 15 digits. The E.164 format is the most universally accepted phone number format and is used by services like Twilio and most telephony APIs.

Pattern
^\+?[1-9]\d{1,14}$
Test this pattern in the Regex Tester →

What is the regex pattern for International Phone Number?

The regex pattern for International Phone Number is ^\+?[1-9]\d{1,14}$. This regex matches international phone numbers following the E.164 standard. It allows an optional leading plus sign followed by a country code and subscriber number totaling up to 15 digits. The E.164 format is the most universally accepted phone number format and is used by services like Twilio and most telephony APIs. This pattern is commonly used for international form validation and sms api input formatting.

Test Examples

Match
+442071234567
Matches: +442071234567
Match
+14155552671
Matches: +14155552671
Match
+8613800138000
Matches: +8613800138000

Common Uses

Variations

With spaces

^\+?[1-9]\d{0,2}[\s-]?\d{1,14}$

Allows a space or dash after country code

Grouped format

^\+?\d{1,3}[-.\s]?\d{1,4}[-.\s]?\d{1,4}[-.\s]?\d{1,9}$

Matches numbers grouped with separators

E.164 strict

^\+[1-9]\d{1,14}$

Requires the plus sign prefix

Frequently Asked Questions

What is E.164 format?

E.164 is the international telephone numbering plan that defines a maximum of 15 digits starting with a country code. It is the standard format used by most telephony APIs and international calling systems.

Should I store phone numbers in E.164 format?

Yes. E.164 is the recommended storage format because it is unambiguous and globally unique. Convert user-entered numbers to E.164 before storing them in your database.

Why does this not allow parentheses or dashes?

E.164 is a strict format meant for machine processing, not display. Formatting characters like parentheses and dashes should be added at display time based on the user's locale.

Related Patterns

US Phone Number

^\+?1?[-.\s]?\(?\d{3}\)?[-.\s]?\d{3}[-.\...

US ZIP Code

^\d{5}(-\d{4})?$

Related Reading

Regex Cheat Sheet with Examples for Developers → URL Encoding Special Characters →