Squawk codes explained. What aircraft transponder squawk codes are, how the 4-digit octal system works, the emergency codes 7500/7600/7700, special and conspicuity codes, and how to read live squawk data through a flight tracking API.
A squawk code is a four-digit number that an aircraft's transponder transmits to identify itself to air traffic control radar. When a controller says "squawk 4271," the pilot enters 4271 into the transponder, and from that moment the aircraft's radar return is tagged with that code — letting the controller distinguish it from every other aircraft on the screen.
The word "squawk" is a piece of aviation slang with a real history. During the Second World War, the British IFF (Identification Friend or Foe) system that evolved into the modern transponder was code-named "Parrot." Instructing a crew to activate it became "squawk your parrot," and the verb stuck. Today, to "squawk" a code simply means to set it on the transponder.
The squawk code is part of the secondary surveillance radar (SSR) system. Primary radar bounces a signal off the aircraft's skin to detect it; secondary radar interrogates the aircraft's transponder, which replies with its assigned squawk code and, in more advanced modes, altitude and identity. The squawk code is what ties a blip on the radar to a specific, identified flight — the controller assigns a unique code to each aircraft in their airspace, and the radar display labels each return accordingly.
For developers working with live flight data, the squawk code appears as a field in the aircraft's real-time state. The AirLabs Real-Time Flights API includes a squawk field carrying the current code each aircraft is transmitting, alongside its position, altitude and identity. This guide explains what those codes mean — the four-digit octal system, the emergency codes, the special-purpose codes — and how to read the squawk field in live data.
"A squawk code is how an aircraft says 'this blip is me' to radar. Four digits, set by the pilot at the controller's instruction. Most of the time it is a routine tracking tag — but a handful of codes carry urgent meaning, and reading them correctly is the difference between noise and signal."
Squawk codes look like ordinary four-digit numbers, but they follow a specific rule that often surprises newcomers: each digit can only be 0 through 7. There is no 8 or 9 in any squawk code.
This is because the transponder system is octal — base 8. Each of the four positions represents three binary bits, and three bits can encode eight values (0–7). Four octal digits therefore give 8 × 8 × 8 × 8 = 4,096 possible codes, from 0000 to 7777. This is why you will never see a squawk code like 4829 or 1290 — those contain digits outside the octal range and cannot exist.
The 4,096-code space is divided up and managed so that controllers can assign codes without collisions. In practice:
Because the pool is finite, codes are reused: once a flight lands or leaves a sector, its code returns to the pool for another aircraft. This is why a squawk code identifies an aircraft only within a given airspace at a given time — the same 4271 might be used by a different aircraft in a different region simultaneously. The squawk code is a local tracking tag, not a permanent identifier like the ICAO 24-bit hex address.
Among the 4,096 codes, three are reserved worldwide as emergency codes, and they are the most important codes for anyone reading flight data to recognize. Each signals a specific kind of emergency the instant the pilot sets it, even before any radio call.
| Code | Meaning | Situation |
| 7500 | Unlawful interference | Hijacking — the aircraft has been seized |
| 7600 | Radio failure | Lost communications — the radio is not working |
| 7700 | General emergency | Any emergency — mechanical, medical, fuel, etc. |
A common mnemonic helps pilots and controllers remember them: "7500 — taken alive (hijack); 7600 — can't talk no more (radio); 7700 — going to heaven (emergency)." The moment any of these is set, the aircraft's radar return is flagged on the controller's screen with the corresponding alert, and the appropriate response is triggered.
These codes are globally standardized by ICAO, which is why they matter for data consumers: a squawk value of 7500, 7600 or 7700 in a live feed has the same meaning anywhere in the world. An application monitoring live flight data can recognize these values and flag the aircraft accordingly — though, as discussed below, with appropriate caution about why a code might appear.
The 7700 general emergency code is the most frequently seen of the three. It covers everything from engine trouble and pressurization problems to medical emergencies on board, and pilots are trained to squawk 7700 whenever they need priority handling. 7600 appears when an aircraft loses radio contact but is otherwise flying normally. 7500 is, thankfully, extremely rare.
Beyond the three emergency codes, several other codes carry reserved meanings. These are "conspicuity" codes — default codes used when no discrete code has been individually assigned to an aircraft — and special-purpose codes.
The most common is 1200 (in North America) or 7000 (in Europe and many other regions), the VFR conspicuity code. An aircraft flying under Visual Flight Rules, not receiving a discrete code from ATC, sets the regional VFR code so it still shows up on radar as a known, non-discrete target. Seeing 1200 or 7000 in data usually indicates general aviation operating under VFR rather than a controlled IFR flight with an individually assigned code.
Other reserved codes exist for specific purposes that vary by country and airspace — codes for military operations, for aircraft operating without a transponder code assignment, and for particular procedures. The exact allocations are governed by national aviation authorities and ICAO regional agreements, so a given non-emergency code's precise meaning can depend on where the aircraft is flying.
For a data consumer, the practical takeaway is that the emergency codes (7500/7600/7700) are universal and unambiguous, while many other reserved codes are regional. An application can confidently attach meaning to the emergency codes worldwide, but should be careful about over-interpreting other specific values without accounting for the airspace.
Squawk codes are part of a layered transponder system, and it helps to understand where they sit relative to the other identifiers an aircraft transmits — particularly because a modern aircraft broadcasts several at once.
The classic squawk code comes from Mode A, the oldest transponder mode, which transmits only the four-digit identity code. Mode C added altitude reporting alongside the squawk. Mode S (Select) added a permanent, unique 24-bit address for each airframe and the ability to address aircraft individually — this is the ICAO 24-bit hex address that appears as the hex field in flight data. ADS-B, described in our ADS-B guide, builds on Mode S to broadcast GPS-derived position continuously.
The key distinction is permanence:
This is why both fields appear in live flight data and serve different roles. The hex reliably identifies which aircraft this is, across all of its flights. The squawk tells you what code it is currently transmitting — useful for spotting emergency codes and understanding the aircraft's current ATC context, but not a stable identifier. Reading them together gives the full picture: a permanent identity plus the current operational tag.
The AirLabs Real-Time Flights API delivers the live state of aircraft, and the squawk field carries the current code each aircraft is transmitting. A single request returns the squawk alongside position, identity and route:
GET https://airlabs.co/api/v9/flights?airline_iata=FM&_fields=flight_iata,hex,squawk,lat,lng,alt,status&api_key={KEY}
[{
"hex": "780695",
"flight_iata": "FM9429",
"squawk": "0205",
"lat": 28.397377,
"lng": 115.1008,
"alt": 7078,
"status": "en-route"
}]
Here the aircraft is transmitting squawk 0205 — a routine assigned tracking code, well within the octal range. The squawk field sits next to the permanent hex identifier and the live position, so an application can display or process the current code in the context of which aircraft it belongs to and where it is.
It is worth being precise about the boundary of what the API provides. AirLabs delivers the squawk code as a data field sourced from the aircraft's transponder signal. It does not assign squawk codes — that is the role of air traffic control — and it does not interpret a code's meaning for you. The API gives you the value; your application decides what to do with it, applying the standard meanings described in this guide. This is the honest division of labor: the data layer reports the code, the application layer interprets it.
One natural use of the squawk field is watching for the emergency codes. Because 7500, 7600 and 7700 are globally standardized, an application consuming the Real-Time Flights feed can check each aircraft's squawk value against these and flag matches.
The pattern is straightforward: pull live flights — optionally constrained to a region with the bbox parameter or to a fleet with airline_iata — and inspect the squawk field of each. A value of 7700 indicates an aircraft declaring a general emergency; 7600, lost radio; 7500, unlawful interference.
There is an important caveat to apply, however, and a responsible application accounts for it. Emergency squawk codes occasionally appear transiently and accidentally — a pilot can momentarily pass through 7500 or 7700 while dialing to another code, since the transponder steps through intermediate values. A single snapshot showing 7700 does not always mean a genuine emergency. Robust monitoring therefore confirms that an emergency code persists across multiple updates before treating it as real, rather than alerting on a one-off reading. The updated timestamp in the response helps here, letting you track whether a code is sustained.
This is also a reason to present emergency-code information carefully to end users rather than raising dramatic alarms on a single data point. The data is accurate about what the transponder is transmitting; the interpretation requires judgment.
The squawk field, read from live flight data, supports several kinds of applications:
Tracking applications that show detailed aircraft information can display the current squawk code as part of an aircraft's data panel, giving aviation-aware users the same context a controller sees — including highlighting recognized special codes.
Operations dashboards and aviation-monitoring tools can watch the squawk field across a region or fleet for the emergency codes, surfacing aircraft that are declaring emergencies, with the persistence checks described above to avoid false positives.
Researchers and enthusiasts studying airspace activity use squawk data alongside position and identity to analyze ATC operations, VFR versus IFR traffic patterns (via conspicuity codes), and airspace usage. Combined with the Fleets Database for aircraft details, this supports rich analytical and educational projects.
For any application displaying an aircraft's live state, the squawk code adds operational context to the position and identity — distinguishing, for instance, a VFR general-aviation flight on a conspicuity code from a controlled flight on a discrete assigned code.
A few patterns help when building features on the squawk field:
hex — pair the temporary squawk with the permanent ICAO 24-bit hex so you always know which aircraft a code belongs to.bbox for regional monitoring — when watching for emergency codes in an area, constrain the feed to a bounding box rather than scanning the global feed.flight_iata,hex,squawk,status) via _fields to keep responses compact.If you are building a flight tracking application, an airspace-monitoring tool or any system that needs the operational context of aircraft, the AirLabs API provides the live squawk code alongside position, altitude, identity and route — through a single REST endpoint.
Our Developer API allows you to create a custom experience for your users and increase the value of your product:
squawk field alongside position, altitude, speed, heading and identity.hex and registration fields to pair the temporary squawk with a permanent aircraft identity._fields and array view via _view to keep responses efficient.You can try it right now without any obligation! Get a free flight API plan and see for yourself that we have exactly the data you need!
If you need more information, don't hesitate to contact us. We are always happy to chat with our customers and are sure to find a customized solution for each request.
Explore AirLabs, or create an account instantly and start using API.
Get FREE API Key