Just a number
The familiar retail barcode, called EAN-13 in most of the world, encodes a 13-digit number and nothing more. It does not contain the price, the expiry date or the product’s name. Instead, the number acts as a unique key. The first digits identify the national organisation that issued the company prefix, the next digits identify the company and its product, and the final digit is a check digit calculated from the others. In the United States and Canada a 12-digit version, UPC-A, is common. The numbering system is run by GS1, a not-for-profit standards body, and national GS1 offices assign prefixes; codes beginning 629 are issued through the UAE.
How stripes become digits
Each digit is represented by a pattern of two bars and two spaces spread across seven narrow units of width. A scanner sweeps a red laser line or takes an image with a camera, measuring where reflected light rises and falls. Guard bars at the start, middle and end tell the scanner where the code begins and which way up it is. Different patterns on the left and right halves allow a code to be read upside down or backwards. The software then recalculates the check digit. If the result does not match, the scan is rejected and the till stays silent, which is why cashiers sometimes have to try again.
From beep to database
Once decoded, the number is sent to the shop’s point-of-sale system, which retrieves the current price and description. This separation is powerful. A supermarket can change thousands of prices overnight without relabelling a single product, and promotions can apply automatically at the till. Each sale also reduces the stock count for that item, feeding automatic reordering from distribution centres and suppliers. The same code identifies the product on cartons in warehouses, so a pallet can be tracked from factory to shelf. In a sense, the beep at checkout is the visible end of a data chain that stretches back through the entire supply chain.
A short history
The idea dates to a 1952 American patent for a bull’s-eye pattern of circles, but practical use had to wait for affordable lasers and computers. In the early 1970s American grocers agreed on a common product code so that any manufacturer’s item could be read in any store. The first retail scan of a Universal Product Code took place in June 1974 in Troy, Ohio, on a pack of chewing gum, an item now kept in the Smithsonian collections. A European version followed in 1977, which grew into today’s worldwide system used by millions of companies in more than a hundred countries.
Common misconceptions
The first three digits do not prove where a product was made. They show which national GS1 office issued the company’s number, and a business can register in one country and manufacture elsewhere. Barcodes also do not hold secret information or tracking data about the buyer; the code on a tin is identical to the one on the tin beside it. Shops may add their own internal codes for weighed items such as fruit or meat, embedding the weight or price in the number. Finally, scanning errors usually come from damaged or wrinkled labels, poor contrast or curved surfaces, rather than from the code itself.
What comes next
Retail barcodes are gradually being joined by two-dimensional codes that can hold far more data, such as batch numbers, expiry dates and web links, in the same small space. The industry has set a goal for tills to read these richer codes alongside traditional stripes, a transition sometimes described as moving beyond the linear barcode. Radio-frequency tags, which can be read without a direct line of sight, are also common in clothing and logistics. Yet the original stripes remain cheap to print, quick to scan and almost universally understood by machines, which is why they still appear on nearly every packaged product you buy.
Sources & further reading
Figures are rounded and widely published; check the linked organisations for the latest editions. These organisations do not endorse this website.



