FOI reference: FOI-2025-3137

You asked

I would like to request a dataset of all Unitary Authorities in the United Kingdom, mapped to full postcodes (not partial postcodes), using the latest available data. For each postcode, please provide the Unitary Authority name and the corresponding Unitary Authority code.

We said

Thank you for your request and for your interest in ONS Geography.  

The information you are looking for is available on the Open Geography Portal and can be found in a few of our existing freely available products. 

Using this source, you can carry out your own data linkage tailored to your needs with the resources provided.

We regularly produce postcode directories linked to different geographies: NSPL (National Statistics Postcode Lookup) and ONSPD (ONS Postcode Directory). NSPL is used for statistical purposes. It links each postcode to an Output Area, which then connects to larger areas like districts and regions. Once a postcode is assigned to an Output Area, it remains linked to it. ONSPD is used more for mapping. It links each postcode to the administrative area where its geographical centre falls. Since postcodes are designed for mail delivery, they do not always follow administrative boundaries. For example, a village on the border of two regions might have one postcode that covers both sides. NSPL would link it to one area based on its Output Area, while ONSPD would link it to the area where its centre point is located. 

Both directories include all UK postcodes, including live and terminated ones. The best way to filter for current postcodes is by using the DOTERM (Date of Termination) field. If the field is blank, the postcode is current. If it contains a date, the postcode has been terminated. We also produce a postcode centroids file that includes only live postcodes. 

For the latest postcode to unitary authority information, you can use the August 2025 ONSPD or the August 2025 NSPL. 

Unitary authorities are held in the Local Authority District field (LAD25CD). ONSPD will give the exact district based on the postcode's grid reference, while NSPL will give the best-fit district based on the 2021 Output Area, which is recommended for statistical use. 

If you use the multi-CSV option in the download package, you can select a postcode area, for example "PO" for Portsmouth. The User Guide includes a table with area abbreviations. We recommend reading the guide before use to get familiar with the layout and variables. The download includes the User Guide, data files, and name/code files. 

You will need suitable software to open the postcode directories. Excel may not be suitable due to file size limits, but Notepad++ can be used. 

We also offer a postcode lookup tool that returns codes for a range of geographies for any single postcode. 

The April 2025 Local Authority District names and codes file provides the link between the Unitary Authority code (LAD25CD) and name (LAD25NM). It is available in the Documents folder of the NSPL or ONSPD download package, or separately on the Open Geography Portal.  

Please note that while you mentioned Unitary Authorities in the UK, these exist as such in England. There are also UA-equivalent areas across the UK, such as London Boroughs, Metropolitan Districts, and Council Areas. We recommend including all these types in your analysis. The portal contains more reference tables on UK administrative geographies if you need to differentiate.

We are happy to provide any further information and advice to support your work via ONS.Geography@ons.gov.uk should you require any assistance.

If you are unable to conduct this data linkage work yourself, we do offer bespoke services which are subject to our charging policy, as well as resources, legal frameworks and disclosure controls. Please contact ONS.Geography@ons.gov.uk for more about this service if required.