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.
00ECMiddlesbrough (unitary)or12Cambridgeshire county12UBCambridge 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.
12UBCambridge district12UBGAPetersfield ward12UBGA0001Output 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:
12UDFenland district12UD010Tydd St. Giles parish
List of codes for counties and districts The codes for counties and districts were as follows.
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 00BL (UKD32) Bolton 00BM (UKD32) Bury 00BN (UKD31) Manchester 00BP (UKD32) Oldham 00BQ (UKD32) Rochdale 00BR (UKD31) Salford 00BS (UKD31) Stockport 00BT (UKD31) Tameside 00BU (UKD31) Trafford 00BW (UKD32) Wigan Merseyside districts 00BX (UKD51) Knowsley 00BY (UKD52) Liverpool 00BZ (UKD51) St Helens 00CA (UKD53) Sefton 00CB (UKD54) Wirral South Yorkshire districts 00CC (UKE31) Barnsley 00CE (UKE31) Doncaster 00CF (UKE31) Rotherham 00CG (UKE32) Sheffield 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 1B Inner London 1C Outer London 2A Greater Manchester 2B Merseyside 2C South Yorkshire 2D Tyne and Wear 2E West Midlands 2F West 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. 00KB Bedford 00KC Central Bedfordshire 00EQ Cheshire East 00EW Cheshire West and Chester 00HE Cornwall 00HF Isles of Scilly 00EJ County Durham 00EM Northumberland 00GG Shropshire 00HY Wiltshire
Non-metropolitan counties 08 Avon 08UB Bath 08UC Bristol 08UD Kingswood 08UE Northavon 08UF Wansdyke 08UG Woodspring 09 (UKH22) Bedfordshire 09UB Luton 09UC Mid Bedfordshire 09UD Bedford 09UE South Bedfordshire 10 Berkshire 10UB Bracknell Forest 10UC Newbury 10UD Reading 10UE Slough 10UF Windsor and Maidenhead 10UG Wokingham 11 (UKJ13) Buckinghamshire 11UB Aylesbury Vale 11UC Chiltern 11UD Milton Keynes 11UE South Bucks 11UF Wycombe 12 (UKH12) Cambridgeshire 12UB Cambridge 12UC East Cambridgeshire 12UD Fenland 12UE Huntingdonshire 12UF Peterborough 12UG South Cambridgeshire 13 (UKD22) Cheshire 13UB Chester 13UC Congleton 13UD Crewe and Nantwich 13UE Ellesmere Port and Neston 13UF Halton 13UG Macclesfield 13UH Vale Royal 13UJ Warrington 14 Cleveland 14UB Hartlepool 14UC Langbaurgh-on-Tees 14UD Middlesbrough 14UE Stockton-on-Tees 15 (UKK30) Cornwall and Scilly 15UB Caradon 15UC Carrick 15UD Kerrier 15UE North Cornwall 15UF Penwith 15UG Restormel 15UH Isles of Scilly 16 Cumbria 16UB (UKD11) Allerdale 16UC (UKD11) Barrow-in-Furness 16UD (UKD12) Carlisle 16UE (UKD11) Copeland 16UF (UKD12) Eden 16UG (UKD12) South Lakeland 17 Derbyshire 17UB (UKF13) Amber Valley 17UC (UKF12) Bolsover 17UD (UKF12) Chesterfield 17UE Derby 17UF (UKF13) Derbyshire Dales 17UG (UKF13) Erewash 17UH (UKF13) High Peak 17UJ (UKF12) North East Derbyshire 17UK (UKF13) South Derbyshire 18 (UKK43) Devon 18UB East Devon 18UC Exeter 18UD Mid Devon 18UE North Devon 19UF Plymouth 18UG South Hams 18UH Teignbridge 19UJ Torbay 18UK Torridge 18UL West Devon 19 (UKK22) Dorset 19UB Bournemouth 19UC Christchurch 19UD East Dorset 19UE North Dorset 19UF Poole 19UG Purbeck 19UH West Dorset 19UJ Weymouth and Portland 20 (UKC14) County Durham 20UB Chester-le-Street 20UC Darlington 20UD Derwentside 20UE Durham 20UF Easington 20UG Sedgefield 20UH Teesdale 20UJ Wear Valley 21 (UKJ22) East Sussex 21UB Brighton 21UC Eastbourne 21UD Hastings 21UE Hove 21UF Lewes 21UG Rother 21UH Wealden 22 (UKH33) Essex 22UB Basildon 22UC Braintree 22UD Brentwood 22UE Castle Point 22UF Chelmsford 22UG Colchester 22UH Epping Forest 22UJ Harlow 22UK Maldon 22UL Rochford 22UM Southend-on-Sea 22UN Tendring 22UP Thurrock 22UQ Uttlesford 23 (UKK13) Gloucestershire 23UB Cheltenham 23UC Cotswold 23UD Forest of Dean 23UE Gloucester 23UF Stroud 23UG Tewkesbury 24 (UKJ33) Hampshire 24UB Basingstoke and Deane 24UC East Hampshire 24UD Eastleigh 24UE Fareham 24UF Gosport 24UG Hart 24UH Havant 24UJ New Forest 24UK Portsmouth 24UL Rushmoor 24UM Southampton 24UN Test Valley 24UP Winchester 25 Hereford and Worcester 25UB Bromsgrove 25UC Hereford 25UD Leominster 25UE Malvern Hills 25UF Redditch 25UG South Herefordshire 25UH Worcester 25UJ Wyre Forest 25UK Wychavon 26 (UKH23) Hertfordshire 26UB Broxbourne 26UC Dacorum 26UD East Hertfordshire 26UE Hertsmere 26UF North Hertfordshire 26UG St Albans 26UH Stevenage 26UJ Three Rivers 26UK Watford 26UL Welwyn Hatfield 27 Humberside 27UB Boothferry 27UC Cleethorpes 27UD East Yorkshire 27UE Beverley 27UF Glanford 27UG Holderness 27UH Great Grimsby 27UJ Kingston upon Hull 27UK Scunthorpe 28 Isle of Wight county 28UB Medina 28UC South Wight 29 (UKJ42) Kent 29UB Ashford 29UC Canterbury 29UD Dartford 29UE Dover 29UF Gillingham 29UG Gravesham 29UH Maidstone 29UJ Rochester upon Medway 29UK Sevenoaks 29UL Shepway 29UM Swale 29UN Thanet 29UP Tonbridge and Malling 29UQ Tunbridge Wells 30 (UKD43) Lancashire 30UB Blackburn 30UC Blackpool 30UD Burnley 30UE Chorley 30UF Fylde 30UG Hyndburn 30UH Lancaster 30UJ Pendle 30UK Preston 30UL Ribble Valley 30UM Rossendale 30UN South Ribble 30UP West Lancashire 30UQ Wyre 31 (UKF22) Leicestershire 31UB Blaby 31UC Charnwood 31UD Harborough 31UE Hinckley and Bosworth 31UF Leicester 31UG Melton 31UH North West Leicestershire 31UJ Oadby and Wigston 31UK Rutland 32 (UKF30) Lincolnshire 32UB Boston 32UC East Lindsey 32UD Lincoln 32UE North Kesteven 32UF South Holland 32UG South Kesteven 32UH West Lindsey 33 (UKH13) Norfolk 33UB Breckland 33UC Broadland 33UD Great Yarmouth 33UE King's Lynn and West Norfolk 33UF North Norfolk 33UG Norwich 33UH South Norfolk 34 (UKF23) Northamptonshire 34UB Corby 34UC Daventry 34UD East Northamptonshire 34UE Kettering 34UF Northampton 34UG South Northamptonshire 34UH Wellingborough 35 (UKC21) Northumberland 35UB Alnwick 35UC Berwick-upon-Tweed 35UD Blyth Valley 35UE Castle Morpeth 35UF Tynedale 35UG Wansbeck 36 (UKE22) North Yorkshire 36UB Craven 36UC Hambleton 36UD Harrogate 36UE Richmondshire 36UF Ryedale 36UG Scarborough 36UH Selby 36UJ York 37 Nottinghamshire 37UB (UKF15) Ashfield 37UC (UKF15) Bassetlaw 37UD (UKF16) Broxtowe 37UE (UKF16) Gedling 37UF (UKF15) Mansfield 37UG (UKF15) Newark and Sherwood 37UH Nottingham 37UJ (UKF16) Rushcliffe 38 (UKJ14) Oxfordshire 38UB Cherwell 38UC Oxford 38UD South Oxfordshire 38UE Vale of White Horse 38UF West Oxfordshire 39 (UKG22) Shropshire 39UB Bridgnorth 39UC North Shropshire 39UD Oswestry 39UE Shrewsbury and Atcham 39UF South Shropshire 39UG The Wrekin 40 (UKK23) Somerset 40UB Mendip 40UC Sedgemoor 40UD South Somerset 40UE Taunton Deane 40UF West Somerset 41 (UKG24) Staffordshire 41UB Cannock Chase 41UC East Staffordshire 41UD Lichfield 41UE Newcastle-under-Lyme 41UF South Staffordshire 41UG Stafford 41UH Staffordshire Moorlands 41UJ Stoke-on-Trent 41UK Tamworth 42 (UKH14) Suffolk 42UB Babergh 42UC Forest Heath 42UD Ipswich 42UE Mid Suffolk 42UF St. Edmundsbury 42UG Suffolk Coastal 42UH Waveney