Royal Mail Postcode & UK Address Formatting
United Kingdom addresses have one of the most distinctive postal formats in software localization. Unlike fixed-length numeric codes, a UK postcode combines a variable-length outward code (2 to 4 characters such as SW1A, EC2A, M1, or EH1) with a space and a three-character inward code ([0-9][A-Z][A-Z] excluding C, I, K, M, O, V to avoid visual ambiguity).
GenAddress builds synthetic random UK addresses across England, Scotland, Wales, and Northern Ireland, matching authentic outward postcode districts to each post town and pairing them with proper +44 geographic dialling codes.
UK Regional & Postcode District Coverage
| UK Country | Post Towns | Outward Postcode Districts | Geographic Dialling Codes |
|---|---|---|---|
| England | London, Manchester, Birmingham, Bristol, Leeds, Oxford, Cambridge | SW1A, EC2A, W1D, M1, B1, BS1, LS1, OX1, CB1 |
+44 20, +44 161, +44 121, +44 117, +44 113 |
| Scotland | Edinburgh, Glasgow | EH1, EH2, EH3, G1, G2, G3 |
+44 131, +44 141 |
| Wales | Cardiff | CF10, CF11, CF24 |
+44 29 |
| Northern Ireland | Belfast | BT1, BT2, BT7 |
+44 28 |
Why UK Regex Validation Breaks on Naive Mock Data
Many checkout forms validate UK postcodes with official regex patterns and split London (+44 20 xxxx xxxx) from regional numbers (+44 161 xxx xxxx). Because GenAddress enforces valid outward-to-city mapping and Royal Mail inward letter rules locally in your browser, you can test UK VAT checkout, carrier shipping zones (GB mainland vs Northern Ireland BT postcodes), and multi-line address forms cleanly.
Testing international shipping across multiple English-speaking markets? Combine this tool with our US Address Generator, Random Canadian Address Generator, or Random Japanese Address Generator. All generated addresses are synthetic mock records for testing only.