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.

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.

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.
 * City of London
 * Barking and Dagenham
 * Barnet
 * Bexley
 * Brent
 * Bromley
 * Camden
 * Croydon
 * Ealing
 * Enfield
 * Greenwich
 * Hackney
 * Hammersmith and Fulham
 * Haringey
 * Harrow
 * Havering
 * Hillingdon
 * Hounslow
 * Islington
 * Kensington and Chelsea
 * Kingston upon Thames
 * Lambeth
 * Lewisham
 * Merton
 * Newham
 * Redbridge
 * Richmond upon Thames
 * Southwark
 * Sutton
 * Tower Hamlets
 * Waltham Forest
 * Wandsworth
 * Westminster

Metropolitan counties
These codes became active following local government changes in 1986.
 * Greater Manchester districts
 * Bolton
 * Bury
 * Manchester
 * Oldham
 * Rochdale
 * Salford
 * Stockport
 * Tameside
 * Trafford
 * Wigan
 * Merseyside districts
 * Knowsley
 * Liverpool
 * St Helens
 * Sefton
 * Wirral
 * South Yorkshire districts
 * Barnsley
 * Doncaster
 * Rotherham
 * Sheffield
 * Tyne and Wear districts
 * Gateshead
 * Newcastle-upon-Tyne
 * North Tyneside
 * South Tyneside
 * Sunderland
 * West Midlands districts
 * Birmingham
 * Coventry
 * Dudley
 * Sandwell
 * Solihull
 * Walsall
 * Wolverhampton
 * West Yorkshire districts
 * Bradford
 * Calderdale
 * Kirklees
 * Leeds
 * Wakefield

Non-hierarchical codes for Greater London and metropolitan counties

 * Inner London
 * Outer London
 * Greater Manchester
 * Merseyside
 * South Yorkshire
 * Tyne and Wear
 * West Midlands
 * West Yorkshire

Unitary authorities established in the 1990s
These codes became active following local government changes the 1990s.
 * North East England region
 * Hartlepool
 * Middlesbrough
 * Redcar and Cleveland
 * Stockton-on-Tees
 * Darlington
 * North West England region
 * Halton
 * Warrington
 * Blackburn with Darwen
 * Blackpool
 * Yorkshire and the Humber region
 * Kingston upon Hull
 * East Riding of Yorkshire
 * North East Lincolnshire
 * North Lincolnshire
 * York
 * East Midlands region
 * Derby
 * Leicester
 * Rutland
 * Nottingham
 * West Midlands region
 * Herefordshire
 * Telford and Wrekin
 * Stoke-on-Trent
 * South West England region
 * Bath and North East Somerset
 * Bristol
 * North Somerset
 * South Gloucestershire
 * Plymouth
 * Torbay
 * Bournemouth
 * Poole
 * Swindon
 * East of England region
 * Peterborough
 * Luton
 * Southend-on-Sea
 * Thurrock
 * South East England region
 * Medway
 * Bracknell Forest
 * West Berkshire
 * Reading
 * Slough
 * Windsor and Maidenhead
 * Wokingham
 * Milton Keynes
 * Brighton and Hove
 * Portsmouth
 * Southampton
 * Isle of Wight

Unitary authorities established in 2009
These codes became active following local government changes in 2009.
 * Bedford
 * Central Bedfordshire
 * Cheshire East
 * Cheshire West and Chester
 * Cornwall
 * Isles of Scilly
 * County Durham
 * Northumberland
 * Shropshire
 * Wiltshire

