UN/LOCODE Lookup
Look up any UN/LOCODE to get coordinates, timezone, elevation, IATA codes, and nearby transport locations - instantly.
Paste anything. Get every format.
DD, DMS, UTM, MGRS, Plus Code, UN/LOCODE - converted instantly.
What is a UN/LOCODE?
UN/LOCODE (United Nations Code for Trade and Transport Locations) is an international standard maintained by UNECE (the United Nations Economic Commission for Europe) that assigns a unique five-character code to ports, airports, inland freight terminals, and other locations relevant to international trade. The directory covers over 100,000 locations across more than 240 countries and territories.
Why the official UN/LOCODE data is not enough
UNECE publishes the UN/LOCODE directory as flat CSV files, updated roughly twice per year. There is no official API, no structured query mechanism, and no timezone or elevation metadata. Roughly 20% of entries are missing geographic coordinates entirely, and the coordinate format used is a non-standard degrees-and-minutes notation that requires custom parsing.
Teams building logistics software, customs integrations, or supply chain analytics typically end up downloading the CSV, writing bespoke parsers, geocoding the missing entries with a third-party service, and bolting on timezone lookups from yet another source. This pipeline is fragile, expensive to maintain, and breaks with every UNECE release cycle.
How Unlocoder fills the gap
Unlocoder maintains an enriched copy of the full UN/LOCODE directory - over 100,000 locations across 240+ countries - with the following additions on top of the raw UNECE data. Try any code in the lookup above to see a live comparison.
- Multi-source coordinate validation - every coordinate is cross-referenced against multiple independent, authoritative geospatial datasets daily, not just when UNECE publishes its biannual update
- Port-specific coordinates - seaport locations are sourced from official maritime authority data, giving you actual berth and terminal positions rather than city-centre approximations
- Airport-specific coordinates - airport locations use precise aeronautical coordinate data for the facility itself, matched by IATA code where available
- Broad geographic validation - all remaining locations are validated against multiple independent geographic databases, each maintained by separate international communities
-
IANA timezone - each location is mapped to its
IANA timezone identifier (e.g.,
America/New_York), with real-time UTC offset and local time calculation - Elevation - metres above sea level for every resolved location
- Spatial queries - find the nearest UN/LOCODEs to any coordinate, useful for identifying the closest port or terminal to a vessel position or warehouse
- Confidence scoring - every enriched coordinate carries a confidence score (0-1) reflecting the specificity and authority of its source, so consuming systems can assess data quality programmatically
- Daily enrichment pipeline - coordinates are re-validated every day across all independent sources, catching corrections and improvements between UNECE release cycles
- Redundant sourcing - no single external dataset is a point of failure. If any one source becomes unavailable, coverage is maintained by the others
UN/LOCODE reference
Code structure
Every UN/LOCODE follows the same five-character pattern:
The country code is the ISO 3166-1 alpha-2 code. The location code is a three-character identifier assigned by the national authority.
Function codes
Each entry includes function codes indicating transport activity:
- 1 - Seaport
- 2 - Rail terminal
- 3 - Road terminal
- 4 - Airport
- 5 - Postal exchange office
- 6 - Multimodal / inland clearance depot (ICD)
- 7 - Fixed transport installation (pipeline, cable)
- B - Border crossing
A single location can have multiple function codes. For example,
GBLON carries functions 1, 2, 3, 4, 5 - indicating it
serves as a seaport, rail terminal, road terminal, airport hub, and
postal exchange.
Common uses
- Bills of lading and customs declarations - UN/LOCODEs identify the port of loading, port of discharge, and place of delivery on virtually every international shipment
- Trade documentation - commercial invoices, certificates of origin, and letters of credit reference locations by their UN/LOCODE
- Supply chain software - ERP, TMS, and WMS platforms use UN/LOCODEs as the canonical location identifier
- Customs and border agencies - electronic customs filings (AES, AMS, ICS) worldwide require UN/LOCODEs
- Vessel tracking and AIS - port call and destination fields map to UN/LOCODEs
Worked example: looking up a UN/LOCODE
You receive a bill of lading listing NLRTM as the port
of discharge. Paste it into the converter above to retrieve:
Reverse lookup
You can also work in reverse: paste any set of coordinates and the tool will show you the closest UN/LOCODEs to that position, ranked by distance. This is useful when you need to identify the nearest port or terminal to a vessel position, warehouse, or factory.
Common pitfalls
Codes are not always intuitive. While many codes
are mnemonic (GBLON for London, USNYC
for New York), others are not. Always verify against the UNECE
directory rather than guessing the three-character location code.
Multiple codes for one city. Large metropolitan
areas may have dozens of UN/LOCODEs - one per port, terminal, or
facility. London alone has separate codes for Tilbury
(GBTIL), Heathrow (GBLHR), Gatwick
(GBLGW), and many others.
Coordinate precision varies. The coordinates in the UNECE directory are often rounded to the nearest arc-minute (~1.8km). They indicate the general area, not the exact position of a dock or runway. For precise navigation, verify against detailed port charts.
UN/LOCODE API - endpoints and examples
The Unlocoder API provides three endpoints for working with UN/LOCODE data programmatically. All endpoints return JSON and are available via RapidAPI.
1. Look up a UN/LOCODE
Retrieve enriched data for a specific code. Accepts the standard
five-character format (GBLON) or split format
(GB/LON).
2. Find nearby UN/LOCODEs
Given a latitude and longitude, find the closest UN/LOCODE locations. Returns up to three results with distance in kilometres.
3. Convert any coordinate (with UN/LOCODE context)
The general conversion endpoint also returns UN/LOCODE context. Send any coordinate format or a UN/LOCODE string, and get back every format plus timezone, elevation, and nearby locations.
Use cases for UN/LOCODE API access
- Freight and logistics platforms - resolve port codes to coordinates and timezones for ETA calculations and schedule coordination
- Customs and trade compliance - validate UN/LOCODEs in electronic customs filings and enrich them with geographic context
- Maritime and vessel tracking - match vessel positions to the nearest port or terminal using spatial queries
- Supply chain analytics - normalise location data across systems that reference ports by different identifiers
- AI and LLM agents - connect via MCP to give AI tools direct access to trade location intelligence without HTTP plumbing
Frequently asked questions
What is a UN/LOCODE?
A UN/LOCODE is a five-character code that identifies ports, airports, inland freight terminals, and other transport-related locations worldwide. The first two characters are the ISO country code (e.g., GB for United Kingdom) and the last three identify the specific location (e.g., LON for London), giving GBLON.
How many UN/LOCODEs are there?
The directory contains over 100,000 locations across more than 240 countries and territories. It is maintained by UNECE and updated several times per year as new trade locations are added.
How do I find the UN/LOCODE for a location?
Type a UN/LOCODE directly into the converter above (e.g., GBLON for London) to look up its coordinates, timezone, and nearby locations. If you have coordinates instead, paste them in and the converter will show the nearest UN/LOCODEs to that position.
What information does a UN/LOCODE contain?
A UN/LOCODE itself is a five-character identifier, but the directory associates each code with a location name, country, subdivision, geographic coordinates, and function codes indicating whether the location is a port, airport, rail terminal, or other type of transport hub.
Is there a UN/LOCODE API?
UNECE does not provide an official API for the UN/LOCODE directory. Unlocoder offers a REST API with dedicated endpoints for code lookup, timezone resolution, and nearby location search. It is available on RapidAPI with a free tier of 500 requests per month. An MCP connection is also available for AI agent integration.
How do I get the timezone for a UN/LOCODE?
The raw UNECE data does not include timezone information.
Unlocoder enriches every UN/LOCODE with its IANA timezone
identifier (e.g., Europe/London), current UTC offset, and
local time. You can look up any code on this page or query the
API endpoint at GET /unlocodes/GBLON to receive
the timezone data in the response.
Why are some UN/LOCODEs missing coordinates?
Approximately 20% of entries in the official UNECE directory do not have geographic coordinates. This is because codes are often registered before their coordinates are surveyed, or the original submissions omitted location data. Unlocoder resolves these missing coordinates using authoritative geospatial sources and attaches a confidence score to each enriched value.
How often is the UN/LOCODE data updated?
Unlocoder runs a daily enrichment pipeline that re-validates coordinates and metadata against multiple independent geospatial sources. The base UN/LOCODE registry is synced with every biannual UNECE release, but coordinates and enrichment data are refreshed every day. This means corrections, improvements, and newly surveyed locations are picked up between UNECE release cycles - not just twice a year.
How accurate are Unlocoder's coordinates?
Unlocoder cross-references coordinates against multiple independent authoritative datasets. Port locations are sourced from official maritime authority data, giving actual terminal coordinates rather than city-centre approximations. Airport locations use aeronautical facility data matched by IATA code. All other locations are validated against multiple geographic databases. Every enriched coordinate carries a confidence score on a 0-1 scale, reflecting the specificity and authority of its source. The raw UNECE data uses arc-minute precision (roughly 1.8km); Unlocoder improves this to sub-kilometre accuracy for most entries.