Regex Library
Regex Library

14 patterns

Phone Number Validation Regex Patterns

Phone number validation varies enormously by country. These patterns cover international E.164 format, French numbers, US numbers, and flexible formats that accept common separators like spaces, dashes, and parentheses.

Common Use Cases

Contact formsInternational phone inputSMS validationPhone number extraction

All Phone Number Validation Patterns

French Mobile Phone

French mobile numbers (06/07) with or without formatting.

^(?:(?:\+|00)33|0)[67](?:[\s.-]?\d{2}){4}$

French Landline Phone

French landline numbers (01-05) with or without formatting.

^(?:(?:\+|00)33|0)[1-5](?:[\s.-]?\d{2}){4}$

International Phone

International E.164 format (max 15 digits).

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

US Phone

US format with variations (555-123-4567).

^(?:\+?1[-.\s]?)?\(?([0-9]{3})\)?[-.\s]?([0-9]{3})[-.\s]?([0-9]{4})$

Phone Extraction

Extracts various phone number formats.

(?:\+\d{1,3}[-.\s]?)?(?:\(?\d{1,4}\)?[-.\s]?)?\d{1,4}[-.\s]?\d{1,4}[-.\s]?\d{1,9}

German Phone Number

Validates German phone numbers (mobile and landline).

^(\+49|0)[1-9][0-9]{7,11}$

UK Phone Number

Validates UK phone numbers (mobile 07xxx and landline).

^(\+44|0)7[0-9]{9}$|^(\+44|0)[1-9][0-9]{9}$

Spanish Phone Number

Validates Spanish phone numbers (9 digits, starts with 6-9).

^(\+34)?[6-9][0-9]{8}$

Italian Phone Number

Validates Italian phone numbers (mobile 3xx and landline 0xx).

^(\+39)?3[0-9]{8,9}$|^(\+39)?0[0-9]{7,9}$

Phone Number India (+91)

Validates an Indian mobile number (starts 6-9 after +91 or 0).

^(?:\+91[-\s]?|0)?[6-9]\d{9}$

Phone Number Brazil (+55)

Validates Brazilian phone numbers (cellular and landline) with optional +55 country code.

^(?:\+?55\s?)?\(?(?:1[1-9]|[2-9]\d)\)?\s?9?\d{4}[-\s]?\d{4}$

Phone Number Japan (+81)

Validates a Japanese phone number (mobile or landline) with optional +81.

^(?:\+81[-\s]?|0)(?:\d[-\s]?){9}\d$

Phone Number China (+86)

Validates a Chinese mobile phone number (11 digits starting with 1).

^(?:\+?86[-\s]?)?1[3-9]\d{9}$

Phone Number Mexico (+52)

Validates a Mexican phone number (mobile or landline) with optional +52.

^(?:\+?52[-\s]?)?(?:1[-\s]?)?\(?\d{2,3}\)?[-\s]?\d{3,4}[-\s]?\d{4}$

Frequently Asked Questions

What is the best regex for international phone numbers?

E.164 format: ^\+[1-9]\d{6,14}$ - it covers all valid international numbers.

Should I validate phone numbers with regex?

Regex is good for basic format checking. For production, consider a library like libphonenumber that handles country-specific rules.

How do I allow spaces and dashes in phone input?

Use a flexible pattern and normalize before saving: strip all non-digits from the input.

Looking for patterns in other categories?

Browse all 300 patterns