Non-metropolitan counties

 * Avon
 * Bath
 * Bristol
 * Kingswood
 * Northavon
 * Wansdyke
 * Woodspring
 * Bedfordshire
 * Luton
 * Mid Bedfordshire
 * Bedford
 * South Bedfordshire
 * Berkshire
 * Bracknell Forest
 * Newbury
 * Reading
 * Slough
 * Windsor and Maidenhead
 * Wokingham
 * Buckinghamshire
 * Aylesbury Vale
 * Chiltern
 * Milton Keynes
 * South Bucks
 * Wycombe
 * Cambridgeshire
 * Cambridge
 * East Cambridgeshire
 * Fenland
 * Huntingdonshire
 * Peterborough
 * South Cambridgeshire
 * Cheshire
 * Chester
 * Congleton
 * Crewe and Nantwich
 * Ellesmere Port and Neston
 * Halton
 * Macclesfield
 * Vale Royal
 * Warrington
 * Cleveland
 * Hartlepool
 * Langbaurgh-on-Tees
 * Middlesbrough
 * Stockton-on-Tees
 * Cornwall and Scilly
 * Caradon
 * Carrick
 * Kerrier
 * North Cornwall
 * Penwith
 * Restormel
 * Isles of Scilly
 * Cumbria
 * Allerdale
 * Barrow-in-Furness
 * Carlisle
 * Copeland
 * Eden
 * South Lakeland
 * Derbyshire
 * Amber Valley
 * Bolsover
 * Chesterfield
 * Derby
 * Derbyshire Dales
 * Erewash
 * High Peak
 * North East Derbyshire
 * South Derbyshire
 * Devon
 * East Devon
 * Exeter
 * Mid Devon
 * North Devon
 * Plymouth
 * South Hams
 * Teignbridge
 * Torbay
 * Torridge
 * West Devon
 * Dorset
 * Bournemouth
 * Christchurch
 * East Dorset
 * North Dorset
 * Poole
 * Purbeck
 * West Dorset
 * Weymouth and Portland
 * County Durham
 * Chester-le-Street
 * Darlington
 * Derwentside
 * Durham
 * Easington
 * Sedgefield
 * Teesdale
 * Wear Valley
 * East Sussex
 * Brighton
 * Eastbourne
 * Hastings
 * Hove
 * Lewes
 * Rother
 * Wealden
 * Essex
 * Basildon
 * Braintree
 * Brentwood
 * Castle Point
 * Chelmsford
 * Colchester
 * Epping Forest
 * Harlow
 * Maldon
 * Rochford
 * Southend-on-Sea
 * Tendring
 * Thurrock
 * Uttlesford
 * Gloucestershire
 * Cheltenham
 * Cotswold
 * Forest of Dean
 * Gloucester
 * Stroud
 * Tewkesbury
 * Hampshire
 * Basingstoke and Deane
 * East Hampshire
 * Eastleigh
 * Fareham
 * Gosport
 * Hart
 * Havant
 * New Forest
 * Portsmouth
 * Rushmoor
 * Southampton
 * Test Valley
 * Winchester
 * Hereford and Worcester
 * Bromsgrove
 * Hereford
 * Leominster
 * Malvern Hills
 * Redditch
 * South Herefordshire
 * Worcester
 * Wyre Forest
 * Wychavon
 * Hertfordshire
 * Broxbourne
 * Dacorum
 * East Hertfordshire
 * Hertsmere
 * North Hertfordshire
 * St Albans
 * Stevenage
 * Three Rivers
 * Watford
 * Welwyn Hatfield
 * Humberside
 * Boothferry
 * Cleethorpes
 * East Yorkshire
 * Beverley
 * Glanford
 * Holderness
 * Great Grimsby
 * Kingston upon Hull
 * Scunthorpe
 * Isle of Wight county
 * Medina
 * South Wight
 * Kent
 * Ashford
 * Canterbury
 * Dartford
 * Dover
 * Gillingham
 * Gravesham
 * Maidstone
 * Rochester upon Medway
 * Sevenoaks
 * Shepway
 * Swale
 * Thanet
 * Tonbridge and Malling
 * Tunbridge Wells
 * Lancashire
 * Blackburn
 * Blackpool
 * Burnley
 * Chorley
 * Fylde
 * Hyndburn
 * Lancaster
 * Pendle
 * Preston
 * Ribble Valley
 * Rossendale
 * South Ribble
 * West Lancashire
 * Wyre
 * Leicestershire
 * Blaby
 * Charnwood
 * Harborough
 * Hinckley and Bosworth
 * Leicester
 * Melton
 * North West Leicestershire
 * Oadby and Wigston
 * Rutland
 * Lincolnshire
 * Boston
 * East Lindsey
 * Lincoln
 * North Kesteven
 * South Holland
 * South Kesteven
 * West Lindsey
 * Norfolk
 * Breckland
 * Broadland
 * Great Yarmouth
 * King's Lynn and West Norfolk
 * North Norfolk
 * Norwich
 * South Norfolk
 * Northamptonshire
 * Corby
 * Daventry
 * East Northamptonshire
 * Kettering
 * Northampton
 * South Northamptonshire
 * Wellingborough
 * Northumberland
 * Alnwick
 * Berwick-upon-Tweed
 * Blyth Valley
 * Castle Morpeth
 * Tynedale
 * Wansbeck
 * North Yorkshire
 * Craven
 * Hambleton
 * Harrogate
 * Richmondshire
 * Ryedale
 * Scarborough
 * Selby
 * York
 * Nottinghamshire
 * Ashfield
 * Bassetlaw
 * Broxtowe
 * Gedling
 * Mansfield
 * Newark and Sherwood
 * Nottingham
 * Rushcliffe
 * Oxfordshire
 * Cherwell
 * Oxford
 * South Oxfordshire
 * Vale of White Horse
 * West Oxfordshire
 * Shropshire
 * Bridgnorth
 * North Shropshire
 * Oswestry
 * Shrewsbury and Atcham
 * South Shropshire
 * The Wrekin
 * Somerset
 * Mendip
 * Sedgemoor
 * South Somerset
 * Taunton Deane
 * West Somerset
 * Staffordshire
 * Cannock Chase
 * East Staffordshire
 * Lichfield
 * Newcastle-under-Lyme
 * South Staffordshire
 * Stafford
 * Staffordshire Moorlands
 * Stoke-on-Trent
 * Tamworth
 * Suffolk
 * Babergh
 * Forest Heath
 * Ipswich
 * Mid Suffolk
 * St. Edmundsbury
 * Suffolk Coastal
 * Waveney
 * Surrey
 * Elmbridge
 * Epsom and Ewell
 * Guildford
 * Mole Valley
 * Reigate and Banstead
 * Runnymede
 * Spelthorne
 * Surrey Heath
 * Tandridge
 * Waverley
 * Woking
 * Warwickshire
 * North Warwickshire
 * Nuneaton and Bedworth
 * Rugby
 * Stratford-on-Avon
 * Warwick
 * West Sussex
 * Adur
 * Arun
 * Chichester
 * Crawley
 * Horsham
 * Mid Sussex
 * Worthing
 * Wiltshire
 * Kennet
 * North Wiltshire
 * Salisbury
 * Thamesdown
 * West Wiltshire
 * Worcestershire
 * Bromsgrove
 * Malvern Hills
 * Redditch
 * Worcester
 * Wychavon
 * Wyre Forest

