⚓ 17,000+ Seaports · UN/LOCODE · Updated 2026

Port Code Lookup

Search the complete UN/LOCODE database of over 17,000 seaports and cargo ports worldwide. Find the exact 5-character port code for bills of lading, booking notes, and customs declarations in seconds.

Search UN/LOCODE Port Codes
Tip: try CNSHA, Shanghai, Rotterdam, or USLAX — click any row to copy the LOCODE.
LOCODE Port Name City Country Subdivision

Loading seaport database…

Showing 0 of 0 ports
1 / 1
Simple Process

How It Works

Look up the exact UN/LOCODE port code you need for ocean freight, customs, and bookings in three quick steps.

1

Type to Search

Enter a LOCODE (like CNSHA), port name, city, or 2-letter country code — results filter instantly as you type.

2

Browse the Table

Narrow results with the country dropdown, then page through thousands of seaports. Each row shows the LOCODE, port name, city, country, and subdivision.

3

Click to Copy

Click any row to copy the 5-character UN/LOCODE to your clipboard, ready to paste into your bill of lading, booking note, or customs document.

Why Use This Tool

Benefits of the Port Code Lookup

Built for freight forwarders, customs brokers, and shipping teams who handle ocean freight and need accurate UN/LOCODE port codes at their fingertips.

17,000+ Seaports

Covers every seaport and cargo port with a UN/LOCODE worldwide — from mega-ports to regional terminals — all in one searchable database.

Instant Filtering

Real-time search across LOCODEs, port names, cities, and countries — no page reloads, no waiting, just type and find.

One-Click Copy

Click any row to copy the LOCODE straight to your clipboard — perfect for filling bills of lading (B/L) and booking systems.

Verified & Free

Data sourced from the official UN/LOCODE database (UNECE). Free to use, no sign-up, no ads, and no data leaves your browser.

FAQ

Frequently Asked Questions

What is a UN/LOCODE port code?
A UN/LOCODE is a five-character code developed by the United Nations Economic Commission for Europe (UNECE) to identify trade and transport locations. For ports it combines the 2-letter ISO country code with a 3-letter location code — for example, CNSHA for the Port of Shanghai (CN = China, SHA = Shanghai), USLAX for Los Angeles, and NLRTM for Rotterdam.
How is a port LOCODE structured?
A UN/LOCODE is always 5 characters: the first 2 letters are the ISO 3166-1 alpha-2 country code (e.g., CN, US, DE), and the remaining 3 letters identify the specific location within that country (e.g., SHA, LAX, HAM). Reading the first two letters tells you the country immediately, which helps catch errors on shipping documents.
Where do I put the port code on a bill of lading?
On a Bill of Lading (B/L), the port of loading LOCODE goes in the "Port of Loading" field and the port of discharge LOCODE in the "Port of Discharge" field. Many carriers and customs systems also accept the LOCODE in the place-of-receipt and place-of-delivery fields. Using the correct UN/LOCODE ensures your cargo is routed to the right terminal and avoids customs delays.
How accurate is the port data?
The database is sourced directly from the UN/LOCODE Code List published by UNECE, the authoritative source for trade and transport location codes. It is updated periodically as new ports are added. For operational shipping, always confirm terminal-specific details with your carrier or freight forwarder, as a single LOCODE can cover multiple terminals.
What is the difference between a port code and a port name?
A port name is a human-readable label that can be spelled differently across languages (e.g., "Shanghai", "Shangai", "Shang-hai"). The UN/LOCODE is a single, unambiguous 5-character identifier that eliminates spelling confusion — every system worldwide interprets CNSHA the same way. That is why shipping documents, EDI messages, and customs filings use LOCODEs rather than names.

Your Complete UN/LOCODE Port Database

Shipping ocean freight requires the correct port code — the five-character UN/LOCODE that tells carriers, customs, and terminal operators exactly which port your cargo is moving through. Our free port code lookup puts the complete global database of over 17,000 seaports at your fingertips, searchable by LOCODE, port name, city, or country.

How UN/LOCODE Works for Ports

Every UN/LOCODE starts with a 2-letter country code followed by a 3-letter location code. For example, CNSHA breaks down as CN (China) + SHA (Shanghai), USLAX as US (United States) + LAX (Los Angeles), and NLRTM as NL (Netherlands) + RTM (Rotterdam). This structure lets you identify the country at a glance and makes the codes far less error-prone than port names, which vary by language and spelling.

Common Ocean Freight Port Codes

  • CNSHA — Port of Shanghai (world's busiest container port)
  • SGSIN — Port of Singapore (largest transshipment hub)
  • NLRTM — Port of Rotterdam (Europe's largest port)
  • USLAX — Port of Los Angeles (busiest US west coast port)
  • HKHKG — Port of Hong Kong (major Asian transshipment center)
  • DEHAM — Port of Hamburg (Germany's largest port)

How Freight Forwarders Use Port Codes

Every bill of lading, booking confirmation, and customs entry references the port of loading and port of discharge by UN/LOCODE. Getting a code wrong can route containers to the wrong country, trigger customs holds, or incur costly demurrage. Forwarders keep a reference list handy — and this tool replaces that printed list with a searchable database that is always up to date and free to use.

Subscribed Successfully

Thank you for subscribing to our Newsletter. We will send you the latest updates regularly.