By ToolNexus Team

Every packaged item you have bought carried one. Almost nobody knows what the stripes mean. So what is a barcode? It is a number written in a way a machine can read faster and more reliably than a person can type it. That single property changed how retail works.

Quick Answer at a Glance

Question Short answer
What it stores Usually a number, sometimes short text
What it does not store Prices. Those live in the shop’s database
How it is read A scanner measures the width of the bars and gaps
Main retail types UPC in North America, EAN elsewhere
Dimensions One, read across a single line
Replaced by QR codes No. The two do different jobs

How the Stripes Actually Work

The information is in the widths rather than in the bars themselves.A scanner shines light across the code and measures how long each dark and light region lasts. Those widths follow a defined pattern where certain combinations mean certain digits. Reading the pattern gives the number. That number is then looked up in a database to find the product, the price and the stock level.That last point surprises people. A barcode contains no price. Change what you charge for something and no label needs reprinting, because the price was never in the code. That separation is precisely why the system scaled.

The Types You Will Actually Meet

Type Where you see it What it holds
UPC-A North American retail 12 digits identifying a product
EAN-13 Retail outside North America 13 digits, with a country prefix
Code 128 Shipping, logistics, warehouses Letters and numbers, variable length
ITF-14 Outer cases and cartons 14 digits, printed on corrugated board
Code 39 Older industrial and military systems Letters and numbers, less compact

UPC and EAN are the two most people encounter. They are close relatives, which is why a European product usually scans without complaint at an American till.

Where the Number Comes From

Retail barcode numbers are not invented by the manufacturer. They are issued.A global organization allocates company prefixes. Each business assigns product numbers within its own prefix. That is what keeps the numbers unique worldwide. It is also why a genuine retail barcode costs money to obtain while an internal warehouse label costs nothing. A shop tracking its own stock can print whatever numbers it likes, since nobody outside the building needs to interpret them.

Barcode or QR Code

Barcode or QR Code

They coexist because they solve different problems.

Comparison Barcode QR code
Dimensions One Two
Capacity Around 12 to 20 characters Thousands of characters
Damage tolerance Poor. A scratch across it fails Good. Error correction rebuilds it
Reading angle Needs a straight-on line Reads at any rotation
Typical use Product identification at a till Links, Wi-Fi, contacts, menus

A supermarket does not need a QR code to identify a tin of beans. Twelve digits does the job, prints tiny and scans in milliseconds with cheap hardware. The barcode survives because it is sufficient, which is usually the reason old technology survives.

Why They Fail to Scan

Four causes cover nearly all of it.

  • Damage across the bars. A single scratch running the wrong way breaks the pattern.
  • Poor contrast. Faded printing or a colored background confuses the reader.
  • Curvature. A label wrapped tightly around a bottle distorts the widths.
  • Missing quiet zone. Barcodes need clear space at both ends and printing too close to the edge removes it.

Reading One Yourself

The ToolNexus tool that will scan qr code from image has a barcode mode as well. Upload a photograph of the label and the number is decoded and displayed, which is useful for checking a code you have printed or reading one from a picture somebody sent you.For scanning with a phone camera in a shop or a warehouse, the practical method is in how to scan a barcode with phone.

A Note on Trust

A barcode carries a number and cannot send you anywhere, which makes it harmless in a way QR codes are not. If a label on a package carries a QR code rather than a barcode, the caution described in are qr codes safe applies.

About the Author

The ToolNexus Team builds free browser based file tools. The site started with a small group of developers who thought professional grade utilities should not carry a professional grade price tag. It now runs ten tools covering images, PDFs, video and code.

FAQs About what is a barcode

What is the difference between a barcode and a QR code?

A barcode stores data in one dimension, read across a single line. It holds around twelve to twenty characters. A QR code stores data in two dimensions and holds thousands, with error correction that survives damage. Barcodes identify products cheaply. QR codes carry links, credentials and text. Neither replaced the other because their jobs barely overlap.

Is a QR code considered a barcode?

Technically yes. A QR code is a two dimensional barcode. The broader term covers both. In everyday use barcode means the striped one dimensional kind and QR code means the square. The formal distinction matters mainly when buying scanning hardware, since older equipment often reads only the linear types.

Can I create my own barcode?

For internal use, easily and free. Generate any number, print it, then read it back with your own system. For retail it is different. Selling through shops needs a number issued through the global registration system, which costs money and guarantees the code is unique worldwide. Inventing one risks colliding with a real product.

Why are barcodes needed?

Speed and accuracy. A person typing a twelve digit number makes mistakes and takes several seconds. A scanner reads it correctly in milliseconds. Multiply that across every item in every shop and the saving is enormous. The accuracy matters more than the speed, since a mistyped product code corrupts stock records rather than merely slowing a queue.

What’s the difference between QR and barcode?

Capacity and resilience. A QR code holds far more data and keeps working when part of it is damaged or covered, because of built in error correction. A barcode holds a short number and fails if a scratch crosses the bars. The barcode wins on cost and print size, which is why tills still use them.

A Number, Written for Machines

That is all a barcode is. The stripes encode digits. The digits identify a product. Everything else lives in a database. Decode any barcode from a photograph free on ToolNexus with no account.