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.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 |
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:List of codes for counties and districts
The codes for counties and districts were as follows.Also showing NUTS(3) codes thus:
Greater London
These codes became active following local government changes in 1986.00AA City of London00AB Barking and Dagenham00AC Barnet00AD Bexley00AE Brent00AF Bromley00AG Camden00AH Croydon00AJ Ealing00AK Enfield00AL Greenwich00AM Hackney00AN Hammersmith and Fulham00AP Haringey00AQ Harrow00AR Havering00AS Hillingdon00AT Hounslow00AU Islington00AW Kensington and Chelsea00AX Kingston upon Thames00AY Lambeth00AZ Lewisham00BA Merton00BB Newham00BC Redbridge00BD Richmond upon Thames00BE Southwark00BF Sutton00BG Tower Hamlets00BH Waltham Forest00BJ Wandsworth00BK WestminsterMetropolitan counties
These codes became active following local government changes in 1986.- Greater Manchester districts
- *
00BLBolton - *
00BMBury - *
00BNManchester - *
00BPOldham - *
00BQRochdale - *
00BRSalford - *
00BSStockport - *
00BTTameside - *
00BUTrafford - *
00BWWigan - Merseyside districts
- *
00BXKnowsley - *
00BYLiverpool - *
00BZSt Helens - *
00CASefton - *
00CBWirral - South Yorkshire districts
- *
00CCBarnsley - *
00CEDoncaster - *
00CFRotherham - *
00CGSheffield - Tyne and Wear districts
- *
00CHGateshead - *
00CJNewcastle-upon-Tyne - *
00CKNorth Tyneside - *
00CLSouth Tyneside - *
00CMSunderland - West Midlands districts
- *
00CNBirmingham - *
00CQCoventry - *
00CRDudley - *
00CSSandwell - *
00CTSolihull - *
00CUWalsall - *
00CWWolverhampton - West Yorkshire districts
- *
00CXBradford - *
00CYCalderdale - *
00CZKirklees - *
00DALeeds - *
00DBWakefield
Non-hierarchical codes for Greater London and metropolitan counties
1B Inner London1C Outer London2A Greater Manchester2B Merseyside2C South Yorkshire2D Tyne and Wear2E West Midlands2F West YorkshireUnitary authorities established in the 1990s
These codes became active following local government changes the 1990s.- North East England region
- *
00EBHartlepool - *
00ECMiddlesbrough - *
00EERedcar and Cleveland - *
00EFStockton-on-Tees - *
00EHDarlington - North West England region
- *
00ETHalton - *
00EUWarrington - *
00EXBlackburn with Darwen - *
00EYBlackpool - Yorkshire and the Humber region
- *
00FAKingston upon Hull - *
00FBEast Riding of Yorkshire - *
00FCNorth East Lincolnshire - *
00FDNorth Lincolnshire - *
00FFYork - East Midlands region
- *
00FKDerby - *
00FNLeicester - *
00FPRutland - *
00FYNottingham - West Midlands region
- *
00GAHerefordshire - *
00GFTelford and Wrekin - *
00GLStoke-on-Trent - South West England region
- *
00HABath and North East Somerset - *
00HBBristol - *
00HCNorth Somerset - *
00HDSouth Gloucestershire - *
00HGPlymouth - *
00HHTorbay - *
00HNBournemouth - *
00HPPoole - *
00HXSwindon - East of England region
- *
00JAPeterborough - *
00KALuton - *
00KFSouthend-on-Sea - *
00KGThurrock - South East England region
- *
00LCMedway - *
00MABracknell Forest - *
00MBWest Berkshire - *
00MCReading - *
00MDSlough - *
00MEWindsor and Maidenhead - *
00MFWokingham - *
00MGMilton Keynes - *
00MLBrighton and Hove - *
00MRPortsmouth - *
00MSSouthampton - *
00MWIsle of Wight
Unitary authorities established in 2009
These codes became active following local government changes in 2009.00KB Bedford00KC Central Bedfordshire00EQ Cheshire East00EW Cheshire West and Chester00HE Cornwall00HF Isles of Scilly00EJ County Durham00EM Northumberland00GG Shropshire00HY WiltshireNon-metropolitan counties
08 Avon- *
08UBBath - *
08UCBristol - *
08UDKingswood - *
08UENorthavon - *
08UFWansdyke - *
08UGWoodspring09Bedfordshire - *
09UBLuton - *
09UCMid Bedfordshire - *
09UDBedford - *
09UESouth Bedfordshire10Berkshire - *
10UBBracknell Forest - *
10UCNewbury - *
10UDReading - *
10UESlough - *
10UFWindsor and Maidenhead - *
10UGWokingham11Buckinghamshire - *
11UBAylesbury Vale - *
11UCChiltern - *
11UDMilton Keynes - *
11UESouth Bucks - *
11UFWycombe12Cambridgeshire - *
12UBCambridge - *
12UCEast Cambridgeshire - *
12UDFenland - *
12UEHuntingdonshire - *
12UFPeterborough - *
12UGSouth Cambridgeshire13Cheshire - *
13UBChester - *
13UCCongleton - *
13UDCrewe and Nantwich - *
13UEEllesmere Port and Neston - *
13UFHalton - *
13UGMacclesfield - *
13UHVale Royal - *
13UJWarrington14Cleveland - *
14UBHartlepool - *
14UCLangbaurgh-on-Tees - *
14UDMiddlesbrough - *
14UEStockton-on-Tees15Cornwall and Scilly - *
15UBCaradon - *
15UCCarrick - *
15UDKerrier - *
15UENorth Cornwall - *
15UFPenwith - *
15UGRestormel - *
15UHIsles of Scilly16Cumbria - *
16UBAllerdale - *
16UCBarrow-in-Furness - *
16UDCarlisle - *
16UECopeland - *
16UFEden - *
16UGSouth Lakeland17Derbyshire - *
17UBAmber Valley - *
17UCBolsover - *
17UDChesterfield - *
17UEDerby - *
17UFDerbyshire Dales - *
17UGErewash - *
17UHHigh Peak - *
17UJNorth East Derbyshire - *
17UKSouth Derbyshire18Devon - *
18UBEast Devon - *
18UCExeter - *
18UDMid Devon - *
18UENorth Devon - *
19UFPlymouth - *
18UGSouth Hams - *
18UHTeignbridge - *
19UJTorbay - *
18UKTorridge - *
18ULWest Devon19Dorset - *
19UBBournemouth - *
19UCChristchurch - *
19UDEast Dorset - *
19UENorth Dorset - *
19UFPoole - *
19UGPurbeck - *
19UHWest Dorset - *
19UJWeymouth and Portland20County Durham - *
20UBChester-le-Street - *
20UCDarlington - *
20UDDerwentside - *
20UEDurham - *
20UFEasington - *
20UGSedgefield - *
20UHTeesdale - *
20UJWear Valley21East Sussex - *
21UBBrighton - *
21UCEastbourne - *
21UDHastings - *
21UEHove - *
21UFLewes - *
21UGRother - *
21UHWealden22Essex - *
22UBBasildon - *
22UCBraintree - *
22UDBrentwood - *
22UECastle Point - *
22UFChelmsford - *
22UGColchester - *
22UHEpping Forest - *
22UJHarlow - *
22UKMaldon - *
22ULRochford - *
22UMSouthend-on-Sea - *
22UNTendring - *
22UPThurrock - *
22UQUttlesford23Gloucestershire - *
23UBCheltenham - *
23UCCotswold - *
23UDForest of Dean - *
23UEGloucester - *
23UFStroud - *
23UGTewkesbury24Hampshire - *
24UBBasingstoke and Deane - *
24UCEast Hampshire - *
24UDEastleigh - *
24UEFareham - *
24UFGosport - *
24UGHart - *
24UHHavant - *
24UJNew Forest - *
24UKPortsmouth - *
24ULRushmoor - *
24UMSouthampton - *
24UNTest Valley - *
24UPWinchester25Hereford and Worcester - *
25UBBromsgrove - *
25UCHereford - *
25UDLeominster - *
25UEMalvern Hills - *
25UFRedditch - *
25UGSouth Herefordshire - *
25UHWorcester - *
25UJWyre Forest - *
25UKWychavon26Hertfordshire - *
26UBBroxbourne - *
26UCDacorum - *
26UDEast Hertfordshire - *
26UEHertsmere - *
26UFNorth Hertfordshire - *
26UGSt Albans - *
26UHStevenage - *
26UJThree Rivers - *
26UKWatford - *
26ULWelwyn Hatfield27Humberside - *
27UBBoothferry - *
27UCCleethorpes - *
27UDEast Yorkshire - *
27UEBeverley - *
27UFGlanford - *
27UGHolderness - *
27UHGreat Grimsby - *
27UJKingston upon Hull - *
27UKScunthorpe28Isle of Wight county - *
28UBMedina - *
28UCSouth Wight29Kent - *
29UBAshford - *
29UCCanterbury - *
29UDDartford - *
29UEDover - *
29UFGillingham - *
29UGGravesham - *
29UHMaidstone - *
29UJRochester upon Medway - *
29UKSevenoaks - *
29ULShepway - *
29UMSwale - *
29UNThanet - *
29UPTonbridge and Malling - *
29UQTunbridge Wells30Lancashire - *
30UBBlackburn - *
30UCBlackpool - *
30UDBurnley - *
30UEChorley - *
30UFFylde - *
30UGHyndburn - *
30UHLancaster - *
30UJPendle - *
30UKPreston - *
30ULRibble Valley - *
30UMRossendale - *
30UNSouth Ribble - *
30UPWest Lancashire - *
30UQWyre31Leicestershire - *
31UBBlaby - *
31UCCharnwood - *
31UDHarborough - *
31UEHinckley and Bosworth - *
31UFLeicester - *
31UGMelton - *
31UHNorth West Leicestershire - *
31UJOadby and Wigston - *
31UKRutland32Lincolnshire - *
32UBBoston - *
32UCEast Lindsey - *
32UDLincoln - *
32UENorth Kesteven - *
32UFSouth Holland - *
32UGSouth Kesteven - *
32UHWest Lindsey33Norfolk - *
33UBBreckland - *
33UCBroadland - *
33UDGreat Yarmouth - *
33UEKing's Lynn and West Norfolk - *
33UFNorth Norfolk - *
33UGNorwich - *
33UHSouth Norfolk34Northamptonshire - *
34UBCorby - *
34UCDaventry - *
34UDEast Northamptonshire - *
34UEKettering - *
34UFNorthampton - *
34UGSouth Northamptonshire - *
34UHWellingborough35Northumberland - *
35UBAlnwick - *
35UCBerwick-upon-Tweed - *
35UDBlyth Valley - *
35UECastle Morpeth - *
35UFTynedale - *
35UGWansbeck36North Yorkshire - *
36UBCraven - *
36UCHambleton - *
36UDHarrogate - *
36UERichmondshire - *
36UFRyedale - *
36UGScarborough - *
36UHSelby - *
36UJYork37Nottinghamshire - *
37UBAshfield - *
37UCBassetlaw - *
37UDBroxtowe - *
37UEGedling - *
37UFMansfield - *
37UGNewark and Sherwood - *
37UHNottingham - *
37UJRushcliffe38Oxfordshire - *
38UBCherwell - *
38UCOxford - *
38UDSouth Oxfordshire - *
38UEVale of White Horse - *
38UFWest Oxfordshire39Shropshire - *
39UBBridgnorth - *
39UCNorth Shropshire - *
39UDOswestry - *
39UEShrewsbury and Atcham - *
39UFSouth Shropshire - *
39UGThe Wrekin40Somerset - *
40UBMendip - *
40UCSedgemoor - *
40UDSouth Somerset - *
40UETaunton Deane - *
40UFWest Somerset41Staffordshire - *
41UBCannock Chase - *
41UCEast Staffordshire - *
41UDLichfield - *
41UENewcastle-under-Lyme - *
41UFSouth Staffordshire - *
41UGStafford - *
41UHStaffordshire Moorlands - *
41UJStoke-on-Trent - *
41UKTamworth42Suffolk - *
42UBBabergh - *
42UCForest Heath - *
42UDIpswich - *
42UEMid Suffolk - *
42UFSt. Edmundsbury - *
42UGSuffolk Coastal - *
42UHWaveney43Surrey - *
43UBElmbridge - *
43UCEpsom and Ewell - *
43UDGuildford - *
43UEMole Valley - *
43UFReigate and Banstead - *
43UGRunnymede - *
43UHSpelthorne - *
43UJSurrey Heath - *
43UKTandridge - *
43ULWaverley - *
43UMWoking44Warwickshire - *
44UBNorth Warwickshire - *
44UCNuneaton and Bedworth - *
44UDRugby - *
44UEStratford-on-Avon - *
44UFWarwick45West Sussex - *
45UBAdur - *
45UCArun - *
45UDChichester - *
45UECrawley - *
45UFHorsham - *
45UGMid Sussex - *
45UHWorthing46Wiltshire - *
46UBKennet - *
46UCNorth Wiltshire - *
46UDSalisbury - *
46UEThamesdown - *
46UFWest Wiltshire47Worcestershire - *
47UBBromsgrove - *
47UCMalvern Hills - *
47UDRedditch - *
47UEWorcester - *
47UFWychavon - *
47UGWyre Forest
Wales
These codes became active following local government changes in 1996.00NA Isle of Anglesey00NC Gwynedd00NE Conwy00NG Denbighshire00NJ Flintshire00NL Wrexham00NN Powys00NQ Ceredigion00NS Pembrokeshire00NU Carmarthenshire00NX Swansea00NZ Neath Port Talbot00PB Bridgend00PD Vale of Glamorgan00PF Rhondda Cynon Taff00PH Merthyr Tydfil00PK Caerphilly00PL Blaenau Gwent00PM Torfaen00PP Monmouthshire00PR Newport00PT CardiffScotland
These codes became active following local government changes in 1996.00QA Aberdeen00QB Aberdeenshire00QC Angus00QD Argyll and Bute00QE Scottish Borders00QF Clackmannanshire00QG West Dunbartonshire00QH Dumfries and Galloway00QJ Dundee00QK East Ayrshire00QL East Dunbartonshire00QM East Lothian00QN East Renfrewshire00QP Edinburgh00QQ Falkirk00QR Fife00QS Glasgow00QT Highland00QU Inverclyde00QW Midlothian00QX Moray00QY North Ayrshire00QZ North Lanarkshire00RA Orkney Islands00RB Perth and Kinross00RC Renfrewshire00RD Shetland Islands00RE South Ayrshire00RF South Lanarkshire00RG Stirling00RH West Lothian00RJ Eilean SiarNorthern Ireland
95A Derry95B Limavady95C Coleraine95D Ballymoney95E Moyle95F Larne95G Ballymena95H Magherafelt95I Cookstown95J Strabane95K Omagh95L Fermanagh95M Dungannon and South Tyrone95N Craigavon95O Armagh95P Newry and Mourne95Q Banbridge95R Down95S Lisburn95T Antrim95U Newtownabbey95V Carrickfergus95W North Down95X Ards95Y Castlereagh95Z Belfast