SIMETRIUM .COM EAN-13 · 95 modules
ISO/IEC 15420 · GS1
EN|36 languages
Do not confuse
A barcode is a way of writing a number, not the number itself. The same GTIN product number can be written as EAN-13 stripes, a Data Matrix square or a QR code.
Capacitance
EAN-13 carries 13 digits in 37 mm. A QR code of the same area holds hundreds of characters: a second dimension and error correction.
On the plate is a label with an EAN-13 code above a checkout scanner window. A red beam runs along the scan line, and the spot of light crosses the code bar after bar. Beneath the label a photodiode draws the signal: a dark bar is a dip, a white space is a peak. When the spot reaches the right edge, the decoder unpacks 59 transitions into 13 digits. The digits light up green and the scanner beeps.
Term passport · automatic identification · linear code

Barcode

EAN-13 · 13 digits · 95 modules · 30 bars · 29 spaces

The cashier passes a carton of milk over the scanner window, and a split second later the till beeps. The red beam has crossed 30 bars and 29 spaces, and the photodiode has seen 59 brightness transitions. The decoder unpacked them into 13 digits and checked the last one. If the carton is crumpled and a crease runs across a bar, there are 61 transitions and the till stays silent. The code is designed to refuse to read rather than read wrongly.

A barcode records a number in the widths of dark and light stripes. The widths are multiples of the module, the narrowest stripe. In EAN-13 every digit takes 7 modules: two bars and two spaces. The first digit has no bars of its own; it is hidden in which sets the left half is written in. The thirteenth digit is the check digit: it is calculated from the other twelve.

What it isan optical machine-readable code of parallel bars and spaces
SymbologyEAN-13 and UPC-A on goods, ITF-14 on cartons, Code 128 in logistics
ModuleX = 0.330 mm at 100 %; 80–200 % is allowed, from 0.264 to 0.660 mm
Capacitance12 information digits and one check digit: 10¹² numbers
Protectiona check digit with weights 1 and 3; catches any single error
Read witha 650 nm red laser with a photodiode, or a camera with illumination
To the scanner To the evolution of codes
Etymology

A stroke from German, a book from Latin

The code was invented in the USA and named after its look: bar code, “striped code”. Other languages either took over the English word or translated it with their own roots. The Russian «штрих-код» is put together from German and Latin loanwords; standards write «штриховой код».

штрихGer. Strich
streichen · to draw→Strich · line→штрих
The German Strich means a stroke or line, from the verb streichen, “to draw, to stroke”. In Russian the word settled in drawing and engraving: «штрих» is a short line used to lay in shadow. Hence «штриховка» (hatching) and «штриховой код».
codeLat. codex
caudex · trunk→tablets · book→code of laws→cipher, code
The Latin caudex, codex meant a trunk or log, then wooden writing tablets bound together, and a book. A book of laws was also called a codex. In the nineteenth century the French code came to mean a system of conventional signs: telegraph codes replaced phrases with short groups of letters.
barcodeEng. bar + code
OFr. barre · beam→bar · stripe→bar code → barcode
Bar means a rod, a crossbar, a stripe; via Old French barre. At first it was written as two words, bar code, later as one. Russian took its own «штрих» instead of bar, and kept code.
What it is called in other languages
条形码 tiáoxíngmǎ — Chinese: “code of stripes”, a calque of the English; short form 条码
バーコード bākōdo — Japanese: the English word in katakana; the product number in Japan is JAN
código de barras — Spanish and Portuguese: “code of bars”
الباركود — Arabic: a loan; the standards write الرمز الشريطي, “striped symbol”
зураасан код · баркод — Mongolian: “code of strokes” and a loan from English
code-barres · Strichcode — French and German: the same “striped code”
EAN
European Article Numbering, the European numbering of goods; now International Article Number
UPC
Universal Product Code, the USA and Canada. In Japan the same format is called JAN, Japanese Article Number
GTIN
Global Trade Item Number, the product number itself, which is written as a barcode
QR
Quick Response: the code was designed for fast reading in a factory
01 · Structure

Thirteen digits in 95 modules

The code is read from left to right by modules: 1 is dark, 0 is light. Guard patterns 101 stand at the edges and 01010 in the middle. Between them are six digits on the left and six on the right, 7 modules each. Each digit is two bars and two spaces, from one to four modules wide.

A digit can be written in three sets. Set L starts with a light module and has an odd number of dark ones. Set G is the mirror image of R and has an even number of dark ones. Set R is the negative of L and appears only on the right. From the alternation of L and G in the left half the scanner learns the first digit, and the direction too: the code can be swiped upside down.

