How Do Supermarkets Scan Barcodes?
How barcode scanners work at the supermarket checkout: laser and camera scanners, how the number becomes a price, weighed items, and why some codes won't scan.
By StylQR Editorial TeamPublished 5 min read

Table of contents
Supermarket checkout scanners work by shining a laser or LED light on a barcode, measuring the pattern of reflected light from the dark bars and white spaces, and decoding it into the product's number, usually an EAN-13 or UPC. The till then looks that number up in the store's product file to find the name and price. The price itself isn't in the barcode.
Here's what happens in the second between the beep and the price appearing, the scanners involved, and why some items still need typing in.
The checkout in five steps
- The item crosses the scanner. A pattern of light lines or a camera's field of view covers the window.
- The scanner decodes the bars. It measures the widths of bars and spaces, identifies the symbology from the guard patterns, and turns them into digits.
- It checks the check digit. If the last digit doesn't match the calculation, it ignores the read. That's why a scan almost never produces a wrong product: a bad read fails silently and the scanner tries again.
- It beeps and sends the number to the point-of-sale (POS) system.
- The POS looks up the GTIN in the store's item file and returns the description, price, tax category and any promotion that applies.
Step 5 is why the same barcode can ring up a different price in two shops, or on a different day. The store sets prices in its own system. The barcode only identifies the product.
The scanners at the counter
In-counter scanners
Most staffed supermarket lanes have a scanner built into the counter. Many are bioptic designs with two windows, one flat and one upright, so the code can be read from the bottom or the side of an item without turning it.
Traditional in-counter scanners are lasers. A laser diode bounces off a spinning mirror and a set of fixed mirrors to throw a pattern of crossing lines across the window. Whichever way the barcode faces, at least one line usually crosses all its bars. The scanner measures how much light comes back as each line sweeps over the code.
Newer in-counter models use image sensors: cameras with LED lighting that take rapid pictures and decode any barcode in them. Imagers read 2D codes as well as 1D, and handle barcodes on phone screens.
Handheld scanners
Cashiers use handheld scanners for heavy or awkward items left in the trolley. These come in three types:
- Laser: a single red line. Reads 1D barcodes only.
- Linear imager: a one-line image sensor. Also 1D only, but tends to cope better with screens and poor print.
- 2D area imager: a camera. Reads 1D and 2D codes at any angle.
For more on decoding itself, see how to read and decode barcodes.
How the scanner knows which way is up
It doesn't need to. EAN-13 and UPC-A codes use different bar patterns for digits on the left half and the right half, so the decoder can tell which end it started from and reverse the result if needed. The guard bars at both ends and the center mark where each half begins. A scan line only has to cross the full code once, in either direction.
That's also why the blank margins either side matter. Without a clean quiet zone, the scanner can't find where the code starts. The EAN-13 guide gives the exact margins.
Weighed and loose items
Products sold by weight need different handling:
- Pre-packed deli, meat and cheese. The store's scale prints a label with a barcode from the restricted range starting with
2(or02in UPC terms). These numbers are for use inside one store or chain and can include the item code plus the price or weight. The POS reads the price straight from the label. - Loose fruit and vegetables. Many items carry small stickers with a four- or five-digit PLU (price look-up) number managed by the International Federation for Produce Standards. The cashier or shopper weighs the item and enters the PLU.
- Fresh produce with GS1 DataBar. Some retailers use these compact codes on produce and on coupons, as they can hold extra data alongside the GTIN.
Why some barcodes won't scan
When a product refuses to beep, it's usually one of these:
| Problem | Why it fails |
|---|---|
| Red, orange or yellow bars | Laser and many imagers use red light, so red bars look the same as white space |
| Text or artwork in the margins | The scanner can't find the quiet zone and the code's edges |
| Barcode printed too small or truncated | Bars are too thin for the scanner's resolution, or too short for scan lines to cross at an angle |
| Code across a fold, seam or tight curve | Part of the bars is hidden or distorted |
| Glossy film over the code | Glare reflects light straight back |
| Wrinkled bags | Bars bend and widths change |
| Number not in the store's system | The scanner reads it, but the POS shows "item not found" |
The last one isn't a barcode fault at all. It happens when a product is new to the store, or when its number wasn't licensed from GS1 and so doesn't match what the retailer was given. That's why retailers insist on genuine GS1 numbers. What a GS1 barcode is explains why.
From lasers to cameras
Barcode scanning at checkouts started on 26 June 1974, when a pack of chewing gum was scanned at a Marsh supermarket in Ohio. Laser scanners have dominated since. Now GS1 US's Sunrise 2027 initiative asks retailers to install scanners that can read 2D codes, such as QR codes in GS1 Digital Link format and GS1 DataMatrix, and pull the GTIN out of them at the till. In practice that means a gradual move from lasers to imagers, with packs carrying both a 1D and a 2D code during the transition. 1D vs 2D barcodes covers what changes.
If you're making barcodes for retail
To scan smoothly at checkout, a product needs a GS1-licensed number drawn as a correctly sized EAN-13 or UPC-A: dark bars, light background, a clear quiet zone and no truncation. StylQR doesn't issue numbers, but once you have yours, the EAN-13 barcode generator and UPC-A generator validate the check digit and output an exact-size PDF or SVG for your packaging. How to create a barcode for your products covers the full process.
Frequently asked questions
Is the laser in a checkout scanner dangerous to look at?
Checkout lasers are low-power and designed for public use, but you still shouldn't stare into the beam. Camera-based scanners use LED light instead of a laser.
Why does the cashier sometimes type the number in?
When a barcode is damaged, wrinkled or printed badly, the scanner can't decode it. The digits printed under the bars let the cashier key the number manually.
Can a supermarket scanner read a barcode on my phone screen?
Camera-based imagers usually can. Laser scanners often struggle with screens, because the glass reflects the beam and the display doesn't reflect it the way paper does.
Do supermarkets in different countries use the same barcodes?
Yes. EAN-13 and UPC-A are global GS1 standards, so an imported product's barcode scans in any GS1-compliant store, provided the store has that product in its system.


