/
FreightUtils.com

UN/LOCODE Lookup

Search 116,129+ transport locations worldwide. Seaports, airports, rail terminals, road terminals, and inland clearance depots.

Source: UNECE UN/LOCODE 2024-2 (PDDL)
Search Locations116,129 locations in database

What is UN/LOCODE?

UN/LOCODE (United Nations Code for Trade and Transport Locations) is a standardised code system for identifying ports, airports, rail terminals, and other transport-related locations worldwide. Each code consists of a 2-letter country code and a 3-character location code (e.g., GBLHR = London Heathrow, NLRTM = Rotterdam).

The codes are maintained by UNECE and used in international trade documents, customs declarations, bills of lading, and freight management systems. This database contains 116,129 locations across all countries.

Function types

Port โ€” Maritime port or harbour
Airport โ€” Civil or cargo airport
Rail โ€” Railway terminal or station
Road โ€” Road freight terminal
ICD โ€” Inland clearance depot (dry port)
Border โ€” Border crossing point
Postal โ€” Postal exchange office
Pipeline โ€” Fixed transport installation

How UN/LOCODE codes are structured

Each UN/LOCODE is exactly 5 characters: a 2-letter ISO 3166 country code followed by a 3-character location code. For example, GBLHR identifies London Heathrow in the United Kingdom, NLRTM identifies Rotterdam in the Netherlands, and CNSHA identifies Shanghai in China. The location code is typically derived from the location name but is not always intuitive โ€” some codes are assigned sequentially when the name-based abbreviation is already taken.

Common use cases in freight

UN/LOCODE codes appear throughout international trade documentation. They are used on bills of lading (port of loading, port of discharge), air waybills (airport of departure, airport of destination), customs declarations, booking requests, and shipping instructions. Transport management systems (TMS) and enterprise resource planning (ERP) systems use UN/LOCODE as the standard identifier for locations, enabling automated routing, rate calculation, and compliance checks. If you're building freight software, UN/LOCODE is the de facto standard for identifying transport locations programmatically.

Data coverage and updates

UNECE publishes updated UN/LOCODE editions twice per year (typically in spring and autumn). This database contains 116,129 entries from the 2024-2 edition, covering every country in the world. Not all entries have coordinates โ€” approximately 80% include latitude/longitude data. New locations are added continuously as countries submit updates to UNECE, and existing entries are corrected when errors are identified.

Relationship with other code systems

UN/LOCODE is complementary to other transport code systems. IATA airport codes (3-letter, e.g., LHR) and ICAO codes (4-letter, e.g., EGLL) identify airports specifically for the aviation industry. UN/LOCODE includes these airports but also covers seaports, rail terminals, and road hubs that IATA does not. In electronic customs declarations (such as the UK's CHIEF and CDS systems), UN/LOCODE is the required format for identifying ports of loading and discharge. Many freight management systems cross-reference UN/LOCODE with IATA codes to provide a unified location database.

REST API โ€” GET /api/unlocode

Search by name, code, country, or function type:

curl "https://www.freightutils.com/api/unlocode?q=rotterdam"
curl "https://www.freightutils.com/api/unlocode?code=NLRTM"
curl "https://www.freightutils.com/api/unlocode?country=GB&function=port&limit=50"
Related Tools
Airline Codes โ†’HS Code Lookup โ†’ADR Dangerous Goods โ†’

UN/LOCODE data from UNECE 2024-2 edition (PDDL). Coordinates are approximate. For official data, consult the UNECE Trade Facilitation website.