What Is a UN/LOCODE? The 5-Letter Port Code, Explained
Every port page in this directory leads with five characters — GBFXT, NLRTM, SGSIN. They are not an app's invention. They are the closest thing shipping has to a universal address, and once you can read one, a lot of what a ship tracker does stops looking like magic.
The code in one paragraph
A UN/LOCODE — the United Nations Code for Trade and Transport Locations — is a five-character identifier for a place that goods move through. The first two characters are the country, using the same ISO codes you already know from domain names and passports. The last three identify the location inside that country. So GB + FXT is Felixstowe, NL + RTM is Rotterdam, and SG + SIN is Singapore.
How to read one
- Characters 1–2 — the country. ISO 3166 alpha-2. If a code starts with US it is in the United States, and no code from another country can collide with it.
- Characters 3–5 — the place. Often an abbreviation of the name (RTM for Rotterdam), sometimes an airport-style code the city already had, and sometimes neither. There is no rule that lets you derive it reliably.
- It names a place, not a berth. A single code covers a whole port area. Which quay a ship ties up at is not in the code.
Codes that look alike are not alike. USPCV is Port Canaveral in Florida; USPCN is Port Clinton on Lake Erie, about a thousand miles away. Neighbouring codes are a common source of mistaken identity, which is exactly why the code and not the name is the thing worth quoting.
Why a ship tracker cares
When a ship's crew sets a destination, they type it into the AIS transponder by hand, as free text. Many write the UN/LOCODE. That single field is what lets a tracker answer “what is coming here?”: gather every vessel whose broadcast destination resolves to GBFXT, sort by ETA, and you have an arrivals list for Felixstowe without asking the port for anything. It is why every port page in this directory is built around its code, and why the code appears in each page's facts.
Where it gets messy
The destination field is typed by a person on a bridge, so it carries everything you would expect from a free-text field. Crews write names instead of codes, abbreviate in their own way, leave the last voyage's destination in place, or leave it blank. Names are worse than codes because places share them — there is a Newcastle in Australia and a Newcastle in England, and a bare “NEWCASTLE” genuinely does not say which. A tracker that guesses will sometimes put a ship on the wrong arrivals board, so the safer behaviour is to file nothing at all when a name is ambiguous. Codes avoid the whole problem, which is the practical reason to prefer them.
Look up any port by its code
363 port pages, each with its UN/LOCODE, position and live board — free on iPhone & iPad.
FAQ
What does a UN/LOCODE look like?
Five characters, always. The first two are the ISO country code — GB, NL, SG — and the last three identify the place within that country. GBFXT is Felixstowe in the United Kingdom, NLRTM is Rotterdam, SGSIN is Singapore. The last three characters are usually a squeeze of the place name, but not always, so they are worth looking up rather than guessing.
Who maintains UN/LOCODEs?
UNECE, the United Nations Economic Commission for Europe, maintains the list on behalf of the UN and publishes updates roughly twice a year. Countries submit their own additions and changes, which is why coverage and quality vary from one country to the next.
Are UN/LOCODEs only for seaports?
No. The list covers well over a hundred thousand locations of every kind — airports, rail and road terminals, inland container depots, border crossings and postal exchange points. Seaports are only the part of it a ship tracker cares about.