A barcode scanner turning a pattern of black bars into a product name feels almost instant, but there are a few distinct steps happening behind that beep — and understanding them explains why some perfectly legible-looking codes still fail to scan.
Laser scanners: reading light, not shapes
A classic laser scanner — the kind still common at grocery checkouts — sweeps a thin beam of light across the barcode and measures how much light bounces back. Black bars absorb light and reflect very little; white spaces reflect much more. The scanner reads this as a pattern of light and dark pulses over time, translates the pulse widths into a sequence of bar and space widths, and matches that sequence against the encoding rules for the symbology it's reading.
Because a laser scanner is measuring reflected light rather than analyzing a full image, it's extremely fast and works well even on curved or slightly uneven surfaces — but it also means contrast matters enormously. A barcode with poor contrast between the bars and background can produce a weak, ambiguous reflectance signal that the scanner can't confidently decode.
Camera-based (imaging) scanners
Modern handheld scanners, phone apps, and most 2D-capable scanners use a small camera sensor instead of a laser. They capture a full image of the code, then run image-processing software to locate the code within the frame, correct for any skew or rotation, and decode the pattern. This is what makes 2D formats like QR Code and Data Matrix possible in the first place — a single-beam laser sweep can only read a 1D pattern, but a camera can see an entire two-dimensional grid at once.
This is also how our own browser-based scanner works: it treats an uploaded photo the same way a camera scanner treats a live frame, searching the image for the recognizable finder patterns of a barcode or QR code and decoding whatever it finds.
Why QR codes have those three corner squares
The three large square patterns in the corners of every QR code aren't decorative — they're finder patterns that let a scanner instantly locate the code and work out its orientation and rotation, even if the photo was taken at a slight angle. This is a big part of why QR codes tolerate imperfect phone photos so well compared to a 1D barcode, which has no equivalent built-in landmark and instead relies on the scanner sweeping cleanly across it.
Why some scans fail even when the code "looks fine"
A few failure modes come up again and again, for both laser and camera scanners:
- Insufficient quiet zone: the blank margin around a code isn't just aesthetic — scanners use it to know where the code starts and ends. Crop it too tight and the scanner can't isolate the pattern.
- Low print resolution: thermal and low-end inkjet printers can blur bars that are packed close together, especially in dense 2D formats, merging modules that should be distinct.
- Specular glare: a laminated or glossy label under bright light can reflect a bright hotspot directly onto part of the code, effectively erasing that section of data from what the scanner can see.
- Curved or wrinkled surfaces: a barcode wrapped around a bottle or crumpled on a shipping bag distorts the geometry the decoder expects, which is harder for camera scanners to correct for than for a laser sweep at the right angle.
What this means for generating your own codes
Understanding the scanning side explains most of the practical guidance for generating and printing codes: keep the quiet zone intact, keep contrast high, size the code generously for its content, and print at a resolution that keeps bars and modules distinct rather than blurred together. Our printing guide covers the specifics, and you can test any code you generate immediately using our own scanner tool before committing to a full print run.