# What is a barcode?

Japanese: バーコード

**In one line:** A barcode is a code made of lines and spaces of different widths that stand for numbers or letters, so a machine can read them.

A barcode is a row of black lines and white gaps of different widths. Together they stand for numbers. At the checkout, a machine shines light on it and reads the lines. In a flash, it knows which item it is. In Japan, the common JAN code has 13 digits. If the first two are 45 or 49, a Japanese business registered it. The number names the item. It does not hold the price. The shop’s computer looks up the price from the number. That’s why, during a sale, the stripes stay the same.

**Common mix-up:** A barcode does not contain the price. It shows the item’s number, and the shop’s system keeps the price.

**Who invented it?**

Norman Joseph Woodland and Bernard Silver came up with the barcode in the United States and got a patent in 1952. The idea grew out of Morse code, which uses dots and dashes for letters. Scanners were not ready yet, so shops did not use barcodes for over 20 years. On June 26, 1974, a pack of chewing gum became the first item scanned at a checkout, in a supermarket in Ohio.

**What is the last digit for?**

A 13-digit product code like Japan’s JAN code holds a company number, an item number and one final check digit. The check digit is worked out from the other twelve digits with a fixed formula. If a number is misread or mistyped, the math no longer matches, and the machine knows right away. One digit out of thirteen has only one job: catching mistakes.

**How people use it**

- “The self-checkout couldn’t read the barcode, so I scanned it three times.”
- “Why do some books have two barcodes on the back?”

**FAQ**

- Is the price inside the barcode? — No. It shows the item’s number, and the shop’s system keeps the price.
- When were barcodes invented? — They were patented in the US in 1952. The first checkout scan was in 1974, when a pack of chewing gum was scanned at a supermarket in Ohio.
- What is the last number on a barcode? — It is a check digit. It is calculated from the other digits, so if something is misread, the scanner can tell.
- How is a barcode different from a QR code? — A barcode stores numbers in one row of lines, so it holds little information. A QR code stores data both across and down, so it can hold much more, like a web address.

Topic: Tech
Published: 2026-11-15
Source URL: https://eli5.net/en/w/barcode
日本語: https://eli5.net/w/barcode
