What is a UK postcode?
A UK postcode has two parts separated by a space: an outward code for the town or district, and an inward code for the street or building, for example SW1A 1AA. Length varies from five to seven characters, and the outward code is usually one or two letters followed by one or two digits.
Reading a postcode
SW1A 1AA breaks down as SW (south-west London), 1A (the district), 1AA (the specific building or delivery point). The last two letters are always letters, and the digit before them is the sector.
Why it is not a ZIP code
A UK postcode is alphanumeric and variable in length, while a US ZIP code is five digits. A form that validates with a five-digit rule will reject every UK address, so postcode fields need their own pattern.
Using it in test data
Pair the postcode with the right city — London SW1A 1AA, Manchester M1 1AE, Edinburgh EH1 1YZ. Our generator matches each UK city with a real postcode format and area code.
Frequently asked questions
Is the space in a UK postcode required?
Yes, in the official format: outward code, space, inward code. Many systems accept it without the space, but store it with the space.
Can a postcode identify a single house?
Often, yes. The inward code can narrow to a single building or a handful of houses, which is why it is precise enough for delivery routing.
Do UK postcodes change?
Occasionally, when new streets or buildings are added. For test data this does not matter — use the postcode that matches the test city.
Test data — not a real person. All addresses on this page are test data for software testing only. No address belongs to a real person; no SSN is generated; phone numbers use the 555-0100–555-0199 test range and emails use example.com.