NC Logo UseToolSuite
Text Processing

Phone Number Regex Patterns by Country

Regex patterns for validating phone numbers across different countries and formats. Covers US, UK, EU, and international E.164 format.

Necmeddin Cunedioglu Necmeddin Cunedioglu

Practice what you learn

Regex Tester

Try it free →

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

  1. Store in E.164 format — Always normalize to +[country][number] for storage and comparison.
  2. Display in local format — Show numbers in the user’s local format for readability.
  3. 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.
  4. 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.

Necmeddin Cunedioglu
Necmeddin Cunedioglu Author

Software developer and the creator of UseToolSuite. I write about the tools and techniques I use daily as a developer — practical guides based on real experience, not theory.