DD
DevDash

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

InputResult
+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"
end

php

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

Want API access + no ads? Pro coming soon.