Regex for International Phone (E.164)
Regex Pattern
^\+[1-9]\d{1,14}$Validates E.164 international format — + followed by 2-15 digits
Quick Answer
The regex pattern for international phone (e.164) is `^\+[1-9]\d{1,14}$`. Validates E.164 international format — + followed by 2-15 digits. This works in JavaScript, Python, Ruby, PHP, Java, and most regex engines that support PCRE syntax.
Test Examples
| Input | Result |
|---|---|
| +14155552671 | ✓ Matches |
| +442071838750 | ✓ Matches |
| +919876543210 | ✓ Matches |
| 14155552671 | ✗ No match |
| +0123456789 | ✗ No match |
| +1 (415) 555-2671 | ✗ No match |
Code Examples
javascript
const regex = /^\+[1-9]\d{1,14}$/;
const isValid = regex.test(value);python
import re
pattern = r'^\+[1-9]\d{1,14}$'
if re.match(pattern, value):
print("valid")ruby
pattern = /^\+[1-9]\d{1,14}$/
if value =~ pattern
puts "valid"
endphp
if (preg_match('/^\+[1-9]\d{1,14}$/', $value)) {
echo "valid";
}java
String pattern = "^\\+[1-9]\\d{1,14}$";
boolean isValid = value.matches(pattern);Frequently Asked Questions
Related Regex Patterns
US Phone Number
US phone number in common formats
Indian Phone Number
Indian mobile number with optional +91 country code
UK Phone Number
UK mobile number with optional +44 country code
Email Address
Validates a standard email address format
Email (RFC 5322 Compliant)
RFC 5322 compliant email validation with label length limits
URL (HTTP/HTTPS)
Validates HTTP and HTTPS URLs