Phone Number Regex (US & International)

Validate North American and standardized phone numbers across multiple formats (e.g. (123) 456-7890, 123-456-7890, +1 123 456 7890).

//g
Valid: (555) 555-1234 555-555-1234 +1 555 555 1234 5555551234

Regex Cheatsheet

COMMON PATTERNS
SYNTAX REFERENCE
TOOLS FOR WRITING BETTER CODE
JetBrains All Products Pack
IDEs with built-in regex debugging, refactoring, and inspections.
Try free โ†’
Regex course on Udemy
Go from this cheatsheet to writing complex patterns confidently.
View course โ†’
DigitalOcean / hosting credit
Deploy the scripts you are testing patterns for.
Get credit โ†’
Affiliate disclosure: links above may earn us a commission โ€” this never affects the calculation results above.

Common Use Cases for Phone Number Regex (US & International)

Checkout & Shipping Forms

Ensure buyers enter valid contact phone numbers before processing payments.

SMS OTP Verification

Sanitize and validate phone numbers before sending two-factor authentication SMS codes.

Frequently Asked Questions

How does it handle formatting like brackets and dashes?

The pattern makes parentheses, spaces, dots, and hyphens optional so formatted and raw numeric entries are accepted.