Skip to content

Regex for US Phone Number

This regex matches US phone numbers in a variety of common formats including with or without country code, parentheses around the area code, and dashes, dots, or spaces as separators. It handles formats like (555) 123-4567, 555-123-4567, 5551234567, and +1 555 123 4567. The pattern is flexible enough for user input while still enforcing the 10-digit US format.

Pattern
^\+?1?[-.\s]?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$
Test this pattern in the Regex Tester →

What is the regex pattern for US Phone Number?

The regex pattern for US Phone Number is ^\+?1?[-.\s]?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$. This regex matches US phone numbers in a variety of common formats including with or without country code, parentheses around the area code, and dashes, dots, or spaces as separators. It handles formats like (555) 123-4567, 555-123-4567, 5551234567, and +1 555 123 4567. The pattern is flexible enough for user input while still enforcing the 10-digit US format. This pattern is commonly used for phone number form validation and contact data extraction.

Test Examples

Match
(555) 123-4567
Matches: (555) 123-4567
Match
555-123-4567
Matches: 555-123-4567
Match
+1 555 123 4567
Matches: +1 555 123 4567

Common Uses

Variations

Strict 10 digits

^\d{10}$

Only matches exactly 10 consecutive digits

With extension

^\+?1?[-.\s]?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}(\s*(ext|x|ext.)\s*\d{1,5})?$

Allows extensions like ext. 1234

Dashes only

^\d{3}-\d{3}-\d{4}$

Only 555-123-4567 format

Frequently Asked Questions

Does this regex validate that the phone number actually exists?

No, it only checks the format. Valid formatting does not guarantee the number is assigned or active. Use a phone validation API for deliverability checks.

Can this match toll-free numbers?

Yes, toll-free numbers like 1-800-555-0199 follow the same 10-digit format and are matched by this pattern.

Why allow so many separator formats?

Users enter phone numbers in many different ways. Allowing dashes, dots, spaces, and parentheses reduces form validation friction and improves user experience.

Related Patterns

International Phone Number

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

US ZIP Code

^\d{5}(-\d{4})?$

Related Reading

Regex Cheat Sheet with Examples for Developers → URL Encoding Special Characters →