UK Post Code generator

Last modified: April 3, 2025

The UK Post Code generator creates postal codes specific to the United Kingdom, following the UK postcode format. It generates valid postal codes that adhere to the alphanumeric structure used in the UK, which usually consists of a postcode area, postcode district, sector, and unit. This generator is useful for testing, simulating, or populating datasets with realistic UK postal code information.

Note

If you select United Kingdom from the Country-specific data list on the Options page of the Data Generator Project Properties wizard, the UK Post Code generator will be applied to columns that meet the matching rules, replacing the default (United States) generator.

UK country specific data

Generator properties

The table provides key details about the generator, including the short name, sample of the generated data, the supported data types, and whether it is specific to a particular country.

Short name Example of generated data Data type matching Country-specific
UK Post FY268ZQ, CR66HX, … FY26 8ZQ, CR6 6HX, … charactercharacter varyingtext UK

Matching rules

The generator can be assigned to a column that matches any of the following rules:

  • The column name contains ‘ZipCode’, ‘PostalCode’, or ‘Zip’, preceded or followed by any or no characters, regardless of the table name.
  • The column name contains ‘Addr’, preceded or followed by any or no characters, and ends with ‘4’, regardless of the table name.

Configure additional options

The generator produces data based on a regular expression. Since it is built on the RegExp generator, see Regular Expression generator to customize settings and understand the correct usage of syntax.

Preview of the column data generated by the UK Post Code generator

UK Post Code generator