Back to all patterns
UK Phone Number Validation
Validation
Validates UK mobile phone numbers in +447xxxxxxxxx or 07xxxxxxxxx format.
/^(\+44|0)7\d{9}$/How it works
UK mobile numbers start with 07 (domestic) or +447 (international E.164). This pattern validates both formats. UK mobile numbers are 11 digits domestically (07xxx xxxxxx) or 13 digits in E.164 (+447xxx xxxxxx).
Test Cases
Should Match
- +447911123456
- 07911123456
Should NOT Match
- +447911
- 08001234567
- 447911123456
Quick Summary
Validates UK mobile numbers in domestic (07xxxxxxxxx) or international (+447xxxxxxxxx) format. Does not validate UK landlines, those start with 01 or 02.
Key Takeaways
Key Takeaways
- UK mobiles start with 07 (domestic) or +447 (E.164)
- UK landlines start with 01 or 02, use a different pattern
- Strip spaces before validating, UK numbers are often written as 07911 123456
- Use libphonenumber-js for full UK number validation including landlines
Use Cases
When to use it
- Validating UK mobile inputs in contact forms
- Normalizing UK phone numbers to E.164 before SMS sending
- Filtering UK mobile numbers from a contact database
Watch out
Common Mistakes
- Not stripping spaces, UK numbers are commonly written with spaces
- Using this for UK landlines, landlines start with 01/02, not 07
FAQ
UK Phone Number Validation, Frequently Asked
How do I validate all UK phone numbers (mobile and landline)?
Use libphonenumber-js with the GB region: parsePhoneNumber(number, 'GB').isValid()
How do I convert 07911123456 to E.164?
Replace the leading 0 with +44: +447911123456