Boarding Pass Parser

The 2-D barcodes found on boarding passes encode a large amount of interesting flight and passenger data. I wrote a parser to process the output from a scan of a boarding pass barcode.

Scan of a US Airways boarding pass, prominently showing a PDF417 2-D barcode.

I also wrote a JSON API for the boarding pass parser. Place the raw barcode data text into the following URL, and it’ll return the parsed barcode in JSON format (example):

If you need a callback function, use the following structure (example):

Technical Details

The boarding pass parser is written as part of Flight Historian, a Ruby on Rails application.

Boarding pass barcodes are in International Air Transport Association (IATA) Bar-Coded Boarding Pass (BCBP) format—a compact text string which can contain details for one or more flights for a given passenger.

The implemented code is located in the BoardingPass class in my bogardpd/flight_log project.