left-arrow-icon
password-generator-icon

Phone Number Regex

Create a Regular Expression for Phone Number Validation


Phone Number Pattern Regex

      
copy icon     Copy

(+) Symbol Selection

Separator Selection

Separator Character

Country Code Selection

Area Code Selection

Area Code Option


You can enter different phone number to validate for above generated Regular expression. You can also copy other phone regex patterns in Regex field and validate it here

Phone Number Validator (Check for Valid phone number format)

      

Phone Number Regular Expression Reference Table

Conversion Table icon

Input

Expression

Example

US phone number regex (local)

^(\+\d{1,3}( )?)?1?\-?\.?\s?((\(\d{1,6}\))|\d{1,6})[- .]?\d{3,6}[- .]?\d{4,8}$

222-777-1122

US phone number regex (domestic)

^(\+\d{1,3}( )?)?1?\-?\.?\s?((\(\d{1,6}\))|\d{1,6})[- .]?\d{3,6}[- .]?\d{4,8}$

(222) 444-2211

US phone number regex (international)

^(\+\d{1,3}( )?)?1?\-?\.?\s?((\(\d{1,6}\))|\d{1,6})[- .]?\d{3,6}[- .]?\d{4,8}$

+1-222-155-2121

US phone number regex (Dialed in US)

^(\+\d{1,3}( )?)?1?\-?\.?\s?((\(\d{1,6}\))|\d{1,6})[- .]?\d{3,6}[- .]?\d{4,8}$

1-222-454-1212

US phone number regex (Dialed from outside US)

\(?\d{3}\)?[. -]? *\d{3}[. -]? *[. -]?\d{4}

001-222-222-2222

e164 format-[+] [country code] [subscriber number including area code] and can have a maximum of fifteen digits.

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

+14155552671

10 Digit Phone Number With No Space, 10 digit mobile number validation, regex for 10 digit phone number

^\d{10}$

9567887678

8 to 11 Digits Phone Regex With No Space

^\d{8,11}$

98765432100

Include (+) Symbol

^(\+)\d

+916543210908

E 164 format-[+] [country code] [subscriber number including area code] and can have a maximum of fifteen digits.

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

+14155552671

10 Digit Phone Number With WhiteSpaces

^(\d{3}[ ]?){2}\d{4}$

987 654 3210

10 Digit Phone Number With Hyphens

^(\d{3}[- .]?){2}\d{4}$

987-654-3210

10 Digit Phone Number With Dot

^(\d{3}[- .]?){2}\d{4}$

987.654.3210

10 Digit Phone Number With Dot

^(\d{3}[- .]?){2}\d{4}$

987.654.3210

10 digit Phone Number with Bracket

^((\(\d{3}\))|\d{3})[- ]?\d{3}[- ]?\d{4}$

(987)6543210

Regex To Match Phone Number of All Country Formats

(\+\d{1,3}( )?)?1?\-?\.?\s?((\(\d{1,6}\))|\d{1,6})[- .]?\d{3,6}[- .]?\d{4,8}$

+1 (212) 555-3456

Allow Extensions

(([\+]?[ 0-9]{1,6}([ \.\-])?)?([\(]{1}[ +0-9]{2,6}[\)])?([ 0-9A-Z\.\-]{1,32})([0-9]+))|((e|x|ex|ext|extension)(\.|\:)?([ ]{1})?[0-9]+)

+800333981x1

Frequently Asked Questions on Phone Number Validation Regex

FAQ icon

  • Regex stands for Regular Expression and it's a pattern of characters in a specific format that can act as a rule and can be used to check adherence or match of an input text to the rules. A phone regex is a pattern for matching phone numbers.

  • Example of a phone number regular expression is ^(\+\d{1,3}( )?)?1?\-?\.?\s?((\(\d{1,6}\))|\d{1,6})[- .]?\d{3,6}[- .]?\d{4,8}}}$ This regex pattern matches any phone number of all country formats.

  • E.164 is the international telephone numbering plan that ensures each device on the PSTN has globally unique number. This number allows phone calls and text messages can be correctly routed to individual phones in different countries. E.164 numbers are formatted [+] [country code] [subscriber number including area code] and can have a maximum of fifteen digits. E. 164 uses no spaces, no dashes, no parenthesis, and no periods. Examples of E.164 Numbers +14155552671, +442071838750, +551155256325

  • E.164 phone number format is the international phone number formatting standard across the globe. The longer the password the more difficult it is to crack it as the number of permutation and combination to guess the password will be too high. Examples of E.164 Numbers +14155552671 . The North American Numbering Plan (NANP) divides the territories of its members into numbering plan areas (NPAs) which are encoded numerically with a three-digit telephone number prefix, commonly called the area code. Each telephone is assigned a seven-digit telephone number unique only within its respective numbering plan area. The telephone number consists of a three-digit central office code and a four-digit station number. The combination of an area code and the telephone number serves as a destination routing address in the public switched telephone network (PSTN). Examples of North American Numbering Plan (234) 235-5678 is a valid telephone number; with area code 234, central office prefix (exchange) 235, and line number 5678