Wales
These codes became active following local government changes in 1996.
 * Isle of Anglesey
 * Gwynedd
 * Conwy
 * Denbighshire
 * Flintshire
 * Wrexham
 * Powys
 * Ceredigion
 * Pembrokeshire
 * Carmarthenshire
 * Swansea
 * Neath Port Talbot
 * Bridgend
 * Vale of Glamorgan
 * Rhondda Cynon Taff
 * Merthyr Tydfil
 * Caerphilly
 * Blaenau Gwent
 * Torfaen
 * Monmouthshire
 * Newport
 * Cardiff

Scotland
These codes became active following local government changes in 1996.
 * Aberdeen
 * Aberdeenshire
 * Angus
 * Argyll and Bute
 * Scottish Borders
 * Clackmannanshire
 * West Dunbartonshire
 * Dumfries and Galloway
 * Dundee
 * East Ayrshire
 * East Dunbartonshire
 * East Lothian
 * East Renfrewshire
 * Edinburgh
 * Falkirk
 * Fife
 * Glasgow
 * Highland
 * Inverclyde
 * Midlothian
 * Moray
 * North Ayrshire
 * North Lanarkshire
 * Orkney Islands
 * Perth and Kinross
 * Renfrewshire
 * Shetland Islands
 * South Ayrshire
 * South Lanarkshire
 * Stirling
 * West Lothian
 * Eilean Siar (Western Isles)

Northern Ireland

 * Derry
 * Limavady
 * Coleraine
 * Ballymoney
 * Moyle
 * Larne
 * Ballymena
 * Magherafelt
 * Cookstown
 * Strabane
 * Omagh
 * Fermanagh
 * Dungannon and South Tyrone
 * Craigavon
 * Armagh
 * Newry and Mourne
 * Banbridge
 * Down
 * Lisburn
 * Antrim
 * Newtownabbey
 * Carrickfergus
 * North Down
 * Ards
 * Castlereagh
 * Belfast