Scanbot SDK has been acquired by Apryse! Learn more

Learn more
Skip to content

Boarding pass scanner: How to scan and parse the PDF417 code on flight tickets 

Johanna September 5, 2025 14 mins read
Turn smartphones into boarding pass scanners

Boarding passes contain vital passenger and flight information. They display this data both as human-readable text and encoded in a barcode for efficient processing.  

In this article, we will explore the Bar-Coded Boarding Pass (BCBP) standard for universal electronic encoding of flight information – and the challenges of scanning BCBP barcodes.  

We will also look at how modern mobile solutions overcome these challenges, and how to build a boarding pass scanner app yourself in minutes. 

What data does a boarding pass contain? 

A boarding pass usually contains both mandatory travel information and optional passenger and flight details. To speed up airport workflows, the data is encoded in a barcode, in addition to being given as text.  

The following mandatory data is required by international standards and is present on nearly all boarding passes: 

  • Passenger name (first and last) 
  • Date of flight 
  • Airline/carrier name 
  • Flight number 
  • Scheduled departure time 
  • Cabin/class of travel  
  • From/to cities or airport codes 
  • Seat number 
  • Ticket type identifier  
  • Gate or terminal number 
  • Operating carrier 

If their operative needs justify it, airlines may include further optional details, such as: 

  • Sequence number 
  • Booking reference (PNR) 
  • E-ticket number 
  • Agent type 
  • Gate close time 
  • Frequent flyer number and tier 
  • Special remarks 
  • Additional travel information 

Barcoded information on boarding passes: the IATA’s BCBP standard 

The barcodes on boarding passes exist mainly to speed up check-in and boarding processes by allowing quick and accurate scanning of passenger and flight information. Additionally, they are a security measure, as they can be used to verify authorized passengers. 

The International Air Transport Association (IATA) developed an international airline industry standard for encoding passenger and flight information: the Bar-Coded Boarding Pass (BCBP).  

The IATA’s main goal was to provide a unified, industry-wide format for electronically encoding passenger and flight data on boarding passes. For that reason, it specifies the following aspects: 

  • Barcode format: The BCBP standard primarily uses the PDF417 symbology for printed barcodes. For mobile boarding passes, Aztec, QR Code, and Data Matrix can be used.  
  • Encoded data: The standard specifies the mandatory passenger, flight, and booking information. It also allows for optional security and operational data, as outlined above. 
  • Interoperability: Thanks to the BCBP standard, combined with advances such as mobile barcode scanners, barcodes are easily readable anywhere, anytime. Fast boarding pass processing facilitates interline journeys, self-service at gates, and even airport shopping. 
  • Adoption: Since 2010, compliance has been mandatory for IATA members, resulting in some 350 airlines using the standard. 

Let’s next take a closer look at the PDF417 symbology, the primary standard for printed barcodes on boarding passes. 

About PDF417 

PDF417 is a two-dimensional (2D) stacked barcode symbology. It’s capable of encoding large amounts of data in a compact space.  

Its special design is made up of multiple stacked rows of characters encoding data. Each character is represented by a pattern of four bars and four spaces arranged over 17 modules, hence the name. 

boarding pass scanner PDF417

Thanks to its high data density, PDF417 is well-suited for applications such as driver’s licenses and airline boarding passes that require storing large amounts of different information. 

But how do you scan a boarding pass barcode and decode its data? 

How to scan a boarding pass: barcode parsing 

Barcodes store data in a compact, machine-readable format. Some barcodes, especially 2D barcodes such as PDF417, can store multiple data elements. Boarding pass barcodes can contain more than a dozen pieces of information, including passenger name and date of flight.  

A barcode scanner extracts these data elements and converts them into a single long string. Although this string is technically human-readable, it needs further processing to be more easily decipherable – with a method called parsing

Parsing is the process of analyzing and converting this string of symbols into a structured, meaningful, and readable format. This format can be easily understood and processed by both computers and or humans. 

Not all barcode scanners are capable of parsing the BCBP standard, which is why boarding pass scanning requires specialized solutions. Usually, these scanners use cameras, including smartphones’, and appropriate barcode scanning software

Challenges of scanning airline tickets 

