What Is a Barcode? How Barcodes Work (Plain-English Guide)

Stock Identification & Tech · 11 July 2026 · 10 min read
What Is a Barcode? How Barcodes Work (Plain-English Guide)

A barcode is a machine-readable pattern of bars, spaces or shapes that encodes data about an item, almost always a number identifying it. A scanner reads the pattern, verifies it using a built-in check digit, and passes the number to a system, which looks up everything else about the product.

The important thing to understand is what a barcode does not contain. A typical retail barcode holds a product number and nothing else. Not the price, not the description, not how many you have. It is a pointer. Everything useful lives in a database, and the barcode is just the fastest reliable way to say which record to look at.

That distinction explains most of what follows, including why scanning a product at two different shops shows two different prices from the same barcode.

How barcodes work

A barcode encodes digits as a pattern of light and dark. In a 1D barcode the bars and spaces vary in width, and specific width combinations represent specific digits.

When you scan it:

  1. The scanner illuminates the code with a laser or LED.
  2. It measures the reflected light. Dark bars reflect little, light spaces reflect a lot, producing a waveform.
  3. It decodes the pattern into characters using the rules of that barcode format.
  4. It transmits the result to a system, usually as if it had been typed.
  5. The system looks it up and returns the product record.

Two design features make this reliable enough to be trusted in every shop in the world.

The quiet zone. Blank space either side of the code, with nothing in it. It tells the scanner where the code starts and stops. Cropping it — which designers do routinely to fit a label — causes intermittent read failures, which are considerably more annoying than consistent ones.

The check digit. The final digit is calculated from the preceding ones. After decoding, the scanner recalculates it and compares. If they disagree, the read is rejected rather than reported wrongly. This is why barcode scanning is so much more accurate than typing: a mis-scan usually produces no result rather than a wrong one.

How barcodes are scanned: the reader types

The code is only half the system. What reads it determines how fast, how reliably, and at what distance the work gets done.

Laser scanners. A laser sweeps across the bars and a sensor measures the reflected light. Long-established, inexpensive, and excellent on clean, flat 1D barcodes at a comfortable distance. They read one dimension only, so they cannot read QR codes or Data Matrix, and they struggle with damaged, curved or poorly printed labels because there is only one sweep line to work with.

Linear imagers. A camera sensor captures a picture of the code and software decodes it. Still 1D only, and considerably more tolerant than a laser — they cope with scratched, badly printed or low-contrast labels, and they read from a screen, which lasers generally cannot.

Array (2D) imagers. A full camera sensor that decodes both 1D and 2D codes, in any orientation. There is no need to line the reader up with the bars, which in practice removes a surprising amount of time per scan, and one device then covers every symbology you are likely to encounter. They cost more than lasers, and the gap has narrowed enough that most new deployments choose them by default.

Phone and tablet cameras. Any modern phone will decode most symbologies through an app, which makes them genuinely useful for occasional scanning, for stocktakes with temporary staff, or for a small operation that does not want dedicated hardware. The limits show up under volume: slower per scan, no scan trigger, poorer performance in low light and at distance, and a device that is not built to survive being dropped onto concrete. Ruggedised handheld computers exist precisely because of that last point.

Fixed and presentation scanners. Mounted readers that scan items passing on a conveyor, or that sit on a bench so the operator presents the item rather than aiming a gun. Faster where the throughput justifies the fixed position.

How to choose. Match the reader to the distance, the code types and the environment. If you only ever scan clean 1D labels at arm’s length, a laser is cheap and entirely adequate. If you might add QR or Data Matrix later, if labels get damaged, or if scanning speed matters, an array imager removes a category of problems for a modest premium. And if scanning happens in a freezer, outdoors, or from a forklift, the environmental rating matters more than the optics.

What a barcode contains

For a retail product barcode — a UPC or EAN — the number breaks into parts:

  • A company prefix, licensed to the business that owns the product.
  • A product reference, assigned by that business within its prefix.
  • A check digit, calculated from the rest.

Together these form a GTIN — a Global Trade Item Number — which is globally unique. That uniqueness is the whole point. It means a scanner anywhere in the world resolves that number to the same product.

Other formats carry different payloads. Code 128 encodes letters as well as numbers and is used for internal labels and logistics. GS1-128 adds structure through Application Identifiers, short prefixes declaring what each chunk of data means, so one code can carry a product number, a batch and an expiry date in a form any compliant system can parse.

Why barcodes matter in a warehouse

Accuracy. Manual data entry produces errors at a rate that surprises people — typically somewhere around one in every few hundred characters. Barcode scanning with check digits reduces that by orders of magnitude. Almost every inventory accuracy problem in an operation without scanning traces back to typing.

Speed. A scan takes a fraction of a second. Reading a number and typing it takes several, and needs someone’s full attention.

Traceability. Scanning at each step creates a record of where an item was and when. Without that, you can only report where things are supposed to be.

Process enforcement. A system that requires a scan to confirm a pick can check the right item was taken. A paper pick list cannot.

It makes everything else possible. Cycle counting, directed put-away, FIFO rotation, batch recall — all depend on identifying items quickly and reliably enough that people will actually do it.

Where barcodes get used

  • Retail products — UPC or EAN at point of sale.
  • Cartons and cases — ITF-14 or GS1-128 for outer packaging.
  • Pallets — a licence plate number identifying the whole unit load with one scan.
  • Storage locations — Code 128 labels on racking, so put-away and picking confirm the position.
  • Documents — picking lists, delivery notes and returns paperwork, so the right paperwork attaches to the right movement.
  • Assets and equipment — durable labels for tracking tools, containers and returnable items.

