Dev Blog

Supporting 18 Barcode Formats with On-Device ML

QR, PDF417, Aztec, Code 128, Data Matrix, and more. How NeatPass automatically detects and reads 18 different barcode formats using on-device machine learning.

2 min readFeb 11, 2026

NeatPass supports 18 barcode formats out of the box. That number isn't arbitrary; it's the result of analyzing thousands of real-world tickets, passes, and cards to figure out which formats actually show up in practice. Here's how the detection works and why format diversity matters.

The Barcode Landscape

Not all barcodes are created equal. A QR code on a concert ticket and a PDF417 on a boarding pass encode data differently, look different visually, and have different error correction characteristics.

QR CodeEvents, transit, loyalty
PDF417Airline boarding passes
AztecEuropean rail tickets
Code 128Shipping, membership cards
Data MatrixPharma, ID documents
+13 MoreEAN-13, UPC-A, Code 39...

Automatic Format Detection

You don't choose the format

When you scan a ticket, NeatPass examines the image, identifies all barcode regions, and classifies each one automatically. If your boarding pass has both a PDF417 and a QR code, both are found and you can pick which one to use for your pass.

This detection runs as part of the on-device pipeline, the same on-device inference that handles the rest of the scanning process. No separate API call, no lookup table, just pattern recognition.

Scan any barcode format

Download

Handling Real-World Conditions

Lab conditions are easy. A clean, high-contrast barcode on a white background scans perfectly every time. Real tickets are messier:

Low Resolution

Screenshots from email clients that compress images aggressively.

Partial Damage

Folded printouts, rain-smudged tickets, worn loyalty cards.

Poor Lighting

Photos taken in dim venues or under harsh fluorescent lights.

Rotation & Skew

Screenshots not perfectly aligned, photos taken at angles.

Color Inversion

Dark Mode screenshots that flip the expected contrast.

The preprocessing stage handles most of these: normalizing rotation, adjusting contrast, and correcting color space issues before the barcode detection model sees the image. For damaged barcodes, error correction built into formats like QR and Aztec helps recover data even when part of the code is unreadable.

Why This Matters

A ticket scanner that only handles QR codes misses a huge portion of real-world passes. Airline boarding passes alone account for millions of PDF417 barcodes daily. European rail tickets overwhelmingly use Aztec. Gym cards often use Code 128 or EAN-13.

Supporting 18 formats means NeatPass works for the concert ticket and the boarding pass and the loyalty card and the conference badge. One app, one workflow, regardless of what's encoded in your ticket.

Barcode resources

Need to check if your barcode format is supported? See the full list of supported barcode formats. You can also scan a barcode to auto-fill pass details. For a complete walkthrough, read my guide on converting any barcode to Apple Wallet.

Ready to migrate your cards?

NeatPass makes it easy to convert any ticket, pass, or loyalty card to Apple Wallet.

Try NeatPass Free

Related Updates