Scanning
Scanning multiple QR codes in one frame
Phone camera apps decode one code per frame (usually the largest or most central), so two adjacent codes make the scanner pick unpredictably. In print, separate codes by several quiet zones and label each one. In software, the BarcodeDetector API returns every code in the image as an array.
What the camera actually does with two codes
Camera apps are built for the single-code case: detect, decode, show one banner. Present two codes in the frame and the app picks one (typically the largest or most central), and silently ignores the rest. Which one wins shifts with every wobble of the hand, so a user aiming at the left code can get the right code's banner with no indication anything was ambiguous.
That is the root of a common field failure: a poster with an app-store code beside a menu code, and users "randomly" ending up in the wrong place. The scanner did not malfunction; it resolved an ambiguity the layout created.
Print-side fixes: make the choice unambiguous
The decoder cannot read intent, so the layout has to encode it:
- Separate the codes. Keep at least one full code-width of clear space between adjacent codes, several times the mandatory 4-module quiet zone each already needs. Distance lets the user frame one code without the neighbour intruding.
- One code per visual zone. Boxes, rules or colour blocks that assign each code its own region also guide how people frame their shot.
- Label every code with what it does ("Menu", "WiFi", "Book") directly beneath it. An unlabelled pair is a coin flip.
- Make the primary code bigger. Since scanners favour the largest code, size is a priority signal you control.
- Question the second code. Often one code with a landing page beats two codes competing. The full layout patterns are in multiple QR codes on one page, and grid layouts for sheets in QR code grids and sheets.
Software that reads them all
The one-per-frame limit is a UX choice, not a format limit. Decoding libraries and APIs happily return every code they find:
const detector = new BarcodeDetector({ formats: ["qr_code"] });
const codes = await detector.detect(imageBitmap);
// codes is an array: one entry per code found, each with rawValue and boundingBox
Browser support for BarcodeDetector varies, so feature-detect and fall back to a
library, the full recipe, including webcam wiring, is in
reading QR codes from a webcam in the browser.
Server-side, the decode API
returns up to 8 codes per image as an array, which turns one photo of a label
sheet into eight structured results in a single request.
This is how multi-code workflows should be built: photograph the whole sheet once and let software separate the codes, rather than asking a human to aim at each one: the throughput comparison is in batch scanning many QR codes.
Sheets and grids
Label sheets, the output of the sticker sheet tool or a bulk run, are the extreme case: dozens of codes centimetres apart. Two rules keep them workable. For human scanning, rely on proximity: a phone held close to one label naturally excludes its neighbours from the frame, which is why dense sheets still work one-at-a-time. For machine scanning, photograph the sheet flat and evenly lit, and decode all codes in one pass with the array-returning APIs above.
FAQ
Can a phone scan two QR codes at once?
The camera app decodes only one per frame, usually the largest or most central, and shows a single banner. To read several codes at once you need software built on a multi-code API, which returns every detected code as an array.
Why does my scanner open the wrong code when two are printed together?
Adjacent codes create an ambiguity the app resolves by size and position, which shifts as the hand moves. Separate the codes by at least a full code-width, label each one, and make the primary code larger.
How far apart should two QR codes be printed?
At minimum, each needs its own four-module quiet zone; in practice leave at least one full code-width of clear space between them so a user can frame one code without the other entering the shot.
How do I decode every QR code in one photo?
Use a multi-code decoder: the BarcodeDetector API in the browser returns an array of results, and decode APIs return multiple codes per image. Photograph the sheet flat and well lit, and one request yields every code with its position.
Try it: free, no signup
Related
- Batch scanning many QR codes, Three workflows that scale (a keyboard-wedge imager into a spreadsheet, a phone app with batch mode, or a decode API in a loop), plus dedup and timestamps.
- How to scan a QR code on any device, On iPhone and Android, open the camera app and point it at the code: a banner appears with the destination. No separate app is needed on any current…
- Multiple QR codes on one page, Camera apps latch onto one code at a time. Spacing of at least twice the quiet zone, a label on every code, and when to collapse the lot into one hub.
- Read QR codes from a webcam in the browser, Scan QR codes live in the browser with the BarcodeDetector API, a zxing-wasm fallback for Firefox and Safari, and getUserMedia camera constraints that work.