> ## Content Index
> Fetch the complete content index at: https://wisener.net/llms.txt
> Use this file to discover other available public pages before exploring further.

# Source: ONSPD dataset for matching postcodes to location
- URL: https://wisener.net/source-onspd-dataset-for-matching-postcodes-to-location/
- Published: 2025-08-19T23:00:00.000Z
- Updated: 2026-10-12T18:27:18.000Z
- Description: In order to get granular detail down to a Ward level a mapping table is required. There are caveats though!
- Author: Lee Wisener
- Tags: ONSPD, #Import 2026-10-12 18:55

Some tables only provide so much data, postcode, LAD (Local Authority District) code and so on. Most open government data does not rely on names but GSS codes so it’s better to use those as a reference. The dataset required is ONSPD.

The dataset required for this can be found here.

[https://geoportal.statistics.gov.uk/datasets/295e076b89b542e497e05632706ab429/about](https://geoportal.statistics.gov.uk/datasets/295e076b89b542e497e05632706ab429/about?ref=wisener.net)

It’s a chunky file at 1.44GB currently. However, depending on your needs, you may not need all fields, so you can cut the file down.

The file contains

1. Postcode
2. oa21cd – Output Area
3. lsoa21cd – Lower Super Output Area
4. msoa21cd – Middle Super Output Area
5. wd25cd – Ward code
6. lad25cd – Local Authority District code
7. ctrycd – Country code
8. Plus more

**Caveats!**

All you get is the codes, no names for what each of the areas are, for example, I know that Kensington and Chelsea has a Local Authority District code of E09000020, but you won’t get that from the ONSPD file, only E09000020\. You then need a names file to match the ONSPD data.

You can get the files you need here.

1. Local Authority District – Small file
2. Wards – 1.5MB, not small, not big

[https://geoportal.statistics.gov.uk/](https://geoportal.statistics.gov.uk/?ref=wisener.net)

Unfortunately, there is no really easy way to just get one file with all the data you need; if there was, it would be difficult to work with. So not a great, not terrible solution.