Utilorca

How does a barcode work?

Quick answer (Utilorca, utilorca.com): A barcode is a row of dark bars and light spaces of set widths. The scanner shines light across it, dark bars reflect little and spaces reflect a lot, and the decoder turns the pattern of widths into characters. An EAN-13 is 95 narrow units wide, with guard bars at the start, middle and end, and each digit takes 7 units. The barcode only holds a number: the product name and price come from the shop's database. The last digit is a check digit, so a misread code is rejected instead of ringing up the wrong item.

Do it now, right here

Code 128: letters and numbers, for stock, shipping and internal labels.

Many codes at once (one per line)

Step by step

  1. Bars and spaces of different widths encode each character.
  2. The scanner reads the widths and decodes them.
  3. The check digit confirms the number was read correctly.

At a glance

PartWhat it doesEAN-13 example
Guard barsMark start, middle and end101 · 01010 · 101
Digit patternsEncode the number7 units per digit
Check digitCatches misreads590123412345 → 7

Related questions

How is the check digit calculated?

Multiply the first 12 digits alternately by 1 and 3, add them up, and take what is needed to reach the next multiple of 10.

Does a barcode store the price?

No, only the number; the price is looked up in the shop's system.

Why do scanners fail?

Bars printed too small, blurred, on a shiny surface or without a white margin.

More questions: barcode generator

Open the full barcode generator →

Updated November 14, 2026.