Boarding passes – both print and mobile – are affected by environmental conditions and physical wear. Boarding pass scanners therefore have to be able to handle a number of practical challenges. 

  • Data-dense barcodes: Its high data density is one of PDF417’s advantages, but it also requires high resolution for scanning. A barcode scanner needs image-enhancing features to deal with low-resolution printing. It should also support the mobile boarding pass symbologies. 
  • Damaged boarding passes: Paper passes are prone to ripping or scratching, resulting in damaged barcodes. They can also become wet or dirty.  
  • Poor printing: Home-printed tickets may suffer from a multitude of quality issues, from low resolution to ink bleed. 
  • Glare: As airline-printed boarding passes typically use top-coated thermal paper for durability and print quality, strong lighting can cause reflections and scan errors. Smartphone displays present similar issues, and often require passengers to adapt their screen brightness.
  • Fast-paced environment: Long boarding lines can cause serious issues at airports. Boarding pass scanning must be fast and seamless to prevent long queues. Dedicated, fixed scanning hardware presents a bottleneck.

Traditional barcode scanners often underperform in the face of these challenges. Airports and airlines are seeking a modern solution that scans and parses all barcodes fast and accurately, even in challenging conditions. 

Such a solution is close at hand. 

Use a mobile boarding pass scanner to automate workflows 

Thanks to their advanced image processing capabilities and their ability to run modern barcode scanner software, ordinary smart devices can easily be turned into fast and accurate boarding pass scanners.  

Smartphones are progressively replacing expensive dedicated scanners across all industries. Partly, this is because they deliver reliable scanning, but they are also enormously versatile.  

Mobile scanner devices can be used beyond the gate and be used as mobile service desks and for disruption management. This speeds up processes, improves the passenger experience, and overall efficiency. 

Key benefits of mobile boarding pass scanning 

Mobile barcode scanners are more flexible than their traditional counterparts and perform faster and more accurately. 

By streamlining airport operations, they deliver the following benefits:  

  • Operational efficiency: Faster processing of boarding passes reduces bottlenecks. 
  • Passenger convenience: Shorter queues and wait times reduce stress and fears of missing the flight. 
  • Cost savings & scalability: Modern dedicated hardware may perform well, but has a high total cost of ownership (TCO) and  can only be used for one purpose. Smartphones and tablets are relatively inexpensive, reliably scan barcodes on boarding passes, and can also be used for luggage handling and for communication. 

How to build a boarding pass scanner app in minutes

If you want to build your own boarding pass scanner and parser app in just a few minutes, you can do so thanks to the Web Barcode Scanner SDK and its Ready-to-Use UI Components.

First, create an index.html with some boilerplate code.

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta
            name="viewport"
            content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
        />
        <title>Web Boarding Pass Scanner & Parser</title>
    </head>
    <body>    
    </body>
</html>

To set up your barcode scanner, do the following first:

  1. Create a button that calls up the scanning interface when clicked.
  2. Include a <p> element on the page for displaying the scanning result.
  3. Import the Scanbot Web SDK using a CDN.
  4. Check whether scanned barcodes are boarding passes.

The result will look something like this:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta
            name="viewport"
            content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
        />
        <title>Web Boarding Pass Scanner & Parser</title>
    </head>

    <body style="margin: 0">
        <button id="start-scanning">Start scanning</button>
        <p id="result"></p>
        <script type="module">
            import "https://cdn.jsdelivr.net/npm/scanbot-web-sdk@7.0.0/bundle/ScanbotSDK.ui2.min.js";
            const sdk = await ScanbotSDK.initialize({
                enginePath:
                    "https://cdn.jsdelivr.net/npm/scanbot-web-sdk@7.0.0/bundle/bin/barcode-scanner/",
            });
            document
                .getElementById("start-scanning")
                .addEventListener("click", async () => {
                    const config = new ScanbotSDK.UI.Config.BarcodeScannerScreenConfiguration();
                    const result = await ScanbotSDK.UI.createBarcodeScanner(config);
                    const resultElement = document.getElementById("result");
                    resultElement.innerHTML = '';

                    const scannedBarcode = result?.items?.[0]?.barcode;
                    if (!scannedBarcode || scannedBarcode.extractedDocument?.type?.name !== "BoardingPass") {
                        resultElement.innerText = "Scan canceled or no boarding pass was detected.";
                        return;
                    }
                });
        </script>
    </body>
</html>

