Aarunya AppsAarunya Apps

US Phone NumberRegex — Pattern, Examples & Code

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

What it matches / doesn't match

Matches ✅Does not match ❌
(555) 123-4567123-456-789
+1 800 555-0100+44 7911 123456
555.987.6543(0800) 123-4567

How it works

Validates 10-digit US/Canada phone numbers (NANP) with an optional +1 country code prefix. The area code must start with 2–9, and separators (space, dot, hyphen) between groups are optional. Parentheses around the area code are also optional. It rejects numbers starting with 0 or 1, which are invalid NANP area codes.

Code Usage

JavaScript

const regex = /^(\+1[\s.-]?)?\(?[2-9]\d{2}\)?[\s.-]?\d{3}[\s.-]?\d{4}$/;
regex.test("(555) 123-4567"); // true

Python

import re
pattern = re.compile(r'^(\+1[\s.-]?)?\(?[2-9]\d{2}\)?[\s.-]?\d{3}[\s.-]?\d{4}$')
bool(pattern.match("(555) 123-4567"))  # True

Go

import "regexp"
r := regexp.MustCompile(`^(\+1[\s.-]?)?\(?[2-9]\d{2}\)?[\s.-]?\d{3}[\s.-]?\d{4}$`)
r.MatchString("(555) 123-4567") // true

Need a custom regex for a different use case?

Generate a custom regex with AI →

FAQ

What does the US Phone Number regex pattern match?

Validates 10-digit US/Canada phone numbers (NANP) with an optional +1 country code prefix. The area code must start with 2–9, and separators (space, dot, hyphen) between groups are optional. Parentheses around the area code are also optional. It rejects numbers starting with 0 or 1, which are invalid NANP area codes.

How do I use the US Phone Number regex in JavaScript?

const regex = /^(\+1[\s.-]?)?\(?[2-9]\d{2}\)?[\s.-]?\d{3}[\s.-]?\d{4}$/; regex.test("(555) 123-4567"); // true

Can I use the US Phone Number regex in Python?

Yes. import re pattern = re.compile(r'^(\+1[\s.-]?)?\(?[2-9]\d{2}\)?[\s.-]?\d{3}[\s.-]?\d{4}$') bool(pattern.match("(555) 123-4567")) # True