Part of a Data Solution
- Explore →
Postal Codes Solution
Every worldwide postal-code dataset in one bundle — the ultimate global reference for precise postal codes.
Premium
You're viewing a free sample
Get the complete dataset — all rows and files — delivered instantly after checkout, with lifetime access to the latest version.
- Secure checkout via Stripe
- Instant download after payment
- Lifetime access to the latest version
- Open Government Licence v3.0 license
API Access
Access dataset files directly from scripts, code, or AI agents.
Browse dataset files
API Access
Access dataset files directly from scripts, code, or AI agents.
Each file has a stable URL (r-link) that you can use directly in scripts, apps, or AI agents. These URLs are permanent and safe to hardcode.
Start with these files — they give you everything you need to understand and access the dataset.
- 1. Fetch datapackage.yaml to inspect schema and resources
- 2. Download data resources listed in datapackage.yaml
- 3. Read README.md for full context
Data Files
postal-codes-gb-sample
| Field | Type | Description | Constraints | Title |
|---|---|---|---|---|
| country_code | string | ISO country code — always GB | { "pattern": "^GB$", "required": true } | Country Code |
| postal_code | string | Unit postcode, e.g. AL1 1AG | { "pattern": "^[A-Z]{1,2}[0-9][A-Z0-9]? [0-9][A-Z]{2}$", "required": true } | Postal Code |
| place_name | string | Nearest GeoNames populated place (town/locality) | Place Name | |
| admin_name1 | string | Country: England / Scotland / Wales | Administrative Name 1 | |
| admin_code1 | string | Country GSS code (E92/S92/W92) | Administrative Code 1 | |
| admin_name2 | string | District / unitary authority / borough / council area | Administrative Name 2 | |
| admin_code2 | string | District GSS code (E06/E07/E08/E09/S12/W06) | Administrative Code 2 | |
| admin_name3 | string | Electoral ward | Administrative Name 3 | |
| admin_code3 | string | Ward GSS code (E05/S13/W05) | Administrative Code 3 | |
| latitude | number | WGS84 latitude (converted from BNG) | Latitude | |
| longitude | number | WGS84 longitude (converted from BNG) | Longitude | |
| accuracy | string | OS positional quality indicator (10 = highest; 90 = no coordinate) | Accuracy | |
| alternative_city_name | string | Not available in source — empty | Alternative City Name | |
| admin_county_code | string | Extra: two-tier England county GSS code (E10); blank for single-tier areas | ||
| admin_county_name | string | Extra: two-tier England county name | ||
| easting | integer | Extra: British National Grid easting (EPSG:27700) | ||
| northing | integer | Extra: British National Grid northing (EPSG:27700) |
Download
Download sample CSVAbout
- Last updated
- 3 October 2026
- Total rows
- 100
- Format
- CSV
- File size
- 13.7 kB
- Sources
- Ordnance Survey Code-Point Open (OGL) — postcodes, grid coordinates, GSS codes
- ONS Open Geography Portal (OGL) — LAD, Ward, County name-code lookups
- GeoNames GB (CC-BY) — nearest populated-place names
- License
- Open Government Licence v3.0
About this dataset
Postal Codes Dataset for United Kingdom (GB)
This dataset lists British unit postcodes across England, Scotland and Wales (Great Britain only; Code-Point Open does not cover Northern Ireland), with coordinates and administrative geography (country / district / ward, plus the county in two-tier areas of England).
Column definitions, row count, size and last-updated date are in datapackage.yaml.
Data Sources
- Postcodes, positional quality, grid coordinates and administrative codes: © Ordnance Survey Code-Point Open, Open Government Licence v3.0.
- District, ward and county names: © ONS Open Geography Portal name and code lookups, Open Government Licence v3.0.
- Place names: © GeoNames GB gazetteer, CC BY 4.0.
Required attribution: "Contains OS data © Crown copyright and database right; contains Royal Mail data © Royal Mail copyright and database right; contains National Statistics data © Crown copyright and database right; GeoNames data © GeoNames, CC BY 4.0."
Changes made to the source data: grid coordinates (British National Grid) converted to WGS84 latitude and longitude at 6 decimals; district, ward and county names joined on GSS code from the ONS lookups; place name set to the nearest GeoNames populated place; postcodes with positional quality 90 have blank coordinates and place name instead of 0,0.
Not endorsed by, or affiliated with, Ordnance Survey, Royal Mail, the Office for National Statistics or GeoNames.
Known limitations
- Great Britain only: Northern Ireland is not covered.
- Postcodes with OS positional quality 90 have no coordinate, so
latitude,longitudeandplace_nameare blank for them rather than estimated. - The county columns are populated only for two-tier areas of England; single-tier authorities (Scotland, Wales and unitary English authorities) correctly have no county value.
place_nameis the nearest GeoNames populated place to the postcode coordinate, not an official postal town.alternative_city_nameis always empty.
Usage
The dataset files are available in CSV format and can be accessed and downloaded using
the links provided in datapackage.yaml. Read postal_code as text (dtype=str): British postcodes mix letters, digits and a space (AB10 1WS).
For other inquiries, contact datahub@datopian.com