What Is a UN/LOCODE? The Port Code Explained
4 min read
If you have ever looked at a shipping document, a bill of lading, or a port page on this site, you have probably seen a short code like NLRTM or USLAXnext to a port’s name. That code is a UN/LOCODE — and once you know how to read it, it tells you a surprising amount in just five characters.
What does UN/LOCODE stand for?
UN/LOCODE is short for the United Nations Code for Trade and Transport Locations. It is a global standard maintained by UNECE (the United Nations Economic Commission for Europe) that assigns a unique code to ports, airports, rail terminals, road hubs, and other places involved in moving goods. The system covers more than 100,000 locations worldwide and is updated roughly twice a year.
How to read the five characters
A UN/LOCODE is always five characters, split into two parts:
- The first two letters are the ISO country code —
NLfor the Netherlands,USfor the United States,DEfor Germany, and so on. - The last three characters identify the specific location within that country, usually derived from its name.
So NLRTM breaks down as NL (Netherlands) + RTM (Rotterdam) — the Port of Rotterdam. Likewise USLAX is the Port of Los Angeles, DEHAM is Hamburg, and BEANR is Antwerp.
What is a UN/LOCODE used for?
Because it is short, unique, and language-independent, the UN/LOCODE has become the common reference for identifying places in international trade. You will find it used in:
- Bills of lading and shipping instructions
- Customs declarations and manifests
- Electronic data interchange (EDI) messages between carriers and ports
- Freight booking and container-tracking systems
Using a code rather than a place name avoids confusion between similarly named cities (there are many “Springfields” and “Victorias” in the world) and sidesteps spelling differences across languages.
Not every UN/LOCODE is a seaport
This is the most common misconception. The full UN/LOCODE list includes airports, inland rail and road terminals, postal centres, and border crossings — not just seaports. Each entry carries a “function” classifier that indicates what kind of location it is. A port is only one of those functions, which is why the count of true seaports is far smaller than the 100,000+ total locations.
Where to find a port’s UN/LOCODE
Every port page on The Port Index lists its UN/LOCODE alongside its coordinates, depths, and other details. You can browse ports by country or search by name or code from the box at the top of any page.