ONS coding system
The ONS coding system was a hierarchical code used in the United Kingdom for tabulating census and other statistical data. ONS refers to the Office for National Statistics.
It was replaced by the GSS coding system on 1 January 2011.
Code formulation
Principal authorities
The code was constructed top down from a four character code representing a unitary authority or two-tier county and district.
| 00EC | Middlesbrough (unitary) | 
| or | |
|---|---|
| 12 | Cambridgeshire county | 
| 12UB | Cambridge district | 
Electoral wards and output areas
Local government wards had a two-letter code within their local authority, and census output area an additional four digits within a ward.
| 12UB | Cambridge district | 
| 12UBGA | Petersfield ward | 
| 12UBGA0001 | Output area: Gwydir Street (north of junction with Hooper St) | 
The authority and ward codes were recognised by Eurostat as local administrative unit code levels 1 and 2 within the NUTS system.
Civil parishes
An overlapping system encoded civil parish areas. Parishes were represented by an additional three digits within their local authority:
| 12UD | Fenland district | 
| 12UD010 | Tydd St. Giles parish | 
List of codes for counties and districts
The codes for counties and districts were as follows.[1]
Also showing NUTS(3) codes thus: (UKH12)
Greater London
These codes became active following local government changes in 1986.
- 00AA (UKI11)City of London
- 00AB (UKI21)Barking and Dagenham
- 00AC (UKI23)Barnet
- 00AD (UKI21)Bexley
- 00AE (UKI23)Brent
- 00AF (UKI22)Bromley
- 00AG (UKI11)Camden
- 00AH (UKI22)Croydon
- 00AJ (UKI23)Ealing
- 00AK (UKI21)Enfield
- 00AL (UKI21)Greenwich
- 00AM (UKI12)Hackney
- 00AN (UKI11)Hammersmith and Fulham
- 00AP (UKI12)Haringey
- 00AQ (UKI23)Harrow
- 00AR (UKI21)Havering
- 00AS (UKI23)Hillingdon
- 00AT (UKI23)Hounslow
- 00AU (UKI12)Islington
- 00AW (UKI11)Kensington and Chelsea
- 00AX (UKI22)Kingston upon Thames
- 00AY (UKI12)Lambeth
- 00AZ (UKI12)Lewisham
- 00BA (UKI22)Merton
- 00BB (UKI12)Newham
- 00BC (UKI21)Redbridge
- 00BD (UKI23)Richmond upon Thames
- 00BE (UKI12)Southwark
- 00BF (UKI22)Sutton
- 00BG (UKI12)Tower Hamlets
- 00BH (UKI21)Waltham Forest
- 00BJ (UKI11)Wandsworth
- 00BK (UKI11)Westminster
Metropolitan counties
These codes became active following local government changes in 1986.
- Greater Manchester districts
- Merseyside districts
- South Yorkshire districts
- Tyne and Wear districts
- 00CH (UKC22)Gateshead
- 00CJ (UKC22)Newcastle-upon-Tyne
- 00CK (UKC22)North Tyneside
- 00CL (UKC22)South Tyneside
- 00CM (UKC23)Sunderland
 
- West Midlands districts
- 00CN (UKG31)Birmingham
- 00CQ (UKG33)Coventry
- 00CR (UKG34)Dudley
- 00CS (UKG34)Sandwell
- 00CT (UKG32)Solihull
- 00CU (UKG35)Walsall
- 00CW (UKG35)Wolverhampton
 
- West Yorkshire districts
- 00CX (UKE41)Bradford
- 00CY (UKE43)Calderdale
- 00CZ (UKE43)Kirklees
- 00DA (UKE42)Leeds
- 00DB (UKE43)Wakefield
 
Non-hierarchical codes for Greater London and metropolitan counties
- 1BInner London
- 1COuter London
- 2AGreater Manchester
- 2BMerseyside
- 2CSouth Yorkshire
- 2DTyne and Wear
- 2EWest Midlands
- 2FWest Yorkshire
Unitary authorities established in the 1990s
These codes became active following local government changes the 1990s.
- North East England region
- 00EB (UKC11)Hartlepool
- 00EC (UKC12)Middlesbrough
- 00EE (UKC12)Redcar and Cleveland
- 00EF (UKC11)Stockton-on-Tees
- 00EH (UKC13)Darlington
 
