How barcodes work

Barcode scanBarcodes are the most popular and accurate way to simplify inventory, scan packages and streamline the purchase of material goods. Nearly every item now has a barcode, and also the smallest stores have adopted this system for the checkout. But how do barcodes work, precisely? How do all those lines and numbers — be it on a UPC or EAN or any other else — produce a unique identification code?

The process is more or less like that; let’s take a classical UPC code as an example.
First of all a manifacturer asks the local UCC (Uniform Code Council) to enter the system in return for a fee — and thus gets a single 6-digit identification number that will be a part of the different 12-digit barcodes (which on the contrary singles out each item). So basically the barcode number is composed this way:
Upc barcode formats

  • The first six digits are the UCC manifacturer identification number;
  • The following five digits are the item number (also assigned by the UCC, of course avoiding any duplication);
  • The final digit is a check digit, that is required by the scanner to verify the accuracy of the operation (through a particular sum of the previous digits).


Then of course there’s the machine-readable pattern, which also encode the item information in white and black bars. Here the difference is made by the line widths (between 1 and 4 units), the proportion of which identifies the product; the only constant pattern is the first three bars — the start code, that helps scanners to track the beginning. Each number below the pattern corresponds univocally to a group of four stripes, and each four stripes is wide exactly like 7 units.

Of course there are several barcode types with different numbers of digits and different patterns, but the working principles are the same. Here’s a video that explains it clearly:


And a final word: despite of its technical complexity, nowadays it’s extremely easy to design and print barcodes especially using a label creation software.