//g
  • 100% Free
  • No Sign-Up
  • No Credit Card
  • No Free Trial
  • No Pro Tier
  • No Watermarks

Nothing is uploaded. Just open it and start.

International Phone Number Regex

A phone number in E.164 form: a +, a country code that doesn't start with 0, and up to 15 digits in all, with no spaces.

/^\+[1-9]\d{1,14}$/

Piece by piece

  1. ^the start of the text
  2. \+the character “+”
  3. [1-9]one of 1–9
  4. \d{1,14}a digit (0–9), repeated between 1 and 14 times, as many as possible
  5. $the end of the text

Examples

TextResult
+14155552671Matches
+919876543210Matches
+442071838750Matches
14155552671Doesn't match
+0123456Doesn't match
+1 415 555 2671Doesn't match
+1234567890123456Doesn't match
  • Strip spaces, dashes and brackets before checking. It doesn't check that a number exists or is the right length for its country.

Other common patterns

Test any regular expression →

Frequently asked questions

How do I use this phone number (e.164) regex in JavaScript?
Write it as /^\+[1-9]\d{1,14}$/ and call re.test(text). It is anchored with ^ and $, so it checks the whole text; remove them to find it inside longer text (and add the g flag to find every one). The Code view writes it out for Python, Go and PHP too.
Is it a complete validator?
No regex is the whole story. Strip spaces, dashes and brackets before checking. It doesn't check that a number exists or is the right length for its country.
Can I try it on my own text?
Yes. The tester above already holds the examples; paste your own text over them and every match is highlighted as you type. Nothing is uploaded.

Spotted a bug or have a suggestion?

Found something broken, have an idea, or just want to say thanks about any of our tools? Every message reaches a real person.