- North West England region
- 00ET (UKD21)Halton
- 00EU (UKD21)Warrington
- 00EX (UKD41)Blackburn with Darwen
- 00EY (UKD42)Blackpool
 
- Yorkshire and the Humber region
- 00FA (UKE11)Kingston upon Hull
- 00FB (UKE12)East Riding of Yorkshire
- 00FC (UKE13)North East Lincolnshire
- 00FD (UKE13)North Lincolnshire
- 00FF (UKE21)York
 
- East Midlands region
- 00FK (UKF11)Derby
- 00FN (UKF21)Leicester
- 00FP (UKF22)Rutland
- 00FY (UKF14)Nottingham
 
- West Midlands region
- 00GA (UKG11)Herefordshire
- 00GF (UKG21)Telford and Wrekin
- 00GL (UKG23)Stoke-on-Trent
 
- South West England region
- 00HA (UKK12)Bath and North East Somerset
- 00HB (UKK11)Bristol
- 00HC (UKK12)North Somerset
- 00HD (UKK12)South Gloucestershire
- 00HG (UKK41)Plymouth
- 00HH (UKK42)Torbay
- 00HN (UKK21)Bournemouth
- 00HP (UKK21)Poole
- 00HX (UKK14)Swindon
 
- East of England region
- 00JA (UKH11)Peterborough
- 00KA (UKH21)Luton
- 00KF (UKH31)Southend-on-Sea
- 00KG (UKH32)Thurrock
 
- South East England region
- 00LC (UKJ41)Medway
- 00MA (UKJ11)Bracknell Forest
- 00MB (UKJ11)West Berkshire
- 00MC (UKJ11)Reading
- 00MD (UKJ11)Slough
- 00ME (UKJ11)Windsor and Maidenhead
- 00MF (UKJ11)Wokingham
- 00MG (UKJ12)Milton Keynes
- 00ML (UKJ21)Brighton and Hove
- 00MR (UKJ31)Portsmouth
- 00MS (UKJ32)Southampton
- 00MW (UKJ34)Isle of Wight
 
Unitary authorities established in 2009
These codes became active following local government changes in 2009.
- 00KBBedford
- 00KCCentral Bedfordshire
- 00EQCheshire East
- 00EWCheshire West and Chester
- 00HECornwall
- 00HFIsles of Scilly
- 00EJCounty Durham
- 00EMNorthumberland
- 00GGShropshire
- 00HYWiltshire
Non-metropolitan counties
- 08Avon
- 09 (UKH22)Bedfordshire- 09UBLuton
- 09UCMid Bedfordshire
- 09UDBedford
- 09UESouth Bedfordshire
 
- 10Berkshire- 10UBBracknell Forest
- 10UCNewbury
- 10UDReading
- 10UESlough
- 10UFWindsor and Maidenhead
- 10UGWokingham
 
- 11 (UKJ13)Buckinghamshire- 11UBAylesbury Vale
- 11UCChiltern
- 11UDMilton Keynes
- 11UESouth Bucks
- 11UFWycombe
 
- 12 (UKH12)Cambridgeshire- 12UBCambridge
- 12UCEast Cambridgeshire
- 12UDFenland
- 12UEHuntingdonshire
- 12UFPeterborough
- 12UGSouth Cambridgeshire
 
- 13 (UKD22)Cheshire- 13UBChester
- 13UCCongleton
- 13UDCrewe and Nantwich
- 13UEEllesmere Port and Neston
- 13UFHalton
- 13UGMacclesfield
- 13UHVale Royal
- 13UJWarrington
 
- 14Cleveland- 14UBHartlepool
- 14UCLangbaurgh-on-Tees
- 14UDMiddlesbrough
- 14UEStockton-on-Tees
 
- 15 (UKK30)Cornwall and Scilly- 15UBCaradon
- 15UCCarrick
- 15UDKerrier
- 15UENorth Cornwall
- 15UFPenwith
- 15UGRestormel
- 15UHIsles of Scilly
 