Now you can extract the data encoded in the boarding pass barcode. Start by using the SDK’s built-in accessors.

const boardingPass = new ScanbotSDK.Config.BoardingPass(scannedBarcode.extractedDocument);

// Extract information directly accessible via the SDK's API
const isElectronicTicket = boardingPass.electronicTicket;
const passengerName = boardingPass.name;
const numberOfLegs = boardingPass.numberOfLegs;

Then try to extract additional information like the flight number and the departure and destination airport codes.

// Search fields for extracting further information
const fields = boardingPass.document.children[0].fields;
const operatingCarrierDesignator = boardingPass.document.children[0].fields.find(field => field.type?.name === "OperatingCarrierDesignator");
const flightNumber = fields.find(field => field.type?.name === "FlightNumber");
const departureAirportCode = fields.find(field => field.type?.name === "DepartureAirportCode");
const destinationAirportCode = fields.find(field => field.type?.name === "DestinationAirportCode");
const seatNumber = fields.find(field => field.type?.name === "SeatNumber");

Finally, display the results on the page.

const extractedData = {
    "Is electronic ticket": isElectronicTicket?.value?.text || "N/A",
    "Passenger name": passengerName?.value?.text || "N/A",
    "Number of legs": numberOfLegs?.value?.text || "N/A",
    "Operating carrier": operatingCarrierDesignator?.value?.text || "N/A",
    "Flight number": flightNumber?.value?.text || "N/A",
    "Departure airport": departureAirportCode?.value?.text || "N/A",
    "Destination airport": destinationAirportCode?.value?.text || "N/A",
    "Seat number": seatNumber?.value?.text || "N/A"
};

let output = "<h2>Boarding pass details:</h2>";
output += "<ul>";
for (const [key, value] of Object.entries(extractedData)) {
    output += `<li><b>${key}:</b> ${value}</li>`;
}
output += "</ul>";
resultElement.innerHTML = output;
});

Your final index.html will look like this:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta
            name="viewport"
            content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
        />
        <title>Web Boarding Pass Scanner & Parser</title>
    </head>

    <body style="margin: 0">
        <button id="start-scanning">Start scanning</button>
        <p id="result"></p>
        <script type="module">
            import "https://cdn.jsdelivr.net/npm/scanbot-web-sdk@7.0.0/bundle/ScanbotSDK.ui2.min.js";
            const sdk = await ScanbotSDK.initialize({
                enginePath:
                    "https://cdn.jsdelivr.net/npm/scanbot-web-sdk@7.0.0/bundle/bin/barcode-scanner/",
            });
            document
                .getElementById("start-scanning")
                .addEventListener("click", async () => {
                    const config = new ScanbotSDK.UI.Config.BarcodeScannerScreenConfiguration();
                    const result = await ScanbotSDK.UI.createBarcodeScanner(config);
                    const resultElement = document.getElementById("result");
                    resultElement.innerHTML = '';

                    const scannedBarcode = result?.items?.[0]?.barcode;
                    if (!scannedBarcode || scannedBarcode.extractedDocument?.type?.name !== "BoardingPass") {
                        resultElement.innerText = "Scan canceled or no boarding pass was detected.";
                        return;
                    }

                    const boardingPass = new ScanbotSDK.Config.BoardingPass(scannedBarcode.extractedDocument);

                    // Extract information directly accessible via the SDK's API
                    const isElectronicTicket = boardingPass.electronicTicket;
                    const passengerName = boardingPass.name;
                    const numberOfLegs = boardingPass.numberOfLegs;

                    // Search fields for extracting further information
                    const fields = boardingPass.document.children[0].fields;
                    const operatingCarrierDesignator = boardingPass.document.children[0].fields.find(field => field.type?.name === "OperatingCarrierDesignator");
                    const flightNumber = fields.find(field => field.type?.name === "FlightNumber");
                    const departureAirportCode = fields.find(field => field.type?.name === "DepartureAirportCode");
                    const destinationAirportCode = fields.find(field => field.type?.name === "DestinationAirportCode");
                    const seatNumber = fields.find(field => field.type?.name === "SeatNumber");

                    // Display the extracted data on the page:
                    const extractedData = {
                        "Is electronic ticket": isElectronicTicket?.value?.text || "N/A",
                        "Passenger name": passengerName?.value?.text || "N/A",
                        "Number of legs": numberOfLegs?.value?.text || "N/A",
                        "Operating carrier": operatingCarrierDesignator?.value?.text || "N/A",
                        "Flight number": flightNumber?.value?.text || "N/A",
                        "Departure airport": departureAirportCode?.value?.text || "N/A",
                        "Destination airport": destinationAirportCode?.value?.text || "N/A",
                        "Seat number": seatNumber?.value?.text || "N/A"
                    };

                    let output = "<h2>Boarding pass details:</h2>";
                    output += "<ul>";
                    for (const [key, value] of Object.entries(extractedData)) {
                        output += `<li><b>${key}:</b> ${value}</li>`;
                    }
                    output += "</ul>";
                    resultElement.innerHTML = output;
                });
        </script>
    </body>
