---
title: The International Standard for Identifying Postal Items
description: The Universal Postal Union's S10 standard, in all its glory
publishedDate: 2025-03-11
updatedDate:
  - 2025-03-12
  - 2025-04-16
  - 2025-06-14
imageURL: /blog/s10-upu/crazyfactory.jpg
tags:
  - curiosities
links:
  hackernews: https://news.ycombinator.com/item?id=44258633
---
Have you ever received a parcel from overseas? I did recently, from Switzerland!

```{figure} crazyfactory.jpg
:alt: an image of an empty shipping packet
```

Looking at the envelope, I realised the format of the tracking number (`UT038926726CH`) was in a very similar (if not identical) format to ones I'd used frequently here in the UK.

I'd been receiving emails from Royal Mail about the parcel, so I just presumed that there was some data-sharing agreement in place with Swiss Post and Royal Mail had just given the parcel their own internal reference number.

```{figure} royalmail.jpg
:alt: a screenshot of a royal mail delivery notification
```

But seeing the reference number printed on the envelope from the get-go made me want to see what Swiss Post had to say about it...

```{figure} swisspost.jpg
:alt: a screenshot of a swiss post consignment tracking page
```

The same tracking number works across multiple carriers, and it's the same format as all the UK ones! What gives??

# Enter: the United Nations Universal Postal Union

The [Universal Postal Union (UPU)](https://en.wikipedia.org/wiki/Universal_Postal_Union) is an agency of the UN that coordinates postal policies to facilitate post flowing across the world. As part of this, it publishes the [S10 standard for the identification of postal items](https://www.upu.int/UPU/media/upu/files/postalSolutions/programmesAndServices/standards/S10-12.pdf) in a 13-character format - ie. what we've been seeing on our parcels!

<div class="note"><div class="note-content">

If you're interested in learning more about the UPU's interesting 150-year history, you might want to check out [this article](https://imiqbal.com/what-is-the-universal-postal-union/) written by fellow webring inhabitant Imaan! [^6]

</div></div>

Each country's national postal service is assigned as having exclusive reign over S10 codes for that country, and they go about issuing S10 codes from their country.

## Tracking Number Format

As it turns out, the structure of our tracking number has a strict design, and our tracking number contains four distinct things:

| Character number | Format | Description |
|------------------|--------|------------|
| 1 and 2 | 2 letters | Service indicator |
| 3 to 10 | 8 digits | Serial number |
| 11 | 1 digit | A check digit |
| 12 and 13 | 2 letters | ISO 3166–1 country code representing the origin of the item |

### The Service Indicator

The first two characters represent the service that's been used to post the item. There's a fairly extensive list in the standard, with specific options for tracked post, letter post, parcel post... the list goes on. The most interesting part of the service indicators are threefold:

First, there are specific carve-outs in the specification for an organisation called [EMS](https://www.ems.post/en/about-us/about-us) - they get all `E` prefixes, so `EA`, `EB`, `EC`, and so on and so forth. EMS is an express international mail service that's run by the UPU itself, but that delegates operations to the national postal services that control their country's S10 codes. This is why you'll not see any way to buy shipping using EMS directly on their website - you buy express international shipping at your local post office and they route it accordingly. It's also worth noting that this only applies to express shipping - not regular-rate traffic.

Second, countries are allowed to override some of the service indicator assignment rules set out in the S10 standard. This can happen when either a parcel is being sent domestically or when a carrier has an agreement with other countries' carriers to reassign some service indicators for other purposes, hence the inclusion of the origin country code to aid interpretation of tracking numbers where this is the case.

Lastly, some service indicators are explicitly disallowed from being used. These are `JA–JZ`, `KA–KZ`, `SA–SZ`, `TA–TZ` and `WA–WZ` since these carry the risk of causing a tracking number to be confused with codes from a different UN data encoding standard.

All in, the possible service indicator space looks like this:

```{figure} service-ids.jpg
<a href="https://s10.avl.la/#service-indicator-table">Table source</a>
```

### The Serial Number

This is just a serial number. It's exactly 8 digits long and is generated by the originating carrier as they see fit, provided they don't resue the same number within 12 months. In theory, this means a lost parcel can only be lost for 12 months before it vanishes from the world forever, but in reality, the S10 recommends not reusing a number within a minimum period of 24 months. Even then, you have 100 million parcels per service indicator per country available to be issued, so it's probably not going to be necessary for a carrier to reuse a number for a much longer period of time anyway.

### The Check Digit

The check digit corrects any errors in the serial number preceding it, using the following algorithm:

- Multiply each digit in the sequence with the corresponding number from this sequence: `8 6 4 2 3 5 9 7`
- Sum all these values
- Divide the sum by 11
- Substrac the remainder from 11
- If the result is in the range 1-9, use that as the checksum
- If the result is 10, use 0 as the checksum
- If the result is 11, use 5 as the checksum

This is not a particularly strong checksum, but it's good enough to guard against a couple of accidental digit-swaps here and there. You can play with an interactive demo of it [here](https://s10.avl.la/).
## Barcode Format

The S10 standard requires tracking numbers to be printed on an item as a barcode, either being in [Code 128](https://en.wikipedia.org/wiki/Code_128) or [Code 39](https://en.wikipedia.org/wiki/Code_39) format.

Additional barcodes on the label are discouraged, particularly for international items, and carriers that must include other barcodes are required to use a different format and not obscure the S10 code. This is why you'll see Royal Mail, for example, using [data matrices](https://en.wikipedia.org/wiki/Data_Matrix) on their labels.

```{figure} rm-label.jpg
The square code on the left side is the data matrix, the barcode on the right is the S10 code
```

## Other Fun Things in the Standard

1. A plaintext representation of an S10 code must be printed within 1-5mm of the barcode
2. Such plaintext should be in the format `AB 123 456 789 GB`
3. Sans-serif fonts are required, with specific requirements as to the sizing of each letter
4. National carriers are allowed to delegate issuing responsibility to a third party provided they can ensure no number is reissued within the year
5. The country code at the end of the tracking number isn't actually a reliable indicator of the country of origin but the nationality of the carrier of origin (eg. in the case of an overseas territory, a national carrier could still use the mainland code)

---

# Update: 2025-06-14

An earlier version of this post said that there are 10 million serial numbers per service indicator, which is wrong; there are 100 million. Thank you to Jeff for pointing this out via email :)

---

[^6]: Discussion of the placement of commas and links in this sentence made for an entertaining grammar-based discussion among friends.
