Home/Encoding Knowledge/Barcode Basics/What is a product barcode
Barcode Basics · 5 min read
Barcode BasicsContent reviewed

What is a product barcode? From 1D barcode to 2D code

A product barcode is not a "pattern stuck on the packaging," but a structured string of numbers printed in graphical form for machine reading. Understanding this is the only way to avoid all the later pitfalls related to applications.

Executive summary:This article explains the essence of product barcodes—numbers first, graphics second; the reading methods and applicable boundaries of 1D barcodes and 2D codes; and why the same product uses codes of different lengths (GTIN-8/12/13/14) at different stages. After reading, you will clearly understand what the word "barcode" actually refers to in a business context.
01

The essence of a barcode is numbers, not patterns

A barcode scanner performs a "graphic → number" translation process. Taking EAN-13 as an example, among the 13 digits: the first 2–3 digits are the GS1 prefix code (identifying the source of the number segment allocation), the middle is the manufacturer identification code, followed by the item reference code, and the last digit is the check digit calculated using the mod10 algorithm. The pattern itself has no meaning; the meaning lies entirely in the rules for arranging the digits. This explains a common confusion: why a set of black-and-white stripes you draw yourself cannot be scanned — because the decoder expects a sequence of stripe widths that strictly follows the encoding rules, not lines that "look like a barcode."

02

How much information can a 1D barcode hold

EAN-13 holds 13 digits, UPC-A holds 12 digits, ITF-14 holds 14 digits, and Code 128 can hold longer alphanumeric strings. The information capacity of a 1D barcode is strongly tied to its physical length: to hold more characters, the symbol must be longer and wider, and when packaging space is limited, you hit a wall. This is why 2D codes are needed.

03

What is different about 2D codes

2D codes (QR Code, Data Matrix, etc.) encode both horizontally and vertically on a two-dimensional plane, giving them a much higher information density than 1D barcodes, and they can carry structured data such as URLs, batch numbers, expiration dates, and serial numbers. But note: 2D codes solve "can it fit," not "is it correct." Retail checkout systems generally identify products by EAN-13 / UPC-A, and replacing the primary product code with a 2D code is usually not accepted.

04

Why does the same product have several codes

A product passes through multiple stages from the production line to the consumer's hands, and each stage has different identification needs: the retail unit uses GTIN-13 (or GTIN-12), the full case uses the ITF-14 case code, the pallet uses the SSCC logistics unit serial number, and parties and locations use the GLN. These codes do not conflict or duplicate each other; together they form a traceable chain from factory to shelf.

Key points at a glance

Key conclusions that can be excerpted directly.

Point 01

Numbers first, graphics second

The barcode graphic is merely the "font" of the numbers; the essence of scanning is translating it into numbers.

Point 02

The check digit is calculated

The last digit is not allocated, nor filled in arbitrarily; it is derived from the preceding digits according to an algorithm.

Point 03

The retail primary code should not be replaced with a 2D code

Checkout systems identify products by EAN-13 / UPC-A, and changing the format will cause checkout failures.

Key Point 04

A product can have multiple codes

Retail units, cases, pallets, and locations each use different code systems, working together rather than replacing one another.

Data Comparison

Barcode symbologyDigits / CapacityTypical use
EAN-13(GTIN-13)13 digitsRetail unit, common in most markets
UPC-A(GTIN-12)12 digitsSingle retail unit, traditional format for North American channels
ITF-14(GTIN-14)14 digitsCarton / outer case identifier, first digit is the packaging indicator
Code 128 / GS1-128A relatively long alphanumeric stringCarries logistics, batch, expiry, serial number, etc.
GS1 DataMatrix / QR CodeMay contain structured dataTraceability, regulatory compliance, consumer engagement

Illustration

EAN-13 · 13 digits

EAN-13 · 13 digitsReal barcode rendering
6901234567892

The example is a GTIN-13 in the 69 prefix range (including the mod10 check digit), a demonstration number generated according to the rules, not an actual code of any company.

Terminology explanation

The proper nouns involved in this article.

GTIN

The general term for Global Trade Item Number, covering four lengths: GTIN-8/12/13/14.

EAN-13

A 13-digit product barcode symbol, the carrier form of GTIN-13, and the mainstream format in the global retail system.

Check digit

The final digit derived from the preceding digits by a fixed algorithm, used to quickly detect data entry or printing errors.

GS1 prefix

The prefix range assigned by GS1 to each member organization, identifying the source of code allocation, not the country of origin.

SSCC

Serial Shipping Container Code, 18 digits, used to identify logistics units (cases, pallets, etc.).

Related Q&A

Are barcode and tiaoma the same thing?+
In everyday usage they are the same. "Barcode" emphasizes the one-dimensional striped form, while "tiaoma" is a broader general term that also includes 2D codes. In formal documents, the specific symbology name (such as EAN-13) is usually written directly to avoid ambiguity.
The barcode won't scan but the number is correct — is the code wrong or is the scanner broken?+
The more common cause is a printing issue: too small a size, insufficient color contrast, insufficient left and right quiet zones, or printing on a curved surface or seam. First scan a standard printed item with the same scanner as a control; this quickly distinguishes whether it is a symbol problem or an equipment problem.
Can the country of origin of a product be told from the digits in a barcode?+
No. The prefix code identifies the source of allocation of the number range (which member organization issued the number range), not the place of production. The same brand may produce in multiple locations, and the prefix code can be exactly the same.
Do I have to go through an agent for this?+
It is not mandatory. You can apply directly to the corresponding member organization; the value of an agent lies in selecting the number range, arranging the numbers, checking materials, and managing the continuity of subsequent changes and renewals. Whether to entrust this depends on your time cost.
Can the numbers in the content be used directly?+
The barcodes appearing in the text are all demonstration numbers generated according to GS1 rules. The structure is valid, but they do not belong to any company. Do not use them directly for real products; official codes must be arranged by yourself according to the code segment obtained through registration.
How long until I get a result?+
Acceptance periods vary among member organizations. This site does not provide unconfirmed commitments regarding the number of days. After you submit your request, a coding consultant will update the milestones according to the current acceptance progress.

Authoritative sources and notes

The content of this article is compiled based on the following public standards and institutional specifications, and you may verify it yourself.

Source 01

GS1 General Specifications

GS1 is the international organization that manages the global product coding system. Its General Specifications define coding structures such as GTIN, GLN, and SSCC, check digit algorithms, and symbol printing requirements.

Source 02

ISO/IEC barcode symbol technical standard system

The printing quality, size, magnification factor, etc. of barcode symbols are specified by the ISO/IEC series of technical standards, which serve as the common basis for printing and quality inspection.

Content statement:This article is a general explanation of coding knowledge and does not contain any specific amounts, day commitments, or regulatory clause numbers; for current requirements of specific markets and platforms, please refer to the official documents of the corresponding institutions and platforms. All barcodes appearing in this article are demonstration numbers generated according to GS1 rules, do not belong to any company, and must not be used for real products.

Related Articles

Still have specific questions after reading?

Knowledge pages address general questions. When it comes to your specific products, markets, and channels, it is faster to ask a coding consultant directly.

—