Look up a number
Reference

Validate a UK mobile number (2026 guide)

How to validate a UK mobile number in 2026: format check, prefix check, libphonenumber-js code, plus carrier-aware paid APIs for bulk B2B work.

3 min read
Managing Director, OmegaIT · OmegaIT · Published 9 May 2026 · Updated 14/05/2026
On this page

Validating a UK mobile number sounds trivial — does it start with 07 and have 11 digits? — but a real validator needs to handle the 07 vs 070 distinction, recognise legacy pager and personal-numbering ranges, and reject numbers from blocks that aren't allocated for mobile service. This guide shows the manual rules, the libphonenumber-js code, and the right tool for bulk validation.

What counts as a UK mobile number

PrefixTypeAllocated to (typical)
070Personal-numbering — NOT a mobileVarious
071MobileVarious MNOs
072MobileVarious MNOs
073MobileVarious MNOs
074MobileVarious MNOs
075MobileVarious MNOs
076Pager (legacy)Vodafone Pagers, BT Pagers
077MobileVarious MNOs
078MobileVarious MNOs
079MobileVarious MNOs

Manual UK mobile validation rules

  1. Strip non-digits except a leading +.
  2. If the number starts +44, replace with 0.
  3. If the number now has length 11 and starts 07, continue. Otherwise reject.
  4. If the second-and-third digits are 0 or 6, reject (070 = personal-numbering, 076 = pager).
  5. Optionally: cross-reference against the Ofcom range data to confirm the block is Allocated.

Programmatic UK mobile validation in JavaScript / TypeScript

Production-grade UK mobile validator using libphonenumber-js
import { parsePhoneNumberFromString } from "libphonenumber-js/min";

export function isValidUkMobile(input: string): boolean {
  const phone = parsePhoneNumberFromString(input, "GB");
  if (!phone || !phone.isValid() || phone.country !== "GB") return false;
  return phone.getType() === "MOBILE";
}

export function toMobileE164(input: string): string | null {
  return isValidUkMobile(input)
    ? parsePhoneNumberFromString(input, "GB")!.number
    : null;
}

getType() returns MOBILE only for the actual mobile prefixes (071–075, 077–079). 070 personal-numbering returns PERSONAL_NUMBER; 076 pager returns PAGER. That distinction is what hand-rolled regexes miss.

Validating in Python

Same idea in Python with phonenumbers
import phonenumbers
from phonenumbers import PhoneNumberType

def is_valid_uk_mobile(value: str) -> bool:
    try:
        n = phonenumbers.parse(value, "GB")
    except phonenumbers.NumberParseException:
        return False
    if not phonenumbers.is_valid_number(n):
        return False
    return phonenumbers.number_type(n) == PhoneNumberType.MOBILE

Validating in PHP / Laravel

PHP using giggsey/libphonenumber-for-php
use libphonenumber\PhoneNumberUtil;
use libphonenumber\PhoneNumberType;

function isValidUkMobile(string $value): bool {
    $util = PhoneNumberUtil::getInstance();
    try {
        $n = $util->parse($value, 'GB');
    } catch (\Exception $e) {
        return false;
    }
    return $util->isValidNumber($n)
        && $util->getNumberType($n) === PhoneNumberType::MOBILE;
}

Carrier-aware validation — when format-check isn't enough

Format validation only tells you the number *could* be a real mobile. To find out whether it's *actually in service*, you need a carrier-aware API:

ServiceWhat it addsCost
Twilio Lookup (Line Type Intelligence)Confirms current carrier (post-port) and live in-service status.From $0.005/lookup
NumverifyFormat + carrier, lighter weight.Free tier 100/mo; from $14.99/mo
Vonage Number InsightAdds roaming + reachability data.From $0.005/lookup
MessageBird LookupFormat + carrier, fast.Free tier; usage-based

For consumer apps that just need 'is this number well-formatted?', stick with libphonenumber-js — it's free and runs locally. For B2B applications where you're cleansing thousands of numbers, the carrier-aware APIs justify their cost. We cover the comparison in UK phone number validation API.

Validating mobile numbers for SMS marketing

Sending unsolicited marketing texts to a UK mobile without the recipient's consent (or a valid soft opt-in) is a breach of PECR. The ICO has issued multi-million-pound fines to organisations who run SMS campaigns without checking lawful basis.
ICO — Direct marketing guidance, PECR Regulation 22

If you're validating numbers for an SMS marketing list, three extras you need:

  1. Lawful basis — UK PECR + GDPR require opt-in (with very limited soft-opt-in exceptions). Validation alone doesn't grant consent.
  2. Number type = MOBILE — landlines can't receive SMS; sending to one wastes credits and triggers carrier complaints.
  3. Currency check — numbers can be ported between MNOs. Carrier-aware APIs catch ported numbers; pure format checks don't.

Bottom line

Validating a UK mobile number is two layers: a format check (libphonenumber-js, free, runs locally) and an in-service check (carrier-aware API, paid, runs over the network). Use the first for every signup form; add the second for bulk CRM cleansing or SMS marketing.

Look up a UK number now

Free, no signup. See the Ofcom range holder + AI internet check.

Frequently asked questions

How do I validate a UK mobile number programmatically?

Use libphonenumber-js (JavaScript / TypeScript), phonenumbers (Python), or libphonenumber-for-php (PHP). All three call into the same Google library and correctly distinguish mobile (071–075, 077–079) from personal-numbering (070) and pager (076).

How do I check if a UK number is valid?

Three layers: (1) format — strip punctuation and confirm 10 or 11 digits with a known UK prefix; (2) type — the first few digits identify the line type; (3) currency — paste it into our checker on the homepage to confirm it's in the latest Ofcom Numbering Data.

Is there a free UK phone number validator?

Yes — libphonenumber-js for developers, and the form at the top of this site for ad-hoc consumer checks. Both are free and require no signup.

What's the difference between a UK phone number validator and a UK number-checker app?

Format validators (libphonenumber-js) confirm the structure of the digits. Checkers add an in-service / Range Holder lookup. Carrier-aware paid APIs add a current-carrier check. Choose based on what question you're trying to answer.

Sources & references

  1. National Telephone Numbering Plan
    Ofcomwww.ofcom.org.uk/phones-and-broadband/phone-numbers/numbering-policy/numbering-plan
  2. libphonenumber-js — JavaScript port
    @catamphetaminegithub.com/catamphetamine/libphonenumber-js
  3. libphonenumber — Google's phone-number library
    Googlegithub.com/google/libphonenumber
  4. Twilio Lookup API — Line Type Intelligence
    Twiliowww.twilio.com/en-us/lookup
  5. Vonage Number Insight API
    Vonagedeveloper.vonage.com/en/number-insight/overview