Testing UK checkout and registration forms is far smoother with addresses that pass postcode validation. This generator builds fictional UK addresses whose postcodes follow the official outward/inward-code rules, complete with a realistic town and street.
How it works
The tool stores UK towns with their genuine postcode area letters (for example Manchester uses M, Edinburgh uses EH). A postcode is assembled as an outward code — area letters plus a one or two digit district — followed by a space and an inward code of one sector digit and two unit letters. The unit letters are drawn only from the set Royal Mail permits in those positions (it excludes confusable letters such as C, I, K, M, O, and V). A random house number and street name finish each address.
Tips and notes
- The postcode format always validates against standard UK regex checks, which is the usual reason QA needs these.
- The exact postcode is fictional within a real area, so do not expect a geocoder to resolve it to the named town.
- Use the JSON export to seed databases — each record splits into
line1,town, andpostcodefields.