UK postcodes - the external three-part code

Last modified: 1997-04-28

The external three-part code is a more flexible system being used both by the Royal Mail and by companies printing their own envelopes - they are particularly common on reply-paid or reply-addressed envelopes. They are often seen using thick black lines, and occasionally using tiny pink dots; the same encoding applies in both cases.

The code uses vertical bars divided into three parts. The central part is always present, while the upper and lower parts are included or omitted as necessary to encode the postcode. For example:

This encodes the postcode N3 2QQ, the delivery point suffix and a checksum.

Each character is encoded by 4 bars. The upper and lower parts of the bars each represent a number from 1 to 6 - by giving long bars values of 4, 2, 1, and 0 respectively and then requiring each code to have two long bars and two short ones - which then index a grid of characters:

1 2 3 4 5 6
1 0 6 C I O U
2 1 7 D J P V
3 2 8 E K Q W
4 3 9 F L R X
5 4 A G M S Y
6 5 B H N T Z

The checksum is calculated on the upper and lower bars independently. The values of the codes are added up modulo 6; the result (or 6 if the sum is a multiple of 6) is then used for the checksum bars. In the above example, the calculation is:
4 + 1 + 1 + 5 + 5 + 1 + 2 = 19 = 1 modulo 6
6 + 4 + 3 + 3 + 3 + 4 + 5 = 28 = 4 modulo 6
So the checksum character is code 1 over code 4 (which represents the digit 3, but that is irrelevant).

Finally, to ensure the scanner is not trying to read an upside-down code, there is always an upper-part-only bar at the left end and a full-length bar at the right end.


Back to Up UK Postcodes or Up the Postcodes index. CDWF Back to Clive's home page.