1001Ferramentas
✈️Validators

IATA Airport Code Validator

Validate IATA airport code format: 3 uppercase letters (GRU, JFK, CDG). Format check and common examples.

IATA codes: the commercial language of global aviation

The IATA code system is maintained by the International Air Transport Association (Geneva, founded 1945), the trade body that represents roughly 290 airlines responsible for over 80 percent of worldwide scheduled traffic. Whenever you scan a boarding pass, read a baggage tag, look at a flight number on a screen at the gate or check a fare on an OTA, you are interacting with codes from one of four IATA families: airport, airline, aircraft type and city.

Unlike ICAO codes, which serve regulatory and air traffic control purposes, IATA codes are designed for commercial use: they are short, easy to print on a tag and easy to read out loud at a gate. That trade-off — brevity over uniqueness — explains why some letter combinations had to be recycled or shifted as the industry grew.

Airport codes: 3 letters that move 4 billion passengers a year

IATA airport codes are three uppercase letters: GIG Galeão (Rio de Janeiro), GRU Guarulhos (São Paulo), BSB Brasília, CGH Congonhas, SDU Santos Dumont, CWB Curitiba, POA Porto Alegre, FOR Fortaleza, REC Recife, NAT Natal, BEL Belém. Outside Brazil: JFK John F. Kennedy NYC, LHR London Heathrow, CDG Paris Charles de Gaulle, DXB Dubai, HND Tokyo Haneda, SYD Sydney.

Many codes are easy to remember because they reflect the city or airport name: BSB = Brasília, LHR = London Heathrow. Others are historical leftovers: ORD for Chicago O'Hare comes from Orchard Field, the airport's pre-1949 name. MCO Orlando comes from McCoy Air Force Base. These quirks make a lookup table mandatory for a true validator — regex alone cannot tell GRU (real) from XYZ (unassigned).

Airline 2-letter designators

Airline IATA codes are two characters (letters or letter+digit): LA LATAM, G3 Gol, AD Azul, AA American Airlines, BA British Airways, AF Air France, LH Lufthansa, EK Emirates, QR Qatar Airways, SQ Singapore Airlines, JL JAL, NH ANA, QF Qantas, AZ the old Alitalia (replaced by AZ ITA Airways). A flight number such as LA8084 means LATAM flight 8084.

Aircraft type codes (3 alphanumeric chars)

Less visible to passengers, the IATA aircraft type code is three alphanumeric characters used in schedule and ticketing systems: 738 Boeing 737-800, 739 737-900, 320 Airbus A320, 321 A321, 359 A350-900, 77W 777-300ER, 788 787-8, 789 787-9. Tickets and GDS schedules use these instead of the manufacturer's full marketing designation.

City codes vs airport codes

When a city has more than one airport, IATA also assigns a metropolitan area code that groups them: NYC (covering JFK, LGA, EWR), LON (LHR, LGW, STN, LCY, LTN, SEN), BUE Buenos Aires (EZE and AEP), WAS Washington (IAD, DCA, BWI), TYO Tokyo (HND and NRT), MIL Milan (MXP, LIN, BGY). In Brazil, São Paulo uses SAO (GRU, CGH, VCP) and Rio uses RIO (GIG, SDU). Booking engines accept the city code to search every nearby airport at once.

Where IATA codes show up in real systems

  • Global Distribution Systems (GDS): Sabre, Amadeus and Travelport price and book using IATA codes exclusively.
  • Boarding passes: BCBP (Bar Coded Boarding Pass) format encodes origin, destination, airline and flight number in IATA codes.
  • Baggage tags: the 10-digit license-plate number is paired with origin IATA, the routing IATA list and the destination IATA so any sortation system can route a bag through interline transfers.
  • Flight schedules and OAG: schedule data is published using IATA airport and airline designators.
  • OTAs and aggregators: Skyscanner, Kayak, Google Flights, Decolar — all use IATA codes in URLs and APIs.

Validation strategy: regex plus lookup table

Because IATA codes are short, almost every combination is grammatically valid. A robust validator needs two passes:

  • Shape check: 3 letters A-Z for airport/city, 2 alphanumeric for airlines, 3 alphanumeric for aircraft types.
  • Lookup: query an authoritative dataset. The classic open source is the OpenFlights airports.dat (around 7 700 airports), supplemented by community-maintained lists for airline and aircraft codes. IATA also publishes the codes via iata.org/codes, but bulk access requires a paid subscription.

IATA vs ICAO: a side-by-side comparison

IATA is a trade association running a commercial code system; ICAO is a UN agency running a regulatory technical system. Airport IATA = 3 letters (commercial, on tickets and tags); airport ICAO = 4 letters with a geographic prefix (SBGR, KJFK, used in flight plans and ATC). Airline IATA = 2 chars on tickets and reservations; airline ICAO = 3-letter callsign used by air traffic control (TAM LATAM Brasil callsign maps to IATA LA). Small untowered airports often have an ICAO code but no IATA code.

Pitfalls: recycled codes, newcomers and discontinued airlines

When an airline goes out of business or merges, its IATA code can be reassigned after a quarantine period. NW, the old Northwest Airlines, was absorbed by Delta and the code returned to the pool. NK went from Spirit Airlines (US) reuses; some codes change meaning over decades. Newcomer carriers — TR Scoot (post-Tigerair merger), GA Garuda Indonesia, 2W Welcome Air — illustrate how the 2-character namespace had to expand by allowing alphanumerics. This is why a validator that only checks letters will mark G3 Gol as invalid, even though it is a real airline code.

FAQ

Is an IATA airport code always 3 letters?

Yes. The IATA airport standard is strictly 3 uppercase letters A-Z; no digits, no punctuation. Anything longer or shorter is not an airport IATA code.

Why are airline codes only 2 characters?

Two characters fit on legacy ticket stock and CRT screens from the 1960s. To preserve namespace as more carriers joined, IATA started allowing one letter plus one digit (G3, 2W, 4M), expanding from 676 combinations to thousands.

Where can I find the full list of IATA codes?

For airports, the OpenFlights project on GitHub (airports.dat) is the most-used free dataset. For airlines and aircraft, community lists on Wikipedia are usually accurate enough. The authoritative source is the IATA Codes Directory, which is a paid product.

Why is my city code rejected as an airport code?

Because SAO, RIO, NYC, LON are metropolitan area codes, not airport codes. They group several airports for booking and are not valid for boarding pass origin/destination fields, which require the specific airport.

Does this validator hit the IATA database in real time?

No. The check runs locally against a snapshot of known codes for shape and basic lookup. Real-time validation against the official IATA directory requires a paid subscription. For production use, sync your lookup table from OpenFlights periodically.

Related Tools