UK mobile number testing

UK Mobile Number Format for Test Data

A realistic-looking mobile field should follow the UK numbering shape without creating a complete contact number or confusing mobile services with neighbouring personal-number and paging ranges.

By · Published · Updated

UK Mobile Number Format for Test Data visual guide cover

Domestic and international shape

A conventional UK domestic mobile number contains 11 digits beginning with 0. In international presentation, remove the leading 0 and use country code +44. Spaces improve readability but should not be treated as part of the underlying identifier.

UsePatternDiallable?
Domestic test pattern07432 581 XXXNo
International test pattern+44 7432 581 XXXNo

Know the 07 service boundaries

Ofcom lists mobile services within 071–075 and 077–079. It separately identifies 070 as personal numbers and 076 as radiopaging. A validator should not accept every value beginning with 07 as an ordinary UK mobile number.

Ofcom publishes current allocated and available number blocks in its numbering data. Allocation information changes, so a maintained service should record its source date and periodically review its prefix data.

Why PostcodeLab masks the final digits

The generator chooses from a curated allocated-prefix snapshot, adds three random digits and replaces the final three digits with XXX. The output keeps the visual length needed for interface testing but cannot be dialled as displayed.

Do not replace the masked characters. Completing a pattern could produce a number assigned to an unrelated person or service. For automated tests, keep the literal X characters or use a product-specific reserved fixture agreed with the integration provider.

Validation checklist

  • Normalise spaces and the +44 form before comparing values.
  • Distinguish ordinary mobile ranges from 070 and most 076 services.
  • Do not infer a person's identity or current provider from a prefix.
  • Validate again on the server when the value affects an account workflow.
  • Use an explicit sandbox destination for real SMS delivery tests.

Official references