T
ToolPrime

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