validation
International Phone (E.164) Regex Pattern
Validates an E.164-format international phone number: '+' followed by up to 15 digits, no spaces. Used for programmatic APIs like Twilio, WhatsApp Business, and most SMS gateways.
/^\+[1-9]\d{6,14}$/ What each part matches
^\+ — required leading plus[1-9] — first digit 1-9 (no leading zero on country code)\d{6,14}$ — 6 to 14 more digits (7-15 total, E.164 max)✓ These match
- +15551234567
- +919876543210
- +442071838750
✗ These don't
- +0123456789
- 15551234567
- +1 555 123 4567
- +12
Use in your code
JavaScript
const re = /^\+[1-9]\d{6,14}$/;
re.test(input); // → true or false Python
import re
re.fullmatch(r"^\+[1-9]\d{6,14}$", input) PHP (PCRE)
preg_match('/^\+[1-9]\d{6,14}$/', $input); Go
re := regexp.MustCompile(`^\+[1-9]\d{6,14}$`)
re.MatchString(input) FAQ
Does this international phone (e.164) regex work in JavaScript?
Yes. Every pattern in the Utilko regex library is tested to work in JavaScript RegExp, PCRE (PHP, Nginx), and Python `re`. Where flavor matters (lookbehind, named groups), the pattern page flags it.
How do I use this pattern?
Copy the pattern from the code block above. In JavaScript:
new RegExp('^\+[1-9]\d{6,14}$') or literal /^\+[1-9]\d{6,14}$/. Or click "Try in regex tester" to open it pre-loaded in Utilko's browser-based regex tester.Should I use this for security-critical validation?
Client-side regex is fine for UX (immediate feedback on a form). For anything security-critical — payments, auth, data integrity — always re-validate server-side using the same pattern PLUS domain-specific checks (Luhn checksum for cards, actual email delivery test, DNS resolution for domains).