- 16Cumbria- 16UB (UKD11)Allerdale
- 16UC (UKD11)Barrow-in-Furness
- 16UD (UKD12)Carlisle
- 16UE (UKD11)Copeland
- 16UF (UKD12)Eden
- 16UG (UKD12)South Lakeland
 
- 17Derbyshire- 17UB (UKF13)Amber Valley
- 17UC (UKF12)Bolsover
- 17UD (UKF12)Chesterfield
- 17UEDerby
- 17UF (UKF13)Derbyshire Dales
- 17UG (UKF13)Erewash
- 17UH (UKF13)High Peak
- 17UJ (UKF12)North East Derbyshire
- 17UK (UKF13)South Derbyshire
 
- 18 (UKK43)Devon- 18UBEast Devon
- 18UCExeter
- 18UDMid Devon
- 18UENorth Devon
- 19UFPlymouth
- 18UGSouth Hams
- 18UHTeignbridge
- 19UJTorbay
- 18UKTorridge
- 18ULWest Devon
 
- 19 (UKK22)Dorset- 19UBBournemouth
- 19UCChristchurch
- 19UDEast Dorset
- 19UENorth Dorset
- 19UFPoole
- 19UGPurbeck
- 19UHWest Dorset
- 19UJWeymouth and Portland
 
- 20 (UKC14)County Durham- 20UBChester-le-Street
- 20UCDarlington
- 20UDDerwentside
- 20UEDurham
- 20UFEasington
- 20UGSedgefield
- 20UHTeesdale
- 20UJWear Valley
 
- 21 (UKJ22)East Sussex
- 22 (UKH33)Essex- 22UBBasildon
- 22UCBraintree
- 22UDBrentwood
- 22UECastle Point
- 22UFChelmsford
- 22UGColchester
- 22UHEpping Forest
- 22UJHarlow
- 22UKMaldon
- 22ULRochford
- 22UMSouthend-on-Sea
- 22UNTendring
- 22UPThurrock
- 22UQUttlesford
 
- 23 (UKK13)Gloucestershire- 23UBCheltenham
- 23UCCotswold
- 23UDForest of Dean
- 23UEGloucester
- 23UFStroud
- 23UGTewkesbury
 
- 24 (UKJ33)Hampshire- 24UBBasingstoke and Deane
- 24UCEast Hampshire
- 24UDEastleigh
- 24UEFareham
- 24UFGosport
- 24UGHart
- 24UHHavant
- 24UJNew Forest
- 24UKPortsmouth
- 24ULRushmoor
- 24UMSouthampton
- 24UNTest Valley
- 24UPWinchester
 
- 25Hereford and Worcester- 25UBBromsgrove
- 25UCHereford
- 25UDLeominster
- 25UEMalvern Hills
- 25UFRedditch
- 25UGSouth Herefordshire
- 25UHWorcester
- 25UJWyre Forest
- 25UKWychavon
 
- 26 (UKH23)Hertfordshire- 26UBBroxbourne
- 26UCDacorum
- 26UDEast Hertfordshire
- 26UEHertsmere
- 26UFNorth Hertfordshire
- 26UGSt Albans
- 26UHStevenage
- 26UJThree Rivers
- 26UKWatford
- 26ULWelwyn Hatfield
 
- 27Humberside- 27UBBoothferry
- 27UCCleethorpes
- 27UDEast Yorkshire
- 27UEBeverley
- 27UFGlanford
- 27UGHolderness
- 27UHGreat Grimsby
- 27UJKingston upon Hull
- 27UKScunthorpe
 
- 28Isle of Wight county- 28UBMedina
- 28UCSouth Wight
 
- 29 (UKJ42)Kent- 29UBAshford
- 29UCCanterbury
- 29UDDartford
- 29UEDover
- 29UFGillingham
- 29UGGravesham
- 29UHMaidstone
- 29UJRochester upon Medway
- 29UKSevenoaks
- 29ULShepway
- 29UMSwale
- 29UNThanet
- 29UPTonbridge and Malling
- 29UQTunbridge Wells
 
- 30 (UKD43)Lancashire- 30UBBlackburn
- 30UCBlackpool
- 30UDBurnley
- 30UEChorley
- 30UFFylde
- 30UGHyndburn
- 30UHLancaster
- 30UJPendle
- 30UKPreston
- 30ULRibble Valley
- 30UMRossendale
- 30UNSouth Ribble
- 30UPWest Lancashire
- 30UQWyre
 
