The Code Sorting System – An Overview

1984: 34/13 outward code (YO1), 15/61 inward code (3JW)

The rows of dots seen on the envelopes of UK mail are an aid to mechanical sorting. They operate in conjunction with the postcode system, which allocates a compact abbreviation to all possible addresses in the UK. The dots are intended to encode these in a machine-readable form, although the allocation of dot patterns in the early years also took account of letters addressed without postcodes, with a large number of patterns used to encode post towns and old postal districts.

The general principle of the original system was to use two rows of dots. The lower row was for outward sorting and encoded the post town (e.g. York) or the outward part of the postcode (e.g. YO1). The upper row was for inward sorting and encoded the inward part of the postcode where present (e.g. 3JW). Automated sorting equipment could read the dot patterns and route the letter to the appropriate box.

Initially actual circular dots were used, firstly in a translucent material (the dots appear to be "waxy" on the envelope), and later blue in colour to show that the letter had in fact been coded. In the 1990s with the use of inkjet printers these were replaced by vertical bars made up of several very small dots, but the general term "dot" below should be assumed to refer to either.

A schematic of the layout of the special operator's keyboard is shown on this page.

The "National" Code System

The national system was based on a code structure designed in the mid 1960's, when the plan was to concentrate all code sorting onto about 120 offices from the wide range of sorting offices then in use – 1700 post towns and a variety of outward, exchange, delivery, postmens etc. offices. These 120 offices were the basis of the 120 area code letter combinations which are still in use. The system was first used in 1968 at Croydon Mechanised Letter Office (MLO). As it developed over the years sorting was further concentrated onto 80 offices, but this did not affect the postcodes or dot patterns.

The general idea is that the positions and on/off status of the dots represent digits in a binary number. The actual machine readable phosphor dot patterns used were based on a 12 bit code, plus a start dot (always present to mark the start of the code), and a "parity" dot which was applied at the end as required to make the total number of dots an even number ("even parity"). Note that as the letters were presented to the machinery right-side first, the start dot is on the right and the parity dot (if present) on the left.

The code is actually read from the middle 12 dots in the form of two blocks of six "bits", right hand block first. A six bit code means 26 = 64 possible binary numbers and the total number of patterns is thus 64 × 64 = 4096. As the outward codes in the lower row are just assigned on a look-up table system, there is no logical connection between the code value and the keyed code. The 4096 inward codes in the upper row are assigned according to a simple formula. The total number of possible code combinations is thus 4096 × 4096 = 16777216. (In practice only 4000 of the inward codes are used by the postcode system, by omission of six potentially confusable letters of the alphabet – C, I, K, M, O and V.)

The term "binary" – at least as used by collectors of this material – refers to the pattern of dots, and also, by convention, to the decimal equivalent numbers to the right hand six (XX) and left hand six (YY) dots of the pattern and is now written in the form XX/YY or XXYY (e.g. 23/61 or 2336). A "page" or "code page" refers to a group of 64 codes with a common right hand code – i.e. page XX is XX/01 to XX/64.

Within the system there are several identifiable types of keyed code to cater for a range of operating conditions. Apart from odd special cases, all the outward codes use only the bottom row and must share the 4096 available combinations. All the codes may be divided into two broad classes: "universal codes" which are interpreted as the same address in all correctly programmed code readers, and "local codes" which were intended to allow offices to sort more efficiently to destinations for which they received a lot of mail, and which would be interpreted as different addresses in different readers. There were several different types of each.

Universal Outward Codes


The basic code is the postcode on the letter, which is either directly keyed by an operator or machine-read. The outward code is the part before the space, e.g. "YO1". These were the codes the system was primarily designed for.

Extract Codes

Although some offices were putting code dots on letters from 1968 onwards, the actual job of allocating postcodes to all addresses in the UK was not completed until 1972. The Post Office assumed that the public were unlikely to use postcodes as a matter of course until the system was more fully in operation, so a facility for coding ordinary addresses was incorporated.

For this, the operator keyed an "extract" of the post-town name, consisting of its first three and last two letters, which mostly served to identify a town unambiguously. (For shorter town names, some letters would perforce be repeated – e.g. for York the operator keyed YORRK, for Ayr the keying was AYRYR.) To allow postcoded and non-postcoded mail to be sorted to separate boxes, a complete set of codes was set aside exclusively for the extracts.

