30/11/2025
Most people think barcode scanners read the black bars, but they actually measure the white spaces between them. A red laser or LED light shines on the code, and a sensor detects how much light reflects back. Black bars absorb light (low reflection), while white spaces reflect a lot (high reflection). The scanner measures the width of these bright and dark areas to decode the pattern into numbers.
This works because the timing and thickness of the reflections create a unique waveform that matches standard barcode rules (like UPC or EAN). Even if the bars are dirty or damaged, clean white spaces often still give an accurate read.
This design makes scanning fast, reliable, and forgiving — key reasons barcodes revolutionized retail checkout since the 1970s.
Understanding this helps explain why faded or scratched barcodes can still work, and why modern systems are moving to 2D codes and camera-based scanning.