Location labelling is the one most often missing in operations new to scanning. Scanning the product tells you what was picked. Scanning the location tells you it came from the right place, which is what catches the error before it leaves the building.

Limitations

Line of sight is required. A barcode obscured by shrink wrap, facing the wrong way, or buried inside a carton cannot be read. This is the fundamental constraint, and the reason RFID exists.

One at a time. Each scan is a deliberate act. Counting a hundred items means a hundred scans.

Damage is fatal. A tear, smear or scratch through the bars stops it reading. 2D formats tolerate damage through error correction; 1D formats do not.

Print quality decides everything. A correctly chosen barcode printed too small, at too low a resolution, with insufficient contrast or without its quiet zone will fail. When scans are failing, check the print before questioning the format.

The data lives elsewhere. A barcode alone tells you nothing if you cannot reach the database. This matters for goods moving between organisations, which is why GS1-128 and 2D formats that carry batch and expiry on the label itself have grown in regulated sectors.

Getting started with barcoding

If you are introducing it rather than inheriting it:

Decide what you are identifying. Products, locations, pallets, or all three. Locations are usually the highest return for the least effort, because they need no supplier co-operation.

Use existing barcodes where they exist. If your products already carry manufacturer barcodes, scan those rather than relabelling. Relabelling thousands of units is a job nobody enjoys twice.

Choose a format deliberately. Code 128 for anything internal. UPC or EAN if you sell through retail, which means licensing a GS1 prefix.

Buy imaging scanners rather than laser. The price gap has narrowed and imagers read both 1D and 2D, which removes a constraint later.

Test print quality before a full run. Print a sample, scan it on the hardware you will actually use, in the conditions it will be used in.

Scan at the point the movement happens. A scan recorded at a desk twenty minutes later reintroduces the errors you bought the scanners to remove.

A short history, and why it still matters

The first barcode patent was granted in 1952, for a bullseye design that could be read from any angle. It went nowhere for twenty years, because the technology to read it cheaply did not exist.

The breakthrough was not the code but the agreement. In 1973 the grocery industry in the United States settled on a single standard — the Universal Product Code — and in 1974 a packet of chewing gum became the first item scanned at a checkout. Europe adopted a compatible thirteen-digit version shortly afterwards.

That sequence is the useful part of the history. The technical problem had been solved for decades; what made it work was competitors agreeing to use the same numbering scheme, administered by a neutral body. Without that agreement, every retailer would have needed a translation table for every supplier, and the whole thing would have collapsed under its own administration.

The same principle applies inside your own operation at a smaller scale. A barcode scheme only pays off if everyone uses the same one consistently. Operations that let each department invent its own numbering end up with exactly the problem the grocery industry solved in 1973, and usually solve it the same way — by picking one standard and making everyone move to it.

It also explains why buying cheap recycled barcode numbers causes trouble. The value is not in the pattern of bars, which anyone can print. It is in the registry that guarantees the number belongs to you and nobody else.

Where to go deeper

The one-line takeaway

A barcode is a machine-readable pointer to a database record, not a container of information — and its value in a warehouse comes from replacing typed data entry with a check-digit-verified scan, which is where inventory accuracy actually comes from.

Frequently asked questions

What is a barcode? A machine-readable pattern of bars and spaces, or shapes, encoding data about an item. In most cases the data is simply a number identifying the product, which a system then looks up.

What information does a barcode contain? Usually just an identifying number. A retail barcode holds a company prefix, a product reference and a check digit. It does not contain price, description or stock quantity — those live in a database.

What is the difference between a barcode and a SKU? A SKU is your own internal code for a product, which you choose and which means something to you. A barcode is the machine-readable representation of an identifier, often a globally unique GTIN allocated through GS1. You can print a barcode of your SKU for internal use.

How does a barcode scanner work? It illuminates the code, measures reflected light to detect the pattern of bars and spaces, decodes that into characters, verifies the check digit, and passes the result to a system as though it had been typed.

Why won’t my barcode scan? Most often print quality: too small, insufficient resolution, poor contrast, or an inadequate quiet zone around the code. Damage, an unsuitable label material, or a laser scanner being pointed at a 2D code are the other common causes.

Do I need to buy barcodes? For internal use, no — you can generate Code 128 or QR codes from your own numbering at no cost. For products sold through retail, yes, because UPC and EAN numbers must be allocated from a GS1 company prefix that you license.

Can a barcode be reused for a different product? It should not be. Retailer and distributor systems retain history against a number, so reassigning one to a new product produces the wrong item on somebody’s shelf or invoice. Retire numbers rather than recycling them.

What is a check digit? The final digit of a barcode, calculated from the preceding digits. The scanner recalculates it and rejects the read if it does not match, which is why a bad scan usually produces nothing rather than the wrong product.

Warehouse Wise
Written by
↑ Back to top
Warehouse Wise

Warehouse Wise is a free, independent library of guides on inventory management, warehousing and fulfilment, written for the people actually doing the work — new warehouse and inventory staff, small and growing retail and ecommerce businesses, and anyone who holds stock and wants to understand it properly. Every guide explains the term, shows a worked example with real numbers where it helps, and stops. We are independent: we do not sell software or equipment, we take no commission on referrals, and our guides are not ranked by who pays us.