There were a few special cases for extract codes:

  • Multiple extracts: these occurred where different versions of the town name were in use – e.g. Royal Leamington Spa could be coded ROYPA (23/54), or as Leamington Spa LEAPA (14/07), or just as Leamington LEAON (14/06)
  • Ambiguous extracts: these occurred when two or more towns had the same extract – e.g. HERRD for both Hereford and Hertford. Mail with one of these codes had to be set aside to be sorted manually
  • Welsh extracts: these were a series of codes assigned c.1970-76 for the Welsh spellings of towns in Wales – e.g. ABEWE for Abertawe (Swansea).
  • Irish extracts: these were codes assigned to post-towns in the Irish Republic from 1978 onwards, by agreement with the Irish Post Office. (In some cases this created new ambiguous extracts – e.g. ATHNE for Atherstone in Warwickshire and Athlone in County Down.)
  • False extracts: these were a small number of codes set aside for incorrect but commonly used versions of town names – e.g. MATTH for Matlock Bath (Matlock).


All the Mechanised Letter Offices (MLOs) were given a "shortcode" to reduce the amount of keying for mail without postcodes to a minimum. These were keyed with a two letter code (the base part of the postcode) followed by the "short" key – e.g. BN short key gave a pattern 08/01 (Brighton, Sussex).

District Codes

All the old city districts in cities that had them (London, Manchester, Glasgow etc) were assigned separate codes in the 1970s, even though they were generally contiguous with the postcode areas that replaced them. These were keyed e.g. M8 short key which gave a pattern 4l/33 (Manchester 8).

(Some of the District codes were listed as 24-bit codes, but were in use in a period when 24-bit translators were uncommon.)

Shared Codes

In some cases some of the keyed codes shared a common code pattern, either because they were alternative ways of referring to the same area, or sometimes because they were a group of nearby postcodes sorted to the same place. By c.1996 with most mail now postcoded and extract and short codes much less important, a more systematic approach to "doubling up" was taken so that each place had a single code in the list. This created spaces that allowed the shared postcodes to be split up into codes for each individual postcode.

  • Shared postcode – a code which was used to two or more nearby outward postcodes, e.g. SG13 and SG14 both gave 07/04 (Hertford)
  • Extract/postcode: a code in the extract code allocation which was also used for a postcode – e.g. ABEON and SA46 both gave 0205 (Aberaeron, Dyfed)
  • Extract/shortcode: a code in the extract code allocation which was also used for a shortcode – e.g. ABEEN and AB shortkey both gave 0101 (Aberdeen)
  • District/postcode: a code was used both for an old city district code and the new postcode – e.g. SE12 keyed gave 30/33 with or without the inward part
  • Extract/short/postcode: all three types used the same code – e.g. LERCK, ZEsc and ZE1 all gave 14/19 (Lerwick, Shetland)

Where postcodes shared a common outward dot pattern, the sector numbers never overlapped – e.g. SG13 (Stevenage postcode area) had sectors 7 and 8, and SG14 had sectors 1, 2, and 3. This maintained the uniqueness of the whole code, although it meant that strictly speaking the first digit of the upper line was part of the outward code. The standard CST2 code translator of the 1980s (and its magnetic core forunner) could not be used this way, as it could only deal with 12 bit numbers, i.e. the lower line. The replacement systems were equipped with 24 bit translators which could sort on the basis of codes from both lines simultaneously, but at least until the mid-1990s little use was made of this as it was not universally available.

Test Codes

The binaries 21/21 (all odd dots in the central group of 12 present), 42/42 (all even dots in the central group of 12 present), and 63/63 (all dots present) were reserved for testing by engineers, and are occasionally seen on test mail. They were keyed XY1, XY2, and XY3.

Foreign Mail

The last universal code was a special one introduced in the 1990s for foreign mail, which was the code 01/64. The sorting machines would then sort the items to the appropriate Foreign Section, which could be Glasgow, Reading, or Mount Pleasant in London. Offices with 24 bit translators put the code in the top line, but offices with a 12 bit translator had no choice but to use the lower line – this displaced the "SE" shortcode that used to give 01/64. At Mount Pleasant foreign items were outward coded for sorting to foreign countries or areas in the top line position to the left of the two dots of the 01/64 coding.

