GSS coding system

GSS codes are nine-character geocodes maintained by the United Kingdom's Office for National Statistics (ONS) to represent a wide range of geographical areas of the UK, for use in tabulating census and other statistical data. GSS refers to the Government Statistical Service of which ONS is part.

GSS codes replaced a previous system called ONS codes from January 2011. ONS codes were hierarchical whereas in GSS codes there is no relation between the code for a lower-tier area and the corresponding parent area.

Code formulation
GSS codes have a fixed length code of nine characters. The first three characters indicate the level of geography, and the six digits following define the individual unit. For example, the Royal Borough of Greenwich is coded as, Middlesbrough is  , Cambridge   and Fenland.

, the meanings of some common three character prefixes are as follows:

In 2019, the House of Commons Library proposed names instead of numeric codes for MSOAs to make them easier to use.

A full listing of GSS names and codes may be found by following the link to ONS Geography's Code History Database, below.

Geography of the UK Census
Information from the 2011 Census is published for a wide variety of geographical units. These areas include:


 * Counties in England
 * Districts within English counties, and unitary authority areas (where one council provides district and county functions)
 * Unitary council areas in Wales, Scotland, and Northern Ireland
 * Civil parishes (communities in Wales)
 * Electoral wards (electoral divisions in Wales). These areas are defined for the election of local councillors, but are also widely used for presenting statistics at a smaller scale than the whole district.
 * Census output areas (OA), the smallest unit for which census data are published. They were initially generated to support publication of 2001 Census outputs and contain at least 40 households and 100 persons, the target size being 125 households. They were built up from postcode blocks after the census data were available, with the intention of standardising population sizes, geographical shape and social homogeneity (in terms of dwelling types and housing tenure).  The OAs generated in 2001 were retained as far as possible for the publication of outputs from the 2011 Census (less than 3% were changed ). Before 2001, census data was published for larger Enumeration Districts (ED) which were delineated before the census was conducted and were the organisational units for census data collection.

Neighbourhood Statistics Geography
Super Output Areas (SOAs) are a set of geographical areas developed following the 2001 Census, initially to facilitate the calculation of the Indices of Deprivation 2004 and subsequently for a range of additional Neighbourhood Statistics (NeSS). The aim was to produce a set of areas of consistent size, whose boundaries would not change (unlike electoral wards), suitable for the publication of data such as the Indices of Deprivation. They are an aggregation of adjacent Output Areas with similar social characteristics. Lower Layer Super Output Areas (LSOAs) typically contain 4 to 6 OAs with a population of around 1,500. Middle Layer Super Output Areas (MSOAs) on average have a population of 7,200. The hierarchy of Output Areas and the two tiers of Super Output Areas have become known as the Neighbourhood Statistics Geography.

MSOAs use the name of the local or unitary authority followed by three digits, for example "Tower Hamlets 022" which is. LSOAs use the name of the containing MSOA followed by a letter, for example "Tower Hamlets 022C" which is.

Some LSOAs and MSOAs were revised in alignment with the 2021 Census.

Former hierarchical coding system
The older ONS code was constructed top down:
 * A two-character code represented a county.
 * For example,  for Cambridgeshire.


 * A four-character code represented a district, so that the first two characters showed the county in which the district was placed.
 * For example,  for Cambridge district or    for Fenland.


 * In the case of a unitary authority (including metropolitan and London boroughs) the first two digits were 00.
 * For example,   for Greenwich (London Borough) or   for Middlesbrough.


 * Local Government wards were given a two-letter code within their local authority.
 * For example,  for Petersfield Ward within Cambridge district.


 * The smallest level, Census OAs were originally given an additional 4 digits within a ward, so that the first output area in Petersfield Ward was coded.
 * Civil parishes were also coded using this hierarchical system. Parishes were coded using an additional 3 digits after their local authority.  For example, within   for Fenland district, the parish of Tydd St. Giles was coded.