Regex for Phone Number (International)
Validates international phone numbers in E.164 format (up to 15 digits with optional + prefix).
Pattern
/^\+?[1-9]\d{1,14}$/ Live Tester
Enter a string to test
Examples
✓ +14155552671
✓ +442071838750
✓ 491711234567
✗ +0123456789
✗ 1
✗ +1234567890123456
Pattern Breakdown
^\+? — optional leading plus sign
[1-9] — first digit must be 1-9 (no leading zero)
\d{1,14}$ — followed by 1 to 14 more digits (total max 15)
Code Snippets
Javascript
const regex = /^\+?[1-9]\d{1,14}$/;
regex.test("+14155552671"); // true Python
import re
pattern = r"^\+?[1-9]\d{1,14}$"
bool(re.match(pattern, "+14155552671")) # True Php
$pattern = '/^\+?[1-9]\d{1,14}$/';
preg_match($pattern, "+14155552671"); // 1 Related Patterns
Email Address /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/ URL /^https?:\/\/(www\.)?[a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([a-zA-Z0-9()@:%_+.~#?&/=-]*)$/ Phone Number (US) /^\(?[2-9]\d{2}\)?[-.\s]?\d{3}[-.\s]?\d{4}$/ Phone Number (EU) /^\+?[1-9][0-9]{0,3}[\s.-]?\(?[0-9]{1,5}\)?[\s.-]?[0-9]{1,5}[\s.-]?[0-9]{1,5}$/ IPv4 Address /^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$/ IPv6 Address /^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$/