Mobile Barcodes: How to Make Them Scan
A mobile barcode is a barcode shown on a phone screen instead of printed on paper: a boarding pass, a loyalty card, a ticket or a coupon. Whether it scans depends mostly on the reader at the other end. Camera-based scanners, called imagers, can read a screen; older laser scanners usually cannot, because a glossy screen does not reflect their beam the way paper does. On your side, five things decide the rest: brightness, size, the blank margin around the code, its colours and glare. Below are the fixes, with the results of our own decoder test.
Key takeaways
- If the counter has a red-line laser scanner, the screen may be the problem, not your code. Ask for a camera scanner or give the number printed under the bars.
- Turn the brightness up and keep the code large. Our test codes stopped reading when the bars got very thin or the contrast fell too far.
- Keep the white margin. With a dark app bar close to an EAN-13, our test read nothing at a 5-module gap and everything at 7.
- Dark bars on a light background read most reliably. Light-on-dark barcodes were not read at all by the open-source decoder we used.
What counts as a mobile barcode
The phrase covers two jobs that are easy to mix up. One is showing a barcode on your phone so someone else can scan it. The other is scanning a barcode with your phone. This guide is about the first job. For the second, see how to scan a barcode with your phone.
The codes you show on a phone come in a few standard types. Wallet apps limit what they can display. PassKit, a company that builds passes for Apple Wallet and Google Wallet, lists four barcode types those wallets support: PDF417, QR Code, Aztec and Code 128. Google's own Wallet developer reference lists more, including EAN-13, UPC-A, Code 39, Data Matrix and ITF-14. Airline boarding passes follow IATA's Bar Coded Boarding Pass standard, which accepts Aztec, Data Matrix and QR codes for phones, while printed passes use PDF417.
| Where you see it | Typical barcode type | What it holds |
|---|---|---|
| Airline boarding pass on a phone | Aztec, Data Matrix or QR (IATA standard) | Passenger and flight details |
| Wallet pass: ticket, membership, coupon | QR, PDF417, Aztec or Code 128 | An ID the issuer looks up |
| Store loyalty card in an app | A 1D barcode or a QR code, depending on the store | Your card number |
| A barcode you made yourself | Whatever you chose when you created it | The value you typed in |
Why some scanners cannot read a phone screen
A laser scanner sweeps a red beam across the bars and measures the light that bounces back. Paper scatters light evenly, so the bars and spaces return clearly different amounts. A screen does not behave like paper. The point-of-sale supplier POSGuys puts it bluntly: laser scanners "will be unable to scan barcodes from LCDs (LED, OLED, or otherwise) or similar screens". A screen either reflects too little of the beam or bounces it straight back as a bright red line.
An imager works like a camera. It takes a picture of the code and decodes the picture, so the light coming from the screen itself is enough. Dynamsoft, which sells barcode-reading software, describes 2D imagers such as smartphones this way: "a picture of the barcode is captured", then processed and decoded. That explains how the same pass can scan at one gate and fail at the next.
Imagers are not immune either. POSGuys notes that a red aiming light can still reflect off a phone screen and hide what is behind it. Scanners built to read worn or damaged barcodes tend to cope better with reflective screens.
What to do at a laser scanner: ask whether there is a handheld camera scanner, or read out the number printed under the bars. That number is the same data the bars carry, which is why it is there.
Our test: what makes a screen barcode fail
To see which settings matter, we drew three codes as a phone screen would show them: an EAN-13 (5901234123457), a Code 128 (TICKET-2049-AB) and a QR code. We then added the blur and sensor noise a camera adds and asked zxing-cpp, an open-source decoder that reads camera images, to read each one 20 times. This is our own simulation, not a test of any particular checkout scanner, and the script is kept with this article's records, so anyone can rerun it.
| Condition | EAN-13 | Code 128 | QR code |
|---|---|---|---|
| Normal: dark on light, full contrast | 20/20 | 20/20 | 20/20 |
| Contrast cut to 25% | 20/20 | 20/20 | 20/20 |
| Contrast cut to 15% | 0/20 | 20/20 | 11/20 |
| Contrast cut to 5% | 0/20 | 0/20 | 0/20 |
| Inverted: light bars on dark | 0/20 | 0/20 | 20/20 with inversion handling on, 0/20 with it off |
Two more runs used the EAN-13 alone. First we placed a dark strip beside the code, as an app bar or the edge of the screen would be. The decoder read every attempt when the white margin was 7 or 10 modules wide (a module is the width of the thinnest bar). At 5 modules or fewer it read none. When we shrank the code, it read every attempt down to 1.5 camera pixels for the thinnest bar. Below that, results became erratic: some sizes failed completely, and one read only because the bars happened to line up exactly with the pixels.
The inverted result has a simple cause. The decoder's source code only tries inverted images with readers that support them, and its 1D barcode reader does not. A scanner built the same way will treat a light-on-dark EAN-13 as no barcode at all.
Six fixes when a mobile barcode won't scan
Work through these in order. The first three are the quickest to try.
1. Turn the brightness up
A dim screen shrinks the difference between bars and spaces. Full contrast and 25% contrast both read every time in our test, while 15% stopped the EAN-13 entirely. If your screen is dimmed or in a power-saving mode, raise the brightness by hand before you reach the counter.
2. Make the code bigger
Zoom in on the code or turn the phone sideways so a long 1D barcode spans the whole screen. A small barcode held at arm's length gives the scanner very few pixels per bar, which is the size failure in our test. QR, Aztec and Data Matrix codes are square, so turning the phone helps them less; enlarging still does.
3. Keep the white margin clear
Crop a screenshot tightly, or let a notification banner slide over it, and the blank margin disappears. Our EAN-13 went from 20 reads in 20 to none when a dark edge came within 5 modules of the bars. If you save a barcode as a picture, keep the white border in the crop.
4. Avoid light-on-dark codes
Some display settings, such as colour inversion for accessibility, flip the whole screen, codes included. If the bars look white on black, switch that setting off before scanning. A QR code may still read on a scanner that handles inverted codes, while a 1D barcode may not read at all.
5. Tilt to kill glare
Reflections hide the bars. Tilt the phone a few degrees so the scanner's light or the ceiling lights do not bounce straight back. A scratched screen protector can add glare of its own; if it is cracked over the code, enlarge the code onto an undamaged part of the screen.
6. Hold still at the right distance
A camera scanner needs a sharp picture. Hold the phone flat, facing the scanner window, and pause instead of waving it past. If nothing happens, move a little closer or further away and try again.
When the scanner at the counter is the problem
A thin red line sweeping across your phone after all these fixes points to a laser scanner. Your code may be fine. The practical options are the ones staff already use: a handheld imager if the shop has one, typing the number printed under the barcode, or a paper copy. Keeping a screenshot is worth it for tickets and passes, so you are not relying on mobile data at the gate. Check the pass first: Google Wallet, for example, supports rotating barcodes that change over time, and an old screenshot of one will not work.
Showing a barcode you made yourself
Membership numbers, stock codes and event check-in IDs do not need a wallet app. Generate the barcode in Create Barcode, a tool in ScanMint AI that renders it on your phone, offline. You can then share the image or show it on screen for someone else to scan. Sharing is free on the free plan, and shared images carry a small ScanMint AI watermark. Our guide on how to create a barcode on your phone walks through it.
A few choices make a self-made code friendlier to scanners:
- Use Code 128 for anything with letters. It held up best of the three types when we cut the contrast.
- Leave the white border in place when you crop or paste the image.
- Before relying on it, read it back with Scan Barcode on a second phone. If a phone camera struggles, make the code larger or shorter and test again.
If the same code also needs to work on paper, the rules on size and margins are in how to print a barcode that scans. When a code fails in the other direction, with your phone as the scanner, see why won't my barcode scan.
Frequently asked questions
Can you scan a barcode from a phone screen?
Yes, with a camera-based scanner (an imager), which includes the camera in another phone. Laser scanners usually cannot read a screen, because the screen does not reflect their beam the way paper does.
Why does my boarding pass scan at one gate and not another?
The readers can differ. A gate with a camera-type reader handles screens; an older laser scanner may not. Brightness and glare also change from one place to the next.
Is a screenshot of a barcode as good as the original?
For a static code it holds the same bars, so it scans the same, provided you keep the full code and its white margin. Some passes use rotating codes that change over time, and a screenshot of those goes stale.
Does dark mode stop barcodes from scanning?
Only if the code itself turns light-on-dark. In our test, inverted 1D barcodes were not read at all, while an inverted QR code read only with inversion handling turned on.
Can my phone read a barcode on another phone?
Usually, yes: a phone camera is an imager. Open Scan Barcode, raise the other phone's brightness and hold both steady. ScanMint AI reads twelve barcode types, including EAN-13, Code 128, PDF417 and Aztec.
Summary
A mobile barcode scans when a camera-type reader sees enough contrast, enough size and a clean white margin. Raise the brightness, enlarge the code, keep the border, avoid inverted colours and tilt away glare. If you are facing a laser scanner, give the number instead. To make, show and check your own barcodes, download ScanMint AI.
Sources
- POSGuys, Can I scan barcodes directly from a cell phone? (FAQ 1069, retrieved 2026-12-02): laser scanners and screens; reflection problems for imagers.
- Dynamsoft, Laser-Based Barcode Scanners vs. 2D Imagers (2019, retrieved 2026-12-02): how imagers read screens.
- PassKit, Why are there only four barcode options? (retrieved 2026-12-02): PDF417, QR, Aztec and Code 128 in wallet passes.
- Google for Developers, Google Wallet BarcodeType reference (retrieved 2026-12-02): supported barcode types and which ones can rotate.
- Wikipedia, Boarding pass (retrieved 2026-12-02): IATA BCBP symbologies for paper and mobile boarding passes.
- zxing-cpp source, MultiFormatReader.cpp and ReaderOptions.h (commit 7af1cc0, 2026-12-01): inverted images are only tried with readers that support inversion.
- Our own decoder test (python-barcode 0.16.1, qrcode, zxing-cpp 3.2.0), kept with this article's records.
Tools covered in this guide
Open any of these in ScanMint AI to follow along.
Related guides
- How to Decode a Barcode: Read the Bars by HandA barcode is 95 narrow units of bars and spaces. Here is how to turn them into 13 digits by hand, find the hidden first digit and check your answer.
- Why Won't My Barcode Scan? 9 Phone FixesA barcode that won't scan usually needs one clean, complete line across its bars. Nine phone fixes for glare, distance, curves and clutter, from our own decoding test, and what to do when nothing works.
- How to Print a Barcode That ScansPrint a barcode that scans first time: GS1 sizes for EAN-13 and UPC-A, how much blank margin to leave, which colours fail, and how to size codes for 203 and 300 dpi label printers.
Try ScanMint AI free
Turn your phone into a pocket scanner and PDF toolkit — 18 tools, privacy-first.
