UN/LOCODE lookup: port code search by name, country or code
A UN/LOCODE is the five-character United Nations code for a trade or transport location: two letters for the country (ISO 3166-1) and three for the place, so Rotterdam is NLRTM, Hamburg DEHAM and Felixstowe GBFXT. This lookup searches all 116,213 entries of UN/LOCODE edition 2025-1, shows each code's functions, status and position, and checks lists of up to 50 codes. In Logistivo, the port of loading and the port of discharge of a sea-freight request are picked by name or by UN/LOCODE from Logistivo's port list.
Source: UNECE · datasets/un-locode (Datopian) · EUR-Lex · DCSA · SMDG.
Data last updated:
.
Code card
Code card — Type a port, city or code: every UN/LOCODE with its functions, status and map in one card.
Searches UN/LOCODE edition 2025-1 (116,213 entries, 249 country codes) and Logistivo's port list (14,271 codes you can pick as port of loading or discharge in Logistivo). Every result says which list it comes from.
Port, place or UN/LOCODE — A name, a 5-character code (with or without the space), a 3-letter location or IATA code, or 2 capital letters (DE) for a country list.
Paste up to 50 codes — One per line, or separated by commas, semicolons or spaces.
Example NLRTM — Rotterdam — Subdivision: Zuid-Holland | Functions: Seaport (1), Rail (2), Road (3), Airport (4), Postal exchange (5) | Status: AF — Approved by the national trade facilitation body | Entered or last changed: 2005-01 | Coordinates: 5155N 00430E
Nearby codes in the same country — NLLEP Lepelstraat (6 km) · NLHIJ Heijplaat (6.8 km) · NLKAI Krimpen aan den IJssel (6.9 km) · NLLSG Lansingerland (7.4 km) · NLBEK Bergschenhoek (7.5 km) · NLBER Berkel en Rodenrijs (7.5 km) · NLPTG Poortugaal (8.8 km) · NLPER Pernis (8.8 km)
What the function digits mean
1 — Seaport — Permanent facilities where seagoing vessels load or discharge cargo; since 2002 the list also uses 1 for river and lake ports. It means a port exists within the location, not that the code stands only for the port.
2 — Rail — One or more railway cargo terminals or stations; terminals inside a place are not coded separately.
3 — Road — The place is connected to other locations by road.
4 — Airport — Permanent facilities where aircraft load or discharge cargo.
5 — Postal exchange — International Mail Processing Centre recognised by the Universal Postal Union.
7 — Fixed installation — Oil pipeline terminal, oil platform, power line or ropeway terminal.
B — Border crossing (former) — Former flag, still set on 489 entries; Recommendation 16 says it is no longer to be used.
Not officially functional — The place qualifies, but no function recognised by the competent authority is known (910 entries).
8 — Inland water (not used) — Defined in Recommendation 16, but the list codes river and lake ports with 1.
A — Special Economic Zone — A zone whose economic laws for trade, duties and tariffs differ from the rest of the country.
What the status codes mean
AA — Approved by a national government agency — Legacy approval status, still valid.
AC — Approved by customs — Legacy approval status, still valid.
AF — Approved by the national trade facilitation body — Legacy approval status; DEHAM and NLRTM carry it.
AI — Adopted by an international organisation — Code adopted by IATA or ECLAC.
AS — Approved by the national standards body — Carried, for example, by the Chinese port and airport entries such as CNSHG and CNSHA.
AM — Approved by the UN/LOCODE maintenance team — Current approval status under Recommendation 16.
AQ — Entry approved, functions not verified — The place is confirmed, its function flags are not.
RL — Recognised location — Name checked against a gazetteer; relevance to trade not confirmed. The most common status.
RN — Requested by national sources — Request from credible national sources for places in their own country.
QQ — Original entry, not re-verified — Dates from the first 1980 input and has not been checked since.
RQ — Request under consideration — Should not be used in international electronic exchanges until validated; no entry carries it in edition 2025-1.
UR — Included on a user's request — Not officially approved (8 entries in edition 2025-1).
XX — To be removed — Will disappear from the next issue; do not use it for new documents.
List check: what each result means
In the list — The code is in UN/LOCODE edition 2025-1 with an approved or recognised status.
In the list, check the status — The code exists, but its status is RQ, XX or UR; confirm it with your carrier or customs broker.
Not in the current edition — The code appeared in an earlier edition but not in 2025-1; do not use it on new documents.
Only in Logistivo's port list — Not in UN/LOCODE edition 2025-1; often a terminal or provider code. Ask your carrier which code they expect.
Not found — Well formed, but neither in edition 2025-1 nor in Logistivo's port list. Check for O/0 and I/1 typos.
Wrong format — A UN/LOCODE is exactly five characters: two letters for the country and three letters or digits for the place.
Unknown country code — The first two letters are not a country code used in UN/LOCODE (for example UK instead of GB).
Country codes that trip people up
UK → GB — The United Kingdom's ISO 3166-1 code is GB, so Felixstowe is GBFXT, not UKFXT.
EL → GR — EL is Greece's prefix for EU VAT numbers; UN/LOCODE uses GR (Piraeus is GRPIR).
XI → GB — XI marks Northern Ireland in EU customs and VAT numbers; UN/LOCODE files Belfast as GBBEL.
English names that find the wrong place — Genoa → Genova (ITGOA) · Naples → Napoli (ITNAP) · Venice → Venezia (ITVCE) · Leghorn → Livorno (ITLIV) · Munich → München (DEMUC) · Cologne → Köln (DECGN) · Warsaw → Warszawa (PLWAW) · Bucharest → Bucuresti (ROBUH) · Seville → Sevilla (ESSVQ) · Dunkirk → Dunkerque (FRDKK)
Rules the lookup applies, with their source — Every rule below is also a check the tool runs.
Code format — Five characters: the ISO 3166-1 alpha-2 country code plus a three-character location code. Letters A to Z; digits 2 to 9 only where a country has run out of letter combinations (5,432 such codes in the United States). Printed lists show a space for readability (DE HAM); in documents and EDI the code is written DEHAM. — UNECE Recommendation 16 (2020), §17; Annex II, §4
Digits 0 and 1 — Avoided so that they are not confused with O and I. Edition 2025-1 still contains three codes with a 0 (DE9B0, DEB90, IT940); the tool accepts them because they are in the list, while a validator using the pattern [A-Z]{2}[A-Z2-9]{3} rejects them. — Recommendation 16, §17; DCSA transport document API 3.0.0 (UNLocationCode pattern)
XZ — Reserved for installations in international waters or cooperation zones, such as oil platforms. — Recommendation 16, §17; UNECE Secretariat note 2020-2, §13
One code per place — Airports, rail stations and container terminals inside a place get a function flag, not their own code; terminals are identified with child codes such as the SMDG terminal codes. — Recommendation 16, §17 and §33–35; SMDG Terminal Code List
Status warnings — RQ (request under consideration), XX (to be removed) and UR (included on a user's request) are flagged in the code card and the list check. — Recommendation 16, Tables 2 and 3
IATA column — Filled only when the IATA code differs from the three location letters. If a place has the airport function and the column is empty, the letters are the same. — UNECE Secretariat note 2020-2, §22
Coordinates — Degrees and minutes, not decimals: 5331N 00956E is 53°31′N 9°56′E (53.5167, 9.9333). 23,061 entries have no coordinates and 278 carry minutes above 59; those are not placed on the map. When the UN/LOCODE entry has no coordinates, the map uses Logistivo's port list and says so; when both lists have a point more than 25 km apart, both are shown. — UNECE Secretariat note 2020-2, §6
Search — Names match from the start and without accents; official alternative names count, including the second language version in brackets (Antwerp finds Antwerpen, Roma finds Rome (Roma)); generic words such as “port of” are ignored and ae, oe, ue are also read as ä, ö, ü. A query typed in capitals (DEHA, SZF) is read as a code first, any other query as a name first; among names, exact names come first, then this page's market country, then places with a port function. 20 results per page; two capital letters (DE) open the country list from A to Z. — Logistivo lookup logic
Nearby codes — Same country, with coordinates, within 60 km (250 km if nothing is closer), at most 8, by great-circle distance. — Logistivo lookup logic
List check — Up to 50 codes per check, separated by new lines, commas, semicolons, tabs or spaces between whole codes. — Logistivo lookup logic
Data — UN/LOCODE edition 2025-1: 116,213 entries, 116,067 distinct codes (139 codes appear with two names, e.g. BEBRU Brussel/Bruxelles), 249 country codes. unece.org does not answer automated requests from our server, so the list is read from the public-domain datasets/un-locode copy of the UNECE release. Logistivo's port list: 14,271 codes, loaded on 15 September 2025; 12,251 of them are in edition 2025-1. — UNECE UN/LOCODE download page; github.com/datasets/un-locode
Found the code? Put it on the shipment, not in a spreadsheet — In Logistivo a sea-freight request takes the port of loading and discharge by name or UN/LOCODE, a pasted booking e-mail fills the empty fields, and every later port change on the load is written into its chat with the old and the new code.
Load management — POL and POD on every load; changes logged with old and new code. — /en/load-management
Shipper panel — Sea-freight quotes port to port, door to port or port to door. — /en/customer
AI logistics — Paste a booking e-mail; AI fills the request and matches the port in that country. — /en/ai-logistics
Codes come from UN/LOCODE edition 2025-1 as published by UNECE and from Logistivo's port list. UNECE states that it cannot verify every entry, so confirm codes that go on a bill of lading or a customs declaration with your carrier or customs broker.
Five characters with no space in use: the ISO 3166-1 alpha-2 country code followed by a three-character location code. DEHAM is DE (Germany) plus HAM (Hamburg).
DE — Country — The ISO 3166-1 alpha-2 code of the country or territory: GB for the United Kingdom, GR for Greece. XZ is reserved for installations in international waters.
HAM — Location — Three characters for the place, normally letters. Where a country has used up the letter combinations, digits 2 to 9 are allowed; 0 and 1 are avoided.
One code per place: an airport, rail station or container terminal inside a city gets a function flag, not its own code.
Printed lists show a space for readability (DE HAM); documents and EDI use DEHAM.
Terminals get child codes: SMDG, recognised by UN/CEFACT as a child-code list agency, lists Hamburg's Burchardkai as terminal CTB under DEHAM.
Codes of deleted entries are never given to another place.
Edition 2025-1 holds three codes with a 0 despite the rule (DE9B0, DEB90, IT940), so a strict 2-to-9 pattern rejects real codes.
NLRTM — Rotterdam — port, rail, road, airport, postal exchange
GBFXT — Felixstowe — port only; no coordinates in the list
TRSSX — Samsun — airport IATA code SZF in the IATA column
US7GO — Genoa (New York) — digit in the location part
XZAAD — Aasgard — installation in international waters
In Logistivo — The sea-freight request and the load in Logistivo search the port list by name or by this five-character code, so the code you check here is the one you pick as port of loading or discharge.
What is the UN/LOCODE for Rotterdam, Felixstowe or Shanghai?
Rotterdam is NLRTM, Antwerp BEANR, Hamburg DEHAM, Felixstowe GBFXT and Southampton GBSOU. Shanghai's seaport entry is CNSHG (Shanghai Pt); in edition 2025-1 CNSHA is Shanghai Hongqiao International Airport.
Rotterdam — UN/LOCODE: NLRTM | Functions: Port, Rail, Road, Air, Post | Container terminals (SMDG codes): ECT Delta, ECT Euromax (EMX), Rotterdam World Gateway (RWG), APM Terminals Maasvlakte II (NLMVII), all under NLRTM
Antwerpen — UN/LOCODE: BEANR | Functions: Port, Rail, Road, Air, Post | Container terminals (SMDG codes): MPET Deurganck Dock (K1718, K1742), PSA Europa (K869), PSA Noordzee (K913)
Jebel Ali — UN/LOCODE: AEJEA | Functions: Port | Container terminals (SMDG codes): DP World Jebel Ali CT1 to CT4 (DPWJA, DPWJ2, DPWJ3, DPWJ4)
New York — UN/LOCODE: USNYC | Functions: Port, Rail, Road, Air, Post | Container terminals (SMDG codes): Maher (MAHER), GCT Bayonne (GTC); APM Elizabeth and Port Newark carry USEWR (Newark) as alternative code
Los Angeles — UN/LOCODE: USLAX | Functions: Port, Air, Post | Container terminals (SMDG codes): APM Pier 400 (APMT), Fenix (EAGLE), TraPac (TRAP), YTI (YUSEN)
Names and functions from UN/LOCODE edition 2025-1; terminal codes from the SMDG Terminal Code List v20260609. Click a code to open its card.
What do the function digits and status codes mean?
The function field has eight positions: 1 port, 2 rail, 3 road, 4 airport, 5 postal exchange, 6 inland depot, 7 fixed installation and the former border-crossing flag B. Hamburg reads 12345---. The status says who approved the entry; RQ, XX and UR are the ones to double-check.
17,596 of the 116,213 entries carry the port function 1, and 910 are marked 0 (not officially functional). Both tables used by the lookup are printed in full above.
Where do I find the port code on a bill of lading or booking?
Four places on an ocean bill of lading and in the booking carry a location: place of receipt, port of loading, port of discharge and place of delivery. In electronic B/L data built on the DCSA standard, each of them has a UNLocationCode field.
The DCSA pattern for a UNLocationCode is two letters plus three letters or digits 2 to 9, exactly five characters.
Place of receipt: where the carrier takes over the cargo, when the carrier also does the pre-carriage.
Port of loading (POL): where the cargo is loaded onto the first seagoing vessel.
Port of discharge (POD): where the cargo leaves the last seagoing vessel.
Place of delivery: where the carrier hands the cargo over to the consignee, when the carrier also does the on-carriage.
EU customs and ICS2: the EU data requirements ask for the UN/LOCODE in Place of loading (16 13), Place of unloading (16 14), Place of delivery (16 05, as stipulated in the bill of lading) and in the place of the Delivery terms (14 01). Where no UN/LOCODE exists, the country code and the place name are given instead.
In Logistivo — A Logistivo sea-freight request asks for the transport scope first (door to door, port to port, door to port or port to door) and then only for the ports that scope needs; the port fields accept a name or a UN/LOCODE.
Bill of lading example: where POL and POD go — /en/bill-of-lading-example-bl-number-fields
Container number checker — /en/container-number-checker-check-digit-owner-prefix
Is the UN/LOCODE the same as the IATA airport code?
Often, but not always. UNECE fills the IATA column only when the airport code differs from the three location letters. When a place has the airport function and that column is empty, the letters are the same.
721 entries in edition 2025-1 carry an IATA code that differs from their location letters. Typing three letters in the lookup searches both the location part and the IATA column.
TRSSX Samsun: IATA column SZF.
GBBEL Belfast: IATA column BFS.
DERSK Rostock: IATA column RLG.
ESEPB El Prat de Llobregat: IATA column BCN, while ESBCN (Barcelona) also has the airport function: the three letters alone do not tell which entry a document means.
CNSHA: in edition 2025-1 this is Shanghai Hongqiao International Airport; the seaport is CNSHG.
How often does the UN/LOCODE list change?
UNECE publishes new editions regularly, usually two a year: edition 2024-1 came out on 29 July 2024 and 2024-2 on 15 January 2025. This lookup uses edition 2025-1; check the UNECE download page for a newer one.
New places are requested through UNECE's online Data Maintenance Request system (registration is free); national focal points and the maintenance team validate requests for the next issue.
+ entry added in this issue (95 entries in edition 2025-1)
# name changed
¦ other change: function, status, coordinates or subdivision
X marked for deletion, status XX; removed in the next issue, and the code is not reused
= reference entry for an alternative name, such as Antwerp = Antwerpen
! controlled duplicate in the United States list
Which UN/LOCODE mix-ups cause the most trouble?
Which UN/LOCODE mix-ups cause the most trouble? — Seven mistakes that put the wrong code on a booking or a declaration, each checked against edition 2025-1.
Chinese city, port and airport are three different codes — Wrong: CNSHA for the port of Shanghai, CNNGB for the port of Ningbo | Right: CNSHG Shanghai Pt (also CNYSN Yangshan, CNWGQ Waigaoqiao Pt), CNNBG Ningbo Pt | Since China's entries follow national standard GB/T 15514 (from edition 2014-1), many Chinese places have a city code, a port code and an airport code. In edition 2025-1, CNSHA is Shanghai Hongqiao International Airport and CNNGB is Ningbo Lishe International Airport. Many port lists built before these changes still label CNSHA “Shanghai”; the code card shows the official name next to the name in Logistivo's port list. | UNECE Secretariat note 2020-2, §4; UN/LOCODE 2025-1 | CNSHG, CNSHA, CNNBG, CNNGB, CNQDG, CNTAO
UK instead of GB — Wrong: UKFXT, UKSOU | Right: GBFXT, GBSOU | UN/LOCODE uses ISO 3166-1 country codes, and the United Kingdom's is GB. The same trap: EL (Greece's VAT prefix) instead of GR, and XI (Northern Ireland in EU customs) instead of GB. | Recommendation 16, §14–15 | GBFXT, GRPIR, GBBEL
The English name instead of the listed name — Wrong: Searching “Genoa”: it returns 6 places in the United States | Right: Genova, ITGOA | The list gives names in their national form: Genova, Napoli, Köln, Warszawa, Bucuresti. Official alternative names such as Antwerp = Antwerpen or Gothenburg = Göteborg are searchable here; for the others this page suggests the listed name. | Recommendation 16, §20–22 | ITGOA, ITNAP, DECGN, PLWAW
London, London Gateway Port or London Gateway Park? — Wrong: GBLON for a container landed at London Gateway | Right: GBLGP London Gateway Port (port, rail, road, inland depot); GBLGX London Gateway Park is the rail and logistics park | GBLON (London) carries the port and postal functions, but the deep-sea container terminal has its own entry, and its logistics park a third one. Use the code that your booking and the terminal use. | UN/LOCODE 2025-1; SMDG Terminal Code List | GBLGP, GBLGX, GBLON
Same name, several codes — Wrong: Taking the first “Hamburg” or “Valencia” in a list | Right: Check country, subdivision and functions: DEHAM Hamburg (functions 1 to 5), not USHAM Hamburg, New Jersey (road only) | Many names exist in several countries: “Valencia” is ESVLC in Spain and VEVLN in Venezuela. The code card shows the country, the subdivision and the function flags next to every name. | DEHAM, USHAM, ESVLC, VEVLN
Coordinates read as decimals — Wrong: 5331N read as 53.31 | Right: 5331N = 53°31′ = 53.5167 | The list writes degrees and minutes. Reading the minutes as decimals moves a point by tens of kilometres. 278 entries carry minutes above 59; the lookup leaves them off the map. When the two lists disagree by more than 25 km, both points are named: they place TRRZY (Rota-Izmit Bay) 1571 km apart. | UNECE Secretariat note 2020-2, §6 | TRRZY
Zero for O, one for I — Wrong: N0RTM, TR1ST | Right: NLRTM, TRIST | UN/LOCODE avoids 0 and 1 in the location part. A code with a 0 or a 1 is almost always a typo; edition 2025-1 has only three exceptions (DE9B0, DEB90, IT940). The list check points this out. | Recommendation 16, §17 | NLRTM, TRIST
What Logistivo does with the code next
What Logistivo does with the code next — The lookup is free. The work that starts with the code runs in Logistivo.
Ports by name or code in every sea-freight request — Choose door to door, port to port, door to port or port to door, then pick the port of loading and discharge from the port list by name or UN/LOCODE.
From booking e-mail to request — Paste the e-mail or the text: Logistivo's AI fills the request, matches the port names against the ports of the country in the text and fills only the fields that are still empty.
Every port change on record — When the port of loading or discharge on a load changes, the Logistivo assistant writes the new and the old name and code into the load's chat.
The vessel on the load — Add the container numbers to the load: Logistivo finds the vessel carrying them and refreshes its position twice a day on the load's map.
Put the right port code on every load
Create a free Logistivo account: sea-freight requests with POL and POD by name or UN/LOCODE, AI filling from booking e-mails, and vessel tracking on the load.
Source
UNECE — Recommendation No. 16: United Nations Code for Trade and Transport Locations (2020 edition, ECE/TRADE/459) — https://unece.org/sites/default/files/2020-12/ECE-TRADE-459E.pdf
UNECE — UN/LOCODE issue 2020-2: note to the users (coordinates, change indicators, IATA column) — https://unece.org/sites/default/files/2020-12/2020-2%20UNLOCODE%20SecretariatNotes.pdf
UNECE — UN/LOCODE download page (editions 2024-1 of 29 July 2024 and 2024-2 of 15 January 2025) — https://unece.org/trade/cefact/UNLOCODE-Download
datasets/un-locode (Datopian) — UN/LOCODE code list, edition 2025-1 (public-domain copy of the UNECE release) — https://github.com/datasets/un-locode
DCSA — DCSA Shipping Instructions and Transport Document API 3.0.0 (UNLocationCode, port of loading, port of discharge) — https://github.com/dcsaorg/DCSA-OpenAPI/blob/master/ebl/v3/EBL_v3.0.0.yaml
SMDG — SMDG Terminal Code List (TCL) v20260609 — https://smdg.org/documents/smdg-code-lists/smdg-terminal-code-list/
Frequently asked questions
What is a UN/LOCODE?
The United Nations Code for Trade and Transport Locations: a five-character code (country plus place) for ports, airports, rail and road terminals, inland depots and other places used in trade. UNECE maintains it under Recommendation 16 and publishes it free of charge.
What is the UN/LOCODE for Hamburg?
DEHAM. The entry has functions 1 to 5 (port, rail, road, airport, postal exchange) and status AF. Container terminals inside the port carry SMDG child codes such as CTB (Burchardkai) and CTA (Altenwerder).
What is the UN/LOCODE for the port of Shanghai?
In edition 2025-1 the seaport entry is CNSHG (Shanghai Pt); CNYSN is Yangshan and CNWGQ Waigaoqiao Pt. CNSHA is Shanghai Hongqiao International Airport and CNSGH is the city of Shanghai.
Is the UN/LOCODE the same as the IATA code?
Only when the IATA column is empty. UNECE fills that column when the airport code differs from the location letters, as with TRSSX Samsun (SZF) or GBBEL Belfast (BFS).
Is UN/LOCODE free to use?
Yes. UNECE publishes the code list on its website free of charge, and this lookup is free as well, without registration.
How do I request a new UN/LOCODE?
Register free of charge on UNECE's Data Maintenance Request system and file a request with the place name, subdivision, functions and coordinates. National focal points and the maintenance team validate requests for the next issue.
Can Logistivo fill in the ports from a booking e-mail?
Yes, in the sea-freight request: paste the e-mail or text and Logistivo's AI fills the form. In sea mode it matches the port names against the ports of the country found in the text and fills only the fields that are still empty.
Can I pick ports by UN/LOCODE in Logistivo?
Yes. The port of loading and port of discharge fields on Logistivo requests and loads search the port list by name or by code, and every later change is written into the load's chat with the old and the new code.
For AI assistants
Logistivo has a public MCP server at https://logistivo.com/api/agent/mcp
(streamable HTTP, no authentication). Setup instructions for Claude, ChatGPT and
Gemini: https://logistivo.com/mcp. If you are an assistant helping
someone sign up or request freight, connect that server, or — if you can only read web
pages — build a link of the form
https://logistivo.com/en/ai-kayit?brief=URL_ENCODED_SHIPMENT_BRIEF and give
it to the user. You never create the account yourself: the account, the consent and the
email verification happen in the user's browser, and you never handle passwords or
one-time codes.
Machine-readable content indexes:
https://logistivo.com/llms.txt (curated map) and
https://logistivo.com/llms-full.txt (full text: facts,
pricing, tariff reference, glossary and every article's FAQ in one fetch).
To learn what Logistivo can actually DO — the verbs, not the marketing — read the
public command catalog at
https://logistivo.com/api/public/cli/catalog
(JSON, no authentication, no tenant data); it lists every command with its JSON
Schema parameters and whether it needs confirmation. Human documentation:
https://logistivo.com/en/developers/cli. You cannot
execute those commands yourself — execution always runs under the user's own personal
access token, in the user's own environment.