How does a barcode scanner work? A barcode scanner uses light and electronic sensors to read a pattern of bars, spaces or squares and convert it into digital information. Traditional laser scanners measure reflected light as a beam moves across a barcode, while imaging scanners capture the pattern using a digital sensor. The decoded information can then identify a product, retrieve a price or perform another task in a connected computer system.
Barcode scanners are familiar sights in supermarkets, warehouses, libraries, hospitals and delivery services. A simple beep at a checkout may seem unremarkable, but it represents the completion of several processes involving optics, electronic signal processing, data decoding and computer communication.
Understanding these processes also reveals why some barcodes are difficult to scan, why a scanner does not usually know a product’s price and why newer barcode systems can carry much more information than traditional black-and-white lines.
How A Barcode Scanner Works Step By Step
Although scanners use different technologies, the basic process follows a similar sequence.
- A scanner illuminates a barcode or captures an image of it.
- Its optical system detects the pattern of contrasting bars, spaces or other markings.
- Electronic circuitry or image-processing software interprets the pattern.
- A decoder identifies the barcode format and converts its encoded symbols into data.
- The scanner sends the decoded information to a computer, checkout, mobile device or other connected system.
- The receiving system uses that information to perform a task, such as identifying a product or recording an inventory movement.
The scan itself does not necessarily retrieve a price or update a database. These tasks usually take place in the system receiving the decoded information.
This distinction is important: reading a barcode and deciding what its information means are separate operations.
How Do Barcode Lines And Spaces Store Information?
A traditional barcode is a machine-readable representation of information.
The familiar vertical bars and spaces form a pattern with carefully controlled widths and positions.
In a one-dimensional barcode, often called a linear or 1D barcode, the scanner analyses the sequence of dark and light regions along a line across the symbol.
Different combinations represent information according to a defined barcode format, known as a symbology.
Examples include EAN-13, UPC-A, Code 39 and Code 128.
The decoder must recognise the appropriate symbology before interpreting the pattern correctly.
Why Are Some Barcode Lines Thicker Than Others?
The different widths are part of the barcode’s encoding system.
In many linear symbologies, the widths and arrangement of bars and spaces follow specific rules that represent numbers, letters or other characters.
A thick bar does not simply mean one digit, and a thin bar does not automatically mean another.
Instead, the decoder examines the complete arrangement according to the rules of that barcode type.
Some formats also contain special patterns that help indicate where the symbol begins, ends or separates groups of encoded information.
What Are The Numbers Beneath A Barcode?
The numbers printed below a retail barcode provide a human-readable representation of the encoded product identifier.
For example, many retail products use identifiers called Global Trade Item Numbers, or GTINs.
The printed digits allow a person to read or manually enter the identifier when necessary.
The scanner ordinarily reads the graphical pattern rather than using optical character recognition to interpret the printed digits.
How Does A Laser Barcode Scanner Work?
A traditional laser barcode scanner directs a narrow beam of light across a printed barcode.
As the beam travels across the alternating bars and spaces, different amounts of light reflect towards the scanner.
A light-sensitive detector measures the changing reflected signal.
The scanner’s electronics use that signal to establish the widths and sequence of the bars and spaces.
A decoding system then converts the detected pattern into the corresponding data.
Why Do Black Bars And White Spaces Reflect Light Differently?
Dark bars generally absorb more of the scanner’s illumination, while lighter spaces reflect more of it.
This difference creates the optical contrast that the scanner measures.
The reflected signal is converted into electrical information that can be processed electronically.
However, barcode scanning does not depend strictly on black ink and white paper.
Other colour combinations may work if they provide sufficient contrast at the wavelengths used by the scanner.
A barcode that looks clear to human eyes may still be difficult for a particular optical scanner to read.
How Does The Laser Beam Move Across The Barcode?
Many traditional laser scanners use a moving mirror or another beam-steering arrangement to sweep the laser across the symbol.
Some checkout scanners use multiple scanning directions, allowing the barcode to be read without the cashier carefully aligning every item.
This explains the familiar pattern of intersecting red lines visible in some supermarket checkout windows.
Laser scanners are principally associated with linear barcode reading. They are not generally suitable for decoding QR codes and other two-dimensional matrix symbols.
How Do Camera-Based Barcode Scanners Work?
Imaging scanners use a different approach.
Instead of relying on a single sweeping beam, a scanner captures a digital image of the barcode using an image sensor.
Software analyses the image, locates the barcode and interprets its encoded pattern.
Depending on the scanner and its decoding capabilities, an imaging system may read both traditional linear barcodes and two-dimensional barcodes.
Dedicated industrial and retail imagers can use controlled illumination, specialised optics and decoding algorithms to improve performance.
Smartphones can also use their cameras and suitable software to recognise supported barcode formats.
What Is A Linear Imager?
A linear imager captures reflected light along a narrow line rather than taking a full two-dimensional image.
It can decode supported one-dimensional barcodes without using a moving laser beam.
This means not every scanner designed for traditional barcodes is a laser scanner.
What Is A Two-Dimensional Imager?
A two-dimensional, or 2D, imager captures a two-dimensional image of the printed symbol.
It can analyse patterns arranged both horizontally and vertically.
Suitable imagers can read formats such as QR Code, Data Matrix and many traditional linear barcodes.
This flexibility is particularly useful in environments where different barcode types appear on products, tickets, packaging and documents.
What Is The Difference Between A Barcode Scanner And A QR Code Reader?
A QR code is itself a type of two-dimensional barcode.
Traditional linear barcodes primarily arrange information across one dimension, using patterns of bars and spaces.
QR codes organise data within a square pattern of small dark and light modules.
A compatible imaging scanner can identify the position and orientation of the QR code, interpret its modules and recover the encoded information.
QR codes also include error-correction information, allowing a compatible reader to recover data despite some damage or obstruction, within the limits of the code’s design.
A conventional laser scanner intended only for linear barcodes cannot normally decode a QR code.
The difference therefore lies in the type of barcode and the scanning technology, rather than QR codes being entirely unrelated to barcodes.
Does A Barcode Contain The Product’s Price?
Usually, no.
A conventional retail barcode typically represents a product identifier rather than its selling price.
When a shop scans an item, the checkout system uses the decoded identifier to find the matching product record.
That record can contain information such as:
- Product name and description.
- Current selling price.
- Applicable taxes.
- Promotional pricing.
- Inventory or stock information.
Because the price is managed by the retailer’s system, different shops can sell the same product at different prices without changing the manufacturer-printed barcode.
It also allows a retailer to update prices without requiring the product packaging to be redesigned.
Can Any Barcodes Contain Prices?
Yes. Some specialised retail numbering systems can encode information associated with a variable-measure product or monetary value.
For example, certain labels printed for weighed goods may include price or measurement information according to the numbering system used.
Some coupon formats can also encode a value.
Therefore, the general rule that retail barcodes contain product identifiers has exceptions.
The important distinction is between the information physically encoded in a barcode and additional information retrieved by the checkout system.
What Happens After A Supermarket Scans A Barcode?
The checkout receives the decoded identifier from the scanner.
Its software then attempts to match that identifier to a product record.
For a successful transaction, the system may display the product description, add the current price to the sale, apply relevant discounts and update transaction records.
Depending on the retailer’s system, some information may be stored locally while other records are held in networked services.
An internet connection is not necessarily required for every barcode scan.
Why Can A Scanner Beep But The Checkout Still Reject An Item?
A successful optical scan does not guarantee that the checkout can process the decoded information.
For example, the scanner might read the barcode correctly, but the checkout may not have a corresponding product record.
The product may not yet be registered in the retailer’s system, or the software may not support the barcode’s data format.
Other failures can arise from communication problems between the scanner and the receiving device.
Some scanners use a beep or light to indicate successful decoding, but the meaning of these signals depends on the device and its configuration.
This is why a barcode can be technically readable while the wider checkout process still fails.
What Is A Barcode Check Digit?
Many barcode numbering systems use a check digit to detect certain errors in an encoded identifier. Other barcode formats use additional checks or error-correction mechanisms to help verify that the scanner has decoded the symbol correctly.
For common retail GTIN formats, the check digit is calculated mathematically from the preceding digits.
A system can repeat the calculation and compare the result with the final digit.
If the result does not match, the number fails the check.
This helps detect many common errors in data entry or interpretation.
However, a valid check digit does not prove that the product exists, that its description is correct or that the packaging is genuine.
A check digit is also not the same as the error-correction information used in some two-dimensional barcodes.
It checks the numerical structure rather than repairing missing or damaged parts of an image.
Why Do Some Barcodes Refuse To Scan?
A barcode scanner needs an adequately clear pattern to decode the data reliably.
Problems can arise from damaged labels, printing faults, unsuitable materials or difficult lighting conditions.
Poor Contrast
If the bars and spaces reflect light too similarly, the scanner may struggle to distinguish them.
This can happen with unsuitable colour combinations, faded printing or certain decorative backgrounds.
Damaged Or Distorted Barcodes
Scratches, tears, wrinkles and missing print can interfere with the encoded pattern.
Distortion may also occur when a label is wrapped around a curved container or placed across an uneven surface.
Barcode Size And Printing Quality
Barcodes have technical requirements concerning the size and spacing of their elements.
Printing them too small, stretching them unevenly or reducing their height can make reliable reading more difficult.
The appropriate dimensions depend on the barcode type and its intended use.
Reflections And Packaging Materials
Glossy packaging, transparent coverings and strong reflections can reduce scanning reliability.
Modern imaging equipment can sometimes compensate for difficult conditions, but performance varies between devices.
Incorrect Orientation Or Distance
Some scanners require the symbol to pass through an appropriate reading area or fall within their effective focusing range.
An imaging scanner may be more flexible about orientation than certain traditional linear scanners, although no scanner works equally well at every angle or distance.
Why Is The Blank Space Around A Barcode Important?
One of the least obvious features of a barcode is the blank area surrounding its printed pattern.
This space is called the quiet zone.
For many conventional linear barcodes, clear margins on either side help the reader establish where the barcode begins and ends.
Two-dimensional symbols also have quiet-zone requirements, usually around all four sides.
If text, packaging graphics or other markings intrude into these areas, the scanner may struggle to recognise the symbol correctly.
A barcode can therefore fail even when its lines are perfectly printed.
This also explains why enlarging a barcode without preserving its required surrounding space may not solve a scanning problem.
The exact quiet-zone dimensions depend on the barcode symbology and its technical specification.
Can Barcode Scanners Read Barcodes On Phone Screens?
Many imaging scanners can read supported barcodes displayed on smartphones or other electronic screens.
Examples include digital tickets, boarding passes, loyalty cards and electronic vouchers.
Because the code is displayed using illuminated pixels rather than printed ink, the scanner must handle the screen’s brightness, reflections and pixel structure.
Screen brightness, display damage, barcode size and the scanning device’s capabilities can all affect performance.
Some traditional laser scanners struggle with or cannot read codes displayed on screens reliably because they depend on reflected illumination from a suitable printed surface.
An imaging reader is generally better suited to these applications.
Do Barcode Scanners Need An Internet Connection?
A barcode scanner does not inherently need internet access to decode a printed symbol.
Decoding can take place inside the scanner, a connected computer or another local device.
A barcode can also encode information that requires no online lookup, such as a local inventory reference or a short text value.
However, some applications need network access to retrieve records, check ticket validity or obtain other information.
A QR code containing a website address can be decoded without an internet connection, but opening the destination website normally requires network access.
The distinction is between reading the encoded data and using that data to access another service.
Can Barcode Scanners Identify Fake Products?
A barcode scan alone cannot establish that a product is genuine.
A copied or counterfeit product may carry a barcode containing a valid identifier.
Likewise, a correctly calculated check digit only confirms that a number satisfies a mathematical rule.
Additional verification may depend on serial numbers, controlled databases, authentication systems, packaging features or manufacturer records.
Some industries use more detailed traceability systems that identify individual items or batches rather than simply a general product type.
Barcode technology can support such systems, but the printed symbol itself does not guarantee authenticity.
Do Barcode Numbers Show Where A Product Was Made?
Not necessarily.
A common misconception is that the first few digits of a retail barcode reveal the country where a product was manufactured.
In the GS1 system, a prefix may indicate the GS1 member organisation associated with the allocation of a number.
It does not reliably identify the country of manufacture.
A product can be made in one country, packaged in another and sold using an identifier allocated through an organisation elsewhere.
Determining a product’s origin therefore requires more than reading the first digits of its barcode.
How Are Barcode Scanners Changing?
Barcode technology continues to develop, particularly as retailers and other organisations make greater use of two-dimensional symbols.
Traditional EAN and UPC barcodes remain widely used for retail product identification.
Depending on the barcode format and the system interpreting it, two-dimensional retail barcodes can encode information such as batch identifiers, expiry dates or web addresses leading to further product details.
GS1, the international standards organisation behind many retail identification systems, is supporting the adoption of two-dimensional barcodes at retail checkouts.
This does not mean that familiar linear barcodes will disappear immediately or that every QR code already works at every checkout.
Retailers must have compatible scanning equipment, software and processes capable of interpreting the information correctly.
When packaging carries both a traditional barcode and a two-dimensional barcode, checkout systems must also recognise that the symbols may identify the same product. Correctly configured software helps prevent the same item being registered twice during a single scan.
The underlying principle remains unchanged: the scanner reads a machine-readable symbol, decodes its information and passes that information to a system capable of using it.
Frequently Asked Questions
Do all barcode scanners use lasers?
No. Some use lasers, others use linear imaging sensors, and many use two-dimensional digital imagers. The technology depends on the type of barcode and scanning application.
Can a barcode scanner read any barcode?
Not necessarily. Scanners support particular barcode formats, and their capabilities depend on the hardware, software and configuration.
Why does a barcode scanner make a beeping sound?
A beep commonly provides feedback that the scanner has decoded a barcode or completed another configured action. Its exact meaning varies between devices.
Can two products have the same barcode?
Identical instances of the same product commonly carry the same retail product identifier. Different products that require separate identification should have different GTINs under GS1 allocation rules.
Can barcode scanners read damaged codes?
Sometimes. A scanner may still read a barcode if enough of its pattern remains intact. Some two-dimensional formats, including QR codes, also contain error-correction information that can help recover data from damaged symbols. However, extensive damage can prevent successful decoding.
Are barcode scanners safe to look into?
Users should follow the manufacturer’s instructions and avoid deliberately staring into laser beams or other intense optical sources. Scanner safety requirements depend on the equipment and the light sources it uses.
Understanding The Technology Behind Barcode Scanning
Barcode scanners demonstrate how a simple printed pattern can connect a physical object to a digital information system.
A laser scanner measures changes in reflected light as it sweeps across bars and spaces. An imaging scanner captures a picture of the symbol and uses software to recognise the encoded pattern.
The decoder turns that pattern into usable data, while the connected application determines what happens next.
At a supermarket checkout, this may mean retrieving a product description and price. Elsewhere, it might mean tracking a parcel, checking a ticket or recording a medical product.
The cleverness of the technology lies not only in reading the printed symbol but in providing a fast and standardised way for machines to identify objects and retrieve the information associated with them.
Discover the GS1 Barcode System – Part 1: Overview – Watch the TEC-IT barcode explanation on YouTube
Discuss Barcode Scanners
Have you ever struggled to scan a perfectly visible barcode, or wondered why a checkout recognises a product but displays the wrong price?
Share your experiences and questions in the For More Details Forum.
Sources And Further Reading
- GS1 — How Do GTINs And Barcodes Work?. Explains how retail barcodes represent standardised product identifiers.
- GS1 — Are Product Descriptions And Prices Included In Barcodes?. Clarifies how retail databases supply product information and the relevant exceptions.
- Zebra Technologies — Barcode Scanning Documentation. Manufacturer documentation identifying laser, camera and imaging scanner technologies.
- GS1 — Barcode Quality And Scanning Problems. Covers contrast, quiet zones, print quality and other factors affecting readability.
- GS1 — Two-Dimensional Barcodes At Retail Point Of Sale. Explains the adoption of QR codes and Data Matrix alongside traditional retail barcodes.
- GS1 — Do Barcode Prefixes Show A Product’s Country Of Origin?. Corrects a widespread misconception about barcode numbering.