Non-universal outward codes including local codes

The first type are the local codes where the code and keying were assigned at the whim of the local head postmaster. The other main type are the "semi-national forwarding codes" (SNFCs) where the codes were assigned by postal headquarters for use by groups of MLOs, but the MLO could decide the keying to be used. These were all assigned from a group of codes set aside in the main series. In the early 1970s the group 38/37 to 38/44 was used, but in the mid 1970s a larger group – pages 57, 60 and 61 – was assigned and the 38/XX codes were dropped.

In the early 1980s Bournemouth MLO took advantage of a more advanced 24-bit translator and used a form of "county extract code" for a period. This was coded on the upper line in the last 96 codes not part of the 4000 used by the inward codes, i.e. 63/33 - 64/64. This practice was stopped because it clashed with inward extract coding already in use at the London West Central District Office (WCDO). Subsequently Bournemouth MLO switched to using the inward line for local coding using the 57-61 series binaries, again taking advantage of the 24-bit translator. (The foreign coding used at the Foreign Section in London was a further case of upper line outward coding.) In the 1990s Glasgow introduced a division for foreign items by country or major city using local delivery codes in the upper line, and Croydon introduced a division for foreign items into European, world air and world surface using local delivery codes in the bottom line.

The details of these local codes and SNFCs are beyond the scope of this listing, although where a binary was used in this way it is mentioned.

Structure of the Numerical List of Outward Codes

At the outset, the designers of the code translators reserved three blocks of binaries on each and every page:

  1. the XX/01 series
  2. the XX/02, XX/03 and XX/04 series
  3. the XX/64 series

Series 1 and 3 were intended and used mainly for "short codes" for Mechanised Letter Offices, and series 2 to provide spare codes on each page. The rest of each page from XX/05 to XX/63 was used for codes as they were assigned to each area. Broadly speaking, the lists consisted of a block of "extract codes" from 01/05 to 19/63, a block of city postcodes in alphabetical order from 20/05 to 23/47, more extracts from 23/48 to 29/47, then mainly postcodes from 29/48 to 64/63.

Within the main run, pages 19 to 42 also contain a mixture of "district short codes", "false extracts", "alternative extracts", "Irish extracts" etc.. 38/37 to 38/44 were originally set aside for local codes, but later pages 57, 60 and 61 were used and page 58 has Irish extracts. Before their use as locals pages 57, 60 and 61 were used for "24 bit district codes". At some stage the spares XX/02, XX/03, and XX/04 were all used for postcodes. While the majority of binaries retained their original assignment, a fair number were reassigned because the address codes, particularly rural extracts, became redundant once postcodes and code reading equipment became ubiquitous. Some codes were reassigned as many as three times in the first 20 or so years of the national system.

Inward codes

There is one universal inward code for the latter half of the postcode. Unlike the postcode this can be calculated from rules, and was translated by a separate unit to the main translator on CST2 machines.

A number of inward extract coding systems were used by varios MLOs at times, mainly to deal with mail with no postcode. None of these were universal. Cambridge used a system for coding local mail for years, which used the full range of the inward code line. WCDO had a system which used only the 96 codes above the normal inward range, presumably to allow mixing with normally coded mail with no ambiguity. There is evidence that Croydon used upper line coding early on for a similar application. Again, these are beyond the scope of this listing.

Sources of Coding Data

The main source for the lookup tables for the outward codes (as the inward codes follow well-defined rules) was the data collected by the late Bob de Vekey, published in loose-leaf form in the 1990s under the title British Letter Sorting Codes. A subsequent National System working spreadsheet was supplied by Bob to Alastair Nixon in 2013. These sources have been combined to the best of my ability, but please with details if you spot any anomalies.

In the lists, code pattern interpretations marked "Original" were those that appear to have been the original allocations, with specific years indicating when a changed interpretation became valid. Entries marked "1996 (Apr)" are from an official list supplied to Bob, and show many changes due to the process of collating codes that referred to the same area under a single binary, and splitting up shared postcodes. Entries marked "NS2013" are from the aforementioned spreadsheet – which appears to be generally accurate but does contain the occasional questionable data point, so handle with care.