Live tracking · 320 vessels · 277 ports Data refreshed 60d ago

Reference · 7 min read

Understanding UN/LOCODE — the world’s port identifier system

The five-character UN/LOCODE is the lingua franca of international shipping documentation. This guide explains how the system works, who maintains it, and how to read a code.

Every cargo port in the PortWatch directory carries a five-character identifier called a UN/LOCODE. The system is maintained by the United Nations Economic Commission for Europe (UNECE) and is the de-facto standard identifier for ports, terminals, and inland transport locations across global trade documentation.

How a UN/LOCODE is structured

A UN/LOCODE is exactly five characters in two parts. The first two characters are the ISO 3166-1 alpha-2 country code (US for the United States, NL for the Netherlands, CN for China). The trailing three characters are an alphanumeric port code allocated by UNECE in coordination with the national focal point of each member state. So NLRTM means Rotterdam, in the Netherlands. SGSIN means Singapore, in Singapore. USLAX means Los Angeles, in the United States. The encoding is intentionally short so that it fits in fixed-length EDI fields without truncation.

What it covers

The UN/LOCODE register covers more than 100,000 locations worldwide and is not limited to seaports. It also includes airports, rail terminals, road freight facilities, river ports, and customs offices. Each location entry carries a short name, the country code, the location code, the function the location serves (a column of single-character flags indicating port, rail terminal, road terminal, airport, postal exchange office, multimodal hub, fixed transport function, ICD inland clearance depot, border crossing), and approximate coordinates.

Where to look it up

The authoritative copy is published on the UNECE website and is republished twice a year. Many commercial systems also maintain offline copies — your shipping line, your forwarder, and any TMS you use will all carry a UN/LOCODE table internally. PortWatch joins its port reference data on UN/LOCODE so that links into and out of the directory are stable across rebuilds, even if a port is renamed or recategorised.

Limitations

UN/LOCODE has well-known weaknesses. New port assignments can take months to appear in the published register because the maintenance cadence is slow. The function flags are inconsistently maintained, particularly for inland multimodal locations. Some country submissions are out of date. And several countries—particularly those with rapidly developing port infrastructure—have allocated codes for terminals that are no longer in commercial use, while leaving newer terminals with no code at all. PortWatch reflects the published register as it stands and does not attempt to second-guess the upstream allocations.