Random UK Postcode Generator
Get 1 to 15 random postcodes in the standard UK format, each shown with a town and a real British county, ready to copy.Enter a number from 1 to 15 and press the button to get that many postcodes in the standard UK pattern, such as SK72 3KB or HD7 8CH. Each card shows the postcode in large type with a town and county underneath, and a copy icon that puts just the postcode on your clipboard. The Random UK Postcode Generator is for people who need a correctly shaped British postcode to drop into a form, a test database or a mockup, not for looking up a real delivery point.
What you get on each card
- The postcode. Two letters, one or two digits, a space, then a digit and two letters, matching the AA9 9AA and AA99 9AA patterns that cover most of the country.
- A town name. Generated by an English-language place-name pattern, so you'll see invented names like Hayeshaven or Garnettborough alongside a few real ones.
- A county. Drawn from a list of 70 real UK counties, including Welsh, Scottish and Northern Irish ones such as Clwyd, South Glamorgan, Borders and County Antrim, plus historic names like Avon that still appear in older address data.
The one honest caveat: the letters in the postcode are random, so the outward code will rarely match a real postcode area. A real postcode's first letters identify a town (SW is south-west London, M is Manchester, EH is Edinburgh); a generated one like JN5 doesn't map to anywhere. For a validator that only checks the shape of the input, that doesn't matter. For one that checks against the Royal Mail database, it will fail, which is usually what you want from test data.
Options and limits
The only setting is how many postcodes to produce, from 1 to 15 per click. There's no filter by region, city or country within the UK. If you need London-style codes specifically, the Random London Postcode Generator restricts the outward code to London districts like SW1, EC1 and N7.
Where random UK postcodes come in handy
- Form and regex testing. Fifteen at a time is enough to exercise a postcode field's formatting rules, including uppercase handling and the single space before the inward code.
- Seeding a customer table. Pair the postcode with the county to give staging data a plausible spread across England, Wales, Scotland and Northern Ireland.
- Design mockups. A card with "SK72 3KB" reads like a real UK checkout page in a way that "12345" never will.
How a real UK postcode is built
A UK postcode has two halves. The outward code (before the space) narrows the location to a postcode district; the inward code (after the space) narrows it to a handful of addresses, often a single street or building.
| Part | Example (SW1A 1AA) | What it means |
|---|---|---|
| Area | SW | One or two letters; there are 124 areas, usually named after a major town |
| District | 1A | One or two digits, occasionally with a letter (only in central London) |
| Sector | 1 | A single digit after the space |
| Unit | AA | Two letters; never C, I, K, M, O or V, to avoid confusion with digits |
Six patterns are in use: A9 9AA, A99 9AA, AA9 9AA, AA99 9AA, A9A 9AA and AA9A 9AA. This tool produces the two most common, AA9 9AA and AA99 9AA, and doesn't apply the C-I-K-M-O-V rule to the unit letters. The UK has no "ZIP code" as such; if you searched for a random UK ZIP code, a postcode is the equivalent.
Related postcode and address tools
The Random UK Address Generator gives you a full street line with the postcode attached. For other countries, try the Random Postal Code Canada tool, which uses Canada's letter-digit-letter format, or the Random US ZIP Code Generator for five-digit US codes. You can browse all address & postal code generators for the full list.
Frequently asked questions
- Are the generated UK postcodes real?
No. They follow the correct pattern (two letters, digits, space, digit, two letters) but the letters are random, so the outward code usually doesn't correspond to a real postcode area. Treat them as format-valid dummy data.
- Can I generate a postcode for a specific city like Manchester or Birmingham?
Not with this tool; there's no city filter. The Random London Postcode Generator is the only city-specific option.
- How many postcodes can I generate at once?
Between 1 and 15 per click, and you can click as often as you like.
- Why does the card show a county under the postcode?
Each result is paired with a town name and one of 70 real UK counties so the card reads like an address block. The town is generated; the county is real.