- 31 (UKF22)Leicestershire- 31UBBlaby
- 31UCCharnwood
- 31UDHarborough
- 31UEHinckley and Bosworth
- 31UFLeicester
- 31UGMelton
- 31UHNorth West Leicestershire
- 31UJOadby and Wigston
- 31UKRutland
 
- 32 (UKF30)Lincolnshire- 32UBBoston
- 32UCEast Lindsey
- 32UDLincoln
- 32UENorth Kesteven
- 32UFSouth Holland
- 32UGSouth Kesteven
- 32UHWest Lindsey
 
- 33 (UKH13)Norfolk- 33UBBreckland
- 33UCBroadland
- 33UDGreat Yarmouth
- 33UEKing's Lynn and West Norfolk
- 33UFNorth Norfolk
- 33UGNorwich
- 33UHSouth Norfolk
 
- 34 (UKF23)Northamptonshire- 34UBCorby
- 34UCDaventry
- 34UDEast Northamptonshire
- 34UEKettering
- 34UFNorthampton
- 34UGSouth Northamptonshire
- 34UHWellingborough
 
- 35 (UKC21)Northumberland- 35UBAlnwick
- 35UCBerwick-upon-Tweed
- 35UDBlyth Valley
- 35UECastle Morpeth
- 35UFTynedale
- 35UGWansbeck
 
- 36 (UKE22)North Yorkshire- 36UBCraven
- 36UCHambleton
- 36UDHarrogate
- 36UERichmondshire
- 36UFRyedale
- 36UGScarborough
- 36UHSelby
- 36UJYork
 
- 37Nottinghamshire- 37UB (UKF15)Ashfield
- 37UC (UKF15)Bassetlaw
- 37UD (UKF16)Broxtowe
- 37UE (UKF16)Gedling
- 37UF (UKF15)Mansfield
- 37UG (UKF15)Newark and Sherwood
- 37UHNottingham
- 37UJ (UKF16)Rushcliffe
 
- 38 (UKJ14)Oxfordshire- 38UBCherwell
- 38UCOxford
- 38UDSouth Oxfordshire
- 38UEVale of White Horse
- 38UFWest Oxfordshire
 
- 39 (UKG22)Shropshire- 39UBBridgnorth
- 39UCNorth Shropshire
- 39UDOswestry
- 39UEShrewsbury and Atcham
- 39UFSouth Shropshire
- 39UGThe Wrekin
 
- 40 (UKK23)Somerset- 40UBMendip
- 40UCSedgemoor
- 40UDSouth Somerset
- 40UETaunton Deane
- 40UFWest Somerset
 
- 41 (UKG24)Staffordshire- 41UBCannock Chase
- 41UCEast Staffordshire
- 41UDLichfield
- 41UENewcastle-under-Lyme
- 41UFSouth Staffordshire
- 41UGStafford
- 41UHStaffordshire Moorlands
- 41UJStoke-on-Trent
- 41UKTamworth
 
- 42 (UKH14)Suffolk- 42UBBabergh
- 42UCForest Heath
- 42UDIpswich
- 42UEMid Suffolk
- 42UFSt. Edmundsbury
- 42UGSuffolk Coastal
- 42UHWaveney
 
- 43 (UKJ23)Surrey- 43UBElmbridge
- 43UCEpsom and Ewell
- 43UDGuildford
- 43UEMole Valley
- 43UFReigate and Banstead
- 43UGRunnymede
- 43UHSpelthorne
- 43UJSurrey Heath
- 43UKTandridge
- 43ULWaverley
- 43UMWoking
 
- 44 (UKG13)Warwickshire- 44UBNorth Warwickshire
- 44UCNuneaton and Bedworth
- 44UDRugby
- 44UEStratford-on-Avon
- 44UFWarwick
 
- 45 (UKJ24)West Sussex- 45UBAdur
- 45UCArun
- 45UDChichester
- 45UECrawley
- 45UFHorsham
- 45UGMid Sussex
- 45UHWorthing
 
- 46 (UKK15)Wiltshire- 46UBKennet
- 46UCNorth Wiltshire
- 46UDSalisbury
- 46UEThamesdown
- 46UFWest Wiltshire
 