</html>

You can then simply open the file in your browser or serve it via localhost to get started scanning and parsing boarding pass barcodes.

Scanning and parsing a boarding pass PDF417 barcode with our Boarding Pass Scanner & Parser web app

To learn more about how to customize the scanner, head over to the documentation.

The Scanbot Barcode Scanner SDK accurately reads and parses the dense PDF417 codes on boarding passes. It also supports the Data Matrix, Aztec, and QR codes of mobile boarding passes, as well as other common barcode symbologies.  

The SDK is built and optimized for real-life operations and reliably handles low-light conditions, glare, damaged barcodes, and poor print quality.  

The Scanbot SDK prioritizes data security at all times: The sensitive passenger data encoded in PDF417 codes will not be sent to third-party servers, as the SDK utilizes on-device processing. In this way, it is compliant with strict data security regulations such as GDPR and CCPA, and is fully functional in areas without network connectivity.  

See for yourself how it performs and try our free barcode scanner demo app. If you want to learn more about the SDK, feel free to contact our solution experts at sdk@scanbot.io.

What is a boarding pass scanner?

A boarding pass scanner is a device used to read and extract information from boarding passes, typically found at airport security checkpoints or boarding gates. With the right software, even a smartphone can be used as a high-performance boarding pass scanner.

Can I scan my boarding pass from my phone?

Yes, you can scan your boarding pass from your phone using mobile data capture software.

What type of barcode is on a boarding pass?

The barcode on a boarding pass is typically a 2D barcode, such as a QR code or a PDF417 code, which contains encoded information about the passenger’s flight details.

Why is there a barcode on boarding pass?

QR codes and PDF417 codes printed on airline boarding passes can contain a lot of information about the traveler, including personal details, future travel plans and frequent flyer account information.

What specific security measures are in place to protect passenger data during the mobile scanning process?

When utilizing smartphones as boarding pass scanners, it’s essential to implement robust security measures to protect passenger data. This typically involves encryption during data capture and transmission, ensuring that personal information remains secure from unauthorized access.

Can a mobile scanning solution integrate with existing airline systems and databases for seamless operation?

The ability to integrate a boarding pass scanner into existing airline systems and databases is crucial for seamless operation. This requires the scanner software to be compatible with airline IT infrastructure, allowing for real-time data exchange and updates.

How does the Scanbot SDK handle varying qualities of digital or printed boarding passes to ensure high scanning accuracy?

A boarding pass barcode scanner must accurately scan both digital and printed boarding passes, regardless of their quality. Advanced SDKs like the Scanbot SDK are designed to handle various conditions and qualities, ensuring high accuracy in scanning and data extraction.

Related blog posts

Experience our demo apps

Barcode Icon Art

Barcode Scanner SDK

Scan 1D and 2D barcodes reliably in under 0.04s. Try features like Batch Scanning, Scan & Count, and our AR Overlays.

Launch Web Demo

Scan the code to launch the web demo on your phone.

Web QR Code

Also available to download from:

Document Icon Art

Document Scanner SDK

Scan documents quickly and accurately with our free demo app. Create crisp digital scans in seconds.

Launch Web Demo

Scan the code to launch the web demo on your phone.

Black and white QR code. Scan this code for quick access to information.

Also available to download from:

Data_capture Icon Art

Data Capture Modules

Try fast, accurate data capture with our demo app. Extract data from any document instantly – 100% secure.

Launch Web Demo

Scan the code to launch the web demo on your phone.

Black and white QR code. Scan this quick response code with your smartphone.

Also available to download from: