International Phone (E.164)
Validate phone numbers in ITU-T E.164 international format: a + sign followed by 2–15 digits, first digit non-zero.
Try it in RegexPro →Available in
JavaScript / ECMAScript code
const re = new RegExp("^\\+[1-9]\\d{1,14}$", "");
const input = "+14155552671";
const matches = [...input.matchAll(re)];
console.log(matches.map(m => m[0]));Uses `String.prototype.matchAll` for global iteration (Node 12+ / all modern browsers).
Python (re) code
import re
pattern = re.compile(r"^\+[1-9]\d{1,14}$")
input_text = "+14155552671"
for m in pattern.finditer(input_text):
print(m.group(0))Stdlib `re` module — no third-party dependency. Works on Python 3.6+.
Go (RE2) code
package main
import (
"fmt"
"regexp"
)
func main() {
re := regexp.MustCompile(`^\+[1-9]\d{1,14}$`)
input := `+14155552671`
for _, match := range re.FindAllString(input, -1) {
fmt.Println(match)
}
}Uses `regexp.MustCompile` (panics on bad patterns at startup) and `FindAllString` for all matches.
Pattern
^\+[1-9]\d{1,14}$Raw source: ^\+[1-9]\d{1,14}$
How it works
Examples
Input
+14155552671Matches
+14155552671
Input
+442071838750Matches
+442071838750
Input
14155552671No match
—Common use cases
- •SMS / WhatsApp API integration (Twilio, Vonage)
- •International contact form validation
- •Phone number normalization pipelines
- •CRM data quality enforcement
Related patterns
International Phone Number (Loose)
ValidationMatch international phone numbers in a variety of loose formats including country codes, area codes, and separators.
IBAN (International Bank Account Number)
ValidationValidate IBAN bank account identifiers: 2-letter country code, 2 check digits, 11–30 alphanumerics.
US Phone Number
ValidationMatch US phone numbers in common formats: (555) 867-5309, 555-867-5309, 5558675309.
Canadian Postal Code
ValidationMatch Canadian postal codes in the A1A 1A1 or A1A1A1 format with valid first-letter prefixes.