- 47 (UKG12)Worcestershire- 47UBBromsgrove
- 47UCMalvern Hills
- 47UDRedditch
- 47UEWorcester
- 47UFWychavon
- 47UGWyre Forest
 
Wales
These codes became active following local government changes in 1996.
- 00NA (UKL11)Isle of Anglesey
- 00NC (UKL12)Gwynedd
- 00NE (UKL13)Conwy
- 00NG (UKL13)Denbighshire
- 00NJ (UKL23)Flintshire
- 00NL (UKL23)Wrexham
- 00NN (UKL24)Powys
- 00NQ (UKL14)Ceredigion
- 00NS (UKL14)Pembrokeshire
- 00NU (UKL14)Carmarthenshire
- 00NX (UKL18)Swansea
- 00NZ (UKL17)Neath Port Talbot
- 00PB (UKL17)Bridgend
- 00PD (UKL22)Vale of Glamorgan
- 00PF (UKL15)Rhondda Cynon Taff
- 00PH (UKL15)Merthyr Tydfil
- 00PK (UKL16)Caerphilly
- 00PL (UKL16)Blaenau Gwent
- 00PM (UKL16)Torfaen
- 00PP (UKL21)Monmouthshire
- 00PR (UKL21)Newport
- 00PT (UKL22)Cardiff
Scotland
These codes became active following local government changes in 1996.
- 00QA (UKM10)Aberdeen
- 00QB (UKM10)Aberdeenshire
- 00QC (UKM21)Angus
- 00QD (UKM31/43)Argyll and Bute
- 00QE (UKM24)Scottish Borders
- 00QF (UKM22)Clackmannanshire
- 00QG (UKM31)West Dunbartonshire
- 00QH (UKM32)Dumfries and Galloway
- 00QJ (UKM21)Dundee
- 00QK (UKM33)East Ayrshire
- 00QL (UKM31)East Dunbartonshire
- 00QM (UKM23)East Lothian
- 00QN (UKM35)East Renfrewshire
- 00QP (UKM25)Edinburgh
- 00QQ (UKM26)Falkirk
- 00QR (UKM22)Fife
- 00QS (UKM34)Glasgow
- 00QT (UKM41/42/43)Highland
- 00QU (UKM35)Inverclyde
- 00QW (UKM23)Midlothian
- 00QX (UKM10/42)Moray
- 00QY (UKM33/43)North Ayrshire
- 00QZ (UKM36)North Lanarkshire
- 00RA (UKM45)Orkney Islands
- 00RB (UKM27)Perth and Kinross
- 00RC (UKM35)Renfrewshire
- 00RD (UKM46)Shetland Islands
- 00RE (UKM37)South Ayrshire
- 00RF (UKM38)South Lanarkshire
- 00RG (UKM27)Stirling
- 00RH (UKM28)West Lothian
- 00RJ (UKM44)Eilean Siar (Western Isles)
Northern Ireland
- 95A (UKN04)Derry
- 95B (UKN04)Limavady
- 95C (UKN04)Coleraine
- 95D (UKN04)Ballymoney
- 95E (UKN04)Moyle
- 95F (UKN03)Larne
- 95G (UKN03)Ballymena
- 95H (UKN05)Magherafelt
- 95I (UKN05)Cookstown
- 95J (UKN04)Strabane
- 95K (UKN05)Omagh
- 95L (UKN05)Fermanagh
- 95M (UKN05)Dungannon and South Tyrone
- 95N (UKN03)Craigavon
- 95O (UKN05)Armagh
- 95P (UKN05)Newry and Mourne
- 95Q (UKN03)Banbridge
- 95R (UKN03)Down
- 95S (UKN02)Lisburn
- 95T (UKN03)Antrim
- 95U (UKN02)Newtownabbey
- 95V (UKN02)Carrickfergus
- 95W (UKN02)North Down
- 95X (UKN03)Ards
- 95Y (UKN02)Castlereagh
- 95Z (UKN01)Belfast
References
- ^ "District Names and Codes for England and Wales as at 31/12/1994". statistics.gov.uk. Archived from the original on 4 June 2011. Retrieved 4 November 2023.