Skip to content
AMPthilly home
Get started
Labels & identification

What Is a Barcode?

Plain-English definition of a barcode: what a barcode contains, how the lines encode an identifier, the main barcode types, how scanners read them, and how barcodes are used for inventory and asset tracking.

AMPthilly Updated

A barcode is a machine-readable pattern of lines or shapes that encodes an identifier, letting a scanner look up the item it is attached to.

A barcode is a machine-readable pattern - classically a row of parallel lines of varying widths - that encodes an identifier a scanner can read in a fraction of a second. The crucial thing to understand is that the barcode itself carries almost no information: it holds a number, and the number is a key into a database where the real data lives - a product’s price, the stock count behind a SKU, or the owner and history behind an asset label.

That single idea - the code is a pointer, not the payload - explains almost everything about how barcodes behave: why a shop can change a price without reprinting a label, why the same code can mean different things in different systems, and why tracking your own equipment means printing your own codes rather than reusing whatever came on the box.

What you will learn

How barcodes work

In a one-dimensional barcode, the widths of the dark bars and light gaps encode digits or characters according to a symbology - a published rulebook for translating stripes into data. A scanner shines light across the code, measures the pattern of reflections, and decodes it back into the identifier. Quiet zones (the blank margins either side) tell the scanner where the code starts and stops, and most symbologies include a check digit so a misread fails loudly instead of silently returning the wrong number.

Because the code is only a lookup key, the same physical label can mean different things in different systems - which is precisely why organisations that track individual items print their own labels rather than reusing whatever is on the box.

What a barcode actually contains

Open up a retail barcode and there is less inside than most people assume. It is not the price, the product name, or the expiry date - it is a number, structured according to its symbology. A UPC or EAN code on consumer packaging is a globally unique product number: part of it identifies the manufacturer, part identifies the specific product, and a final check digit guards against misreads. Everything a shop actually shows you - the price, the promotion, the stock level - is looked up from that number in a database at the moment of the scan.

The parts of a linear barcode are worth naming, because they explain why a scan succeeds or fails:

  • Quiet zones - the blank margins on either side that mark where the code begins and ends. Crop them and the scan often fails.
  • Start and stop patterns - fixed bar sequences that tell the reader which symbology it is looking at and which way round the code runs.
  • Data characters - the bars and gaps that actually encode the digits or letters.
  • Check digit - a value calculated from the others so a damaged or misread code is rejected rather than silently returning the wrong item.

Two-dimensional codes change what is possible: a QR code or Data Matrix can hold thousands of characters, so it can carry a batch number, an expiry date, or a full web link alongside the product number. But the working assumption holds even there - the smart move is to keep the code small and put the detail in a system it points to.

How a scanner reads a barcode

Every barcode reader does the same fundamental thing: it turns a pattern of light and dark into a number. Dark bars absorb light and light gaps reflect it, so the scanner sees an on-off signal as it crosses the code. It times the widths of those bars and gaps, matches them against the symbology, and reconstructs the encoded characters.

How the light gets there varies by reader. Laser scanners sweep a single beam back and forth across the code and read the reflection - fast and cheap for straight-on retail scanning. Camera-based (imaging) readers photograph the whole symbol at once and decode it in software; because they capture a 2D image, they can read both linear barcodes and 2D codes, and from a wider range of angles. The phone in your pocket is a camera-based reader: its camera captures the code and software decodes it, which is exactly how a QR code opens a web page or an asset record straight from the browser.

That last point matters for anyone choosing between technologies. A traditional 1D barcode usually needs a dedicated scanning app to read on a phone, whereas a QR code is read natively by the camera app. For a fuller comparison of the two formats, see 1D vs 2D barcode.

Types of barcodes

  • EAN and UPC - the retail codes on consumer packaging worldwide, encoding a globally unique product number administered through the GS1 standards body. They identify a product type, not an individual unit.
  • Code 128 - a compact, flexible format common in logistics and internal labelling; encodes letters as well as digits.
  • Code 39 - an older alphanumeric format, less dense but very tolerant of cheap printing; long used for industrial and military labelling.
  • ITF-14 - the heavy-duty format printed on shipping cartons.
  • 2D matrix codes - QR codes and Data Matrix store data in two dimensions, hold far more (including full web links), and read from a phone camera. Strictly speaking these are barcodes too, just not made of bars.

The famous first retail scan - a pack of chewing gum through an American supermarket till in 1974 - was a UPC, and the same family of codes still runs retail half a century later.

Why 2D codes are taking over the checkout

For fifty years the linear UPC has ruled the supermarket till, but the industry is now shifting towards 2D codes. GS1, the organisation that governs retail product numbering, is steering retailers and manufacturers towards QR and Data Matrix codes that can carry far more than a product number - a batch or lot number, an expiry date, and a link to online product information all fit inside a single square.

The reason is capacity plus traceability. A linear barcode can hold a dozen or so digits; a 2D code can hold thousands of characters, which lets a supply chain track a specific batch, flag an expired item at the checkout, and hand the shopper a web link for recycling or provenance details - all from one scan. During the changeover, packaging typically carries both a 1D barcode and a 2D code so that any till, old or new, can still scan the product. The linear barcode is not disappearing; it is being joined by a richer sibling that the newer camera-based scanners can read just as easily.

Barcodes for inventory and asset tracking

In stock control, a barcode usually encodes the SKU, so a scan identifies which product is moving and the system adjusts the quantity. This is the heart of a barcode inventory system: instead of counting by hand and typing figures into a spreadsheet, staff scan items in and out, and the count updates itself. The payoff is fewer keying errors, faster stocktakes, and a live picture of what is actually on the shelf - the same reasons barcodes spread from supermarkets into warehouses and stockrooms in the first place.

Asset tracking asks a different question. The requirement is not “how many of these do we have” but “which exact one is this” - because “a microphone” is not the same question as “which of our twelve microphones is this one”. The manufacturer’s packaging barcode cannot answer that, since every identical unit carries the same code. So each item gets its own printed asset label with a unique ID, and the serial number is recorded in the register alongside it for warranty and insurance purposes. Each scan then resolves to a single item’s record - its owner, its location, its full history - rather than to a product description. If you are setting this up for the first time, asset tracking covers the wider picture and start with a simple asset register walks through the first steps.

Barcode vs RFID and NFC

Barcodes are optical: they need line of sight, one scan at a time, but cost virtually nothing to print. RFID tags answer a radio reader without line of sight and in bulk - a doorway reader can inventory a whole trolley - at a real cost per tag and per reader. NFC is the short-range cousin built into phones, read by tapping rather than scanning. The honest summary: printed codes win on cost and simplicity, radio wins on speed at scale, and most small and mid-size operations never reach the scale where radio pays for itself.

FAQ

What information does a barcode contain? Almost always just an identifier - a number or short string. The barcode on a tin of beans does not contain the price, the product name, or the expiry date; it contains a product number that the till looks up in a database, which is where the price actually lives. This is why a shop can change a price without reprinting a single label: the code stays the same, the record behind it changes. Newer 2D codes can hold more - a batch number, an expiry date, a web link - but the principle is the same: the code is a key, the detail lives in a system.

How does a barcode scanner read a barcode? A scanner shines light across the code and measures what bounces back. Dark bars absorb the light and light gaps reflect it, so the reader sees an on-off pattern that it times into wide and narrow elements, then decodes back into digits using the symbology’s rulebook. Laser scanners sweep a beam across the code; camera-based readers, including the one in a phone, photograph the whole symbol and decode it in software. Either way the output is the same short identifier.

What is the difference between a barcode and a QR code? A traditional barcode is one-dimensional: a single row of lines holding a short identifier, usually read with a laser scanner or a scanning app. A QR code is a two-dimensional matrix that stores far more data - enough for a full web link - reads natively in any modern phone camera, and includes error correction so it scans even when partly damaged. Barcodes remain dominant in retail because the global product-numbering infrastructure is built on them, though the industry is now moving towards 2D codes at the checkout.

Are barcodes being replaced by QR codes? Slowly, and side by side rather than overnight. GS1, the body behind retail product numbers, is steering the industry towards 2D codes (QR and Data Matrix) that can carry a batch number, expiry date, and web link on top of the product number. During the transition, packaging often carries both a 1D barcode and a 2D code so every till can still scan it. The classic linear barcode will be around for years yet - it is cheap, universal, and good enough for a simple lookup.

Can you track assets with barcodes? Yes, with one important adjustment: retail barcodes identify a product type, so every identical laptop carries the same code, while asset tracking needs each individual item identified uniquely. That means printing your own labels with one unique ID per item rather than relying on the manufacturer’s packaging barcode. Each scan then resolves to a single item’s record - its owner, location, and history - not to a product description.

The takeaway

A barcode is a machine-readable key, not a data store: it holds a short identifier, and everything useful - price, stock level, owner, history - lives in the system that identifier points to. Linear codes like UPC and EAN still run retail, 2D codes like QR and Data Matrix are joining them at the checkout, and scanners of every kind do the same job of turning light and dark into a number. For tracking your own equipment, the trick is a unique code per item rather than a shared product code, so each scan lands on one asset’s record.

Tools that make this easier

AMPthilly gives every asset a printable QR label that opens its record in any phone browser - no app to install and no scanner hardware to buy. The unique ID lives on the asset profile and the QR is generated from that record, so a phone-camera scan always resolves to the right item. Scan a label to check it in or out, see who has it, or report a problem, and every action lands in the asset’s audit history. Print labels singly or in batches, choose the size for sticker sheets or a label printer, and regenerate a label if one gets damaged. Start free - 3 users and 25 assets, no credit card required - or talk to us about a larger rollout.

  • Asset Label - the printed label that gives each individual item its own scannable ID
  • SKU - the product-type identifier most retail and stock barcodes encode
  • Serial Number - the manufacturer’s per-unit identifier, recorded alongside your own ID
  • RFID - radio tags read at a distance, without line of sight
  • NFC - tap-to-read radio identification built into modern phones

Free to start, no card required

Put your register to work

AMPthilly gives every asset an owner, a location, and a history - checkouts, printable QR labels, service desk, and audit trail in one place. The free plan covers 3 users and 25 assets, with SSO and MFA included.