dᵢ — digit at position i · c — check digit · eₖ — element width in modules · X — module width · k — print scale
95
modules edge to edge
59
transitions the scanner sees
10¹²
product numbers
Interactive · one digit, three sets

How a digit becomes stripes

Choose a digit. Below is its pattern in three sets of 7 modules and the alternation of sets if this digit comes first.

Reference · EAN-13 at 100 %
0.330 mmmodule width X 37.29 × 25.93symbol size in millimetres including the quiet zones 11X · 7Xquiet zones left and right, an empty margin with no print 22.85 mmbar height; it must not be trimmed
Interactive · scanner lab

Damage the code and see when the till gives up

Three experiments on one label. “Encoding”: change digits and watch which stripes are rebuilt. “Scanner”: move the beam, shrink the print, spread the ink, scratch. “Cashier error”: enter a number with a mistake and check whether the check digit catches it.

Beam line
Print size
Ink spread

Chart · where the code reads
Print size and ink spread
Each cell is a separate read of the current code with the same beam, the same scratches and the same colour. Green: read; red: unreadable; yellow: the check digit does not match. The dot is your sliders.
axis: print size, %spread, modules
Chart · what the check digit catches
Share of errors caught
The frame is the theory for all possible errors of this kind, the fill is your experiments in “Cashier error” mode. A swap across one digit is never noticed by weights 1 and 3.
error type% caught
02 · Evolution of codes

From a circle in the sand to a square on a pack

Each new code answered one problem of the old one. The circle read from any side but printed badly. Coloured stripes on railway wagons faded. Numeric codes could not do letters. Linear ones held no more than a couple of dozen characters, and the code grew into a second dimension.

carrieswhy
03 · Compression and capacity

Digits only, five lengths

A code compresses data by choice of alphabet. Code 39 spends 16 modules on any character because it also handles letters. Code 128 in set B puts a character in 11 modules, and in set C two digits at once. ITF hides the second digit of a pair in the spaces of the first. EAN-13 is the densest: it knows in advance that there are exactly 13 digits.

DIGITS TO ENCODE

All codes are drawn with one module of 0.33 mm, without quiet zones. On the right is the length in modules and in millimetres.
code
type
digits
letters and digits
byte
error protection
04 · What is encoded

A number, not a description

The code holds no name, no price and no expiry date. Only the GTIN, by which the till finds the product in its database. The first three digits are the prefix of the national GS1 organisation that issued the company number. It does not mean the country of manufacture: a factory in China can get a number in Germany, and an Argentine company one in the USA. Next come the company number and the item number, and the boundary between them floats. The last digit is the check digit.

The numbers are made up; the prefixes and the structure are real. The selected number also goes to the scanner lab.
Breaking down a number
GS1 prefixes, a selection
05 · Printing rules
Correct
dark bars on a light background: black, blue, dark green
quiet zones: 11X on the left and 7X on the right, with no frames or text
scale 80–200 %, module from 0.264 to 0.660 mm
on a thermal printer, bars along the direction of paper travel
digits under the code in OCR-B so a cashier can key them in by hand
Incorrect
red and orange bars: the red beam sees them as paper
light bars on a dark background for a checkout EAN-13
trimmed bar height: the scan line will not find a whole code
a code on a seam, on a bag fold or under glossy film with glare
print smaller than 80 %: the beam spot is wider than the narrowest space
06 · Neighbouring codes
07 · Historical section
dots and dashes → bars
Note

Norman Woodland, by his own account, thought up the code on a beach in Miami. He drew the dots and dashes of Morse code in the sand with his fingers and pulled them downward, which gave narrow and wide stripes. So that the mark could be read from any side, he bent the stripes into rings. In 1952 he and Bernard Silver received US patent 2 612 994.

There was nothing to read a circle with: the test needed a powerful lamp and a photomultiplier from a film projector. The code waited twenty years for cheap lasers and chips. In 1973 American retail chains chose the rectangular UPC, developed at IBM with Woodland's participation. The circles lost because of printing: on a moving press web the ink smeared them in one direction.

“bull's-eye”, 1952
Catalogue of quantities
the whole index →
the foundation · 7 units

The seven SI base units

on this topic · codes and designations
The index lab: a glass of cabbage juice, a burner, a glass of water on a cold plate and a gear train
Index · all quantities on one page
The lab at the entrance to the index

A drop of acid changes the colour of the juice, salt colours the flame, water freezes at a tap. Below them are all Simetrium sheets, by discipline and alphabetically.

Open the index →
08 · Your language
every link is a real page in that locale

Read it in your own language

translated and checkeddraft translationqueued