Phone Number Regex Patterns by Country
Phone number formats vary wildly across countries. This guide provides tested regex patterns for the most common formats, plus a universal pattern for international numbers.
Universal: E.164 International Format
The E.164 standard is the safest format for storing phone numbers globally:
^\+[1-9]\d{6,14}$
Format: + followed by country code and subscriber number (7-15 digits total).
Examples: +14155551234, +442071234567, +905551234567
Test these patterns: Open our Regex Tester and paste any pattern to validate it against your phone numbers.
United States & Canada (+1)
^(\+1)?[-.\s]?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$
Matches: (415) 555-1234, 415-555-1234, 415.555.1234, +1 415 555 1234, 4155551234
United Kingdom (+44)
^(\+44|0)\d{10,11}$
Matches: +447911123456, 07911123456, 02071234567
Germany (+49)
^(\+49|0)\d{10,13}$
Matches: +4915112345678, 015112345678
Turkey (+90)
^(\+90|0)?\s?\(?\d{3}\)?\s?\d{3}\s?\d{2}\s?\d{2}$
Matches: +90 555 123 45 67, 0555 123 45 67, 05551234567
Best Practices
- Store in E.164 format — Always normalize to
+[country][number]for storage and comparison. - Display in local format — Show numbers in the user’s local format for readability.
- Use a library for production — Libraries like
libphonenumber(Google) handle edge cases that regex cannot. Use regex for quick client-side validation, libraries for server-side. - Accept flexible input — Let users type numbers with spaces, dashes, or parentheses. Normalize during processing.
Flexible Input Cleaner
Before validating, strip formatting characters:
const clean = phone.replace(/[\s\-\(\)\.]/g, '');
// Then validate the cleaned number
This article is part of our Regular Expressions Guide series.