Phone Number (US/International)
Match US and international phone numbers with optional country code and separators.
What Is This?
This regex pattern validates US phone numbers with optional international format. It supports optional +1 country code, area code in parentheses or without, and flexible separators (dots, hyphens, spaces). It matches standard 10-digit US phone numbers with or without formatting.
How to Use This Pattern
Pattern
^\+?1?[-.\s]?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$
^\+?1?[-.\s]?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$Usage
The pattern is designed for North American numbering plan numbers (NANP). The country code (+1) is optional. The area code (3 digits) can be surrounded by parentheses. The remaining 7 digits can be separated by dots, hyphens, spaces, or no separator.
Examples
Matches: (555) 123-4567, 555-123-4567, 555.123.4567, +1 555-123-4567. Non-matches: 123-4567, 555-123-456, +44 20 7946 0958
Matches: +15551234567, 1-555-123-4567, +1 (555) 123-4567. Non-matches: 555-123-45678, text, +12 345 678 9012
Related Entries
More from this reference:
Email Address Validation
Validate email addresses with a standard pattern covering most common formats.
URL Pattern
Match HTTP and HTTPS URLs with optional port, path, query string, and fragment.
Date (YYYY-MM-DD)
Match dates in ISO 8601 YYYY-MM-DD format with basic month and day validation.
Credit Card Number (Generic)
Match generic credit card numbers in grouped or continuous 16-digit format.
Frequently Asked Questions
Does this work for non-US phone numbers?
No. International phone number formats vary significantly by country. For international validation, use a library like libphonenumber (Google) which maintains up-to-date formatting rules for every country.
Should I store formatted or unformatted phone numbers?
Store phone numbers in E.164 format (+1XXXXXXXXXX) without separators. This normalized format is universally accepted and makes it easy to validate, compare, and format for display.