Which codes appear on packaging, and why can't you swap them?
- Consumer packaging carries a linear EAN-13 barcode that identifies the product at the checkout.
- A shipping carton carries a long GS1-128 code with extra data that links the shipment to the logistics system.
- A label sometimes carries a QR Code that encodes a link to a web page.
Choose the code for its job: what it identifies, what data it carries and where it will be read.
Three terms people mix up
- Identifier is what you are identifying. A GTIN is the number of a trade item in the GS1 system. It is just a number; it becomes a barcode when it is encoded in a specific symbology.
- Symbology is how data turns into graphics: EAN-13, UPC-A, Code 128, Data Matrix, QR Code. Each has its own rules for structure, geometry and quiet zones.
- Data structure is which fields are written in the code. In GS1 the fields are marked with Application Identifiers (AI):
(01)GTIN;(10)batch number;(17)expiry date;(21)serial number.
The brackets are for human reading and are not encoded in the symbol. They are printed in the human-readable interpretation below the code, for example below a GS1-128 symbol on a logistics label.
Example of a line on a logistics label: (01)09506000134352(17)271231(10)A12345. It means: the item with this GTIN, an expiry date of 31.12.2027 in YYMMDD format, and batch A12345. EAN-13 has no separate fields. It contains only the GTIN, which is why brackets do not appear on it.
The main code types on packaging
| Type | Where it appears | What to know |
|---|---|---|
| EAN-13 | Consumer packaging in retail | Represents a GTIN-13 |
| UPC-A | Consumer packaging, especially in North America | Represents a GTIN-12 |
| EAN-8 | Small consumer packs | Uses a separate GTIN-8 |
| UPC-E | Compact retail marking | A compressed form of certain UPC-A numbers |
| ITF-14 | Grouped packaging, shipping cartons | Represents a GTIN in 14-digit form |
| GS1-128 | Logistics labels | Carries data with GS1 Application Identifiers |
| Code 128 | Internal accounting, warehouse, production | Not the same as GS1-128 |
| GS1 DataMatrix | Traceability, healthcare | Compactly carries structured GS1 data |
| Data Matrix | Industrial and internal identification | Not the same as GS1 DataMatrix |
| QR Code | Links, instructions, digital content | An ordinary QR does not become a trade code |
EAN-13 and UPC-A: identifying a product at retail
EAN-13 has 13 digits. UPC-A has 12 digits and is common in North America. Both encode a GTIN: the scanner gets the number, and the checkout takes the name and the price from its own database.
What matters to the designer:
- the number comes from the client and is issued by a GS1 member organization; do not invent it yourself;
- the check digit is correct, and the digits under the code match the content;
- the proportions are maintained and the bar height is not below the permitted minimum;
- the quiet zones are not cropped or obstructed;
- the code has not been scaled arbitrarily. If space is tight, first check the permitted minimum size and whether another approved symbology can be used.
EAN-8 and UPC-E: compact codes
- EAN-8 is a short code for very small packs where EAN-13 does not fit. It encodes an 8-digit GTIN-8, which a GS1 member organization issues separately, on request.
- UPC-E is a compressed notation for certain UPC-A numbers, using zero suppression. Not every UPC-A can be converted to UPC-E.
The choice of a compact code is agreed with the data owner; it is not made for layout convenience.
ITF-14: outer packaging and cartons
ITF-14 is used on corrugated cartons and grouped packaging that does not go to the retail checkout. It encodes only a 14-digit GTIN. It does not carry a batch number or expiry date; use GS1-128 for those.
Its distinguishing feature is bearer bars around the symbol: horizontal lines above and below, or a frame around the entire perimeter. When printed from a printing plate, a 4.83 mm bearer bar surrounds the symbol, including its quiet zones, and touches the bars. When printed without a plate, bearer bars above and below, each at least 2X wide, are sufficient. The bearer bars are mandatory unless it is technically not feasible to apply them (in which case reading reliability is reduced).
What matters to the designer:
- do not remove the bearer bars for the sake of appearance;
- allow for dot gain on corrugated board;
- do not put the code on a fold, a joint or an area that gets damaged;
- check size and placement against the requirements of the specific application.
Code 128 and GS1-128: one symbology, different rules
Code 128 encodes digits, Latin letters and special characters: for example, an article number, order number or internal pallet number. It is used for internal accounting and in production.
GS1-128 uses the same symbology with GS1 rules: the FNC1 function character and a data structure based on Application Identifiers (AIs). An Application Identifier is a numeric prefix before each field: "10" indicates that a batch number follows. Code 128 does not require such a structure, so the names are not synonyms.
GS1-128 can contain:
- SSCC (serial shipping container code, the identifier of a logistics unit);
- GTIN;
- batch number;
- a date;
- serial number and other fields.
A pallet's logistics label and the code on a consumer pack identify different objects, even when they relate to the same product.
What matters to the designer: data entered into an ordinary Code 128 generator will produce a Code 128 symbol, not GS1-128. You need the FNC1 function character, separators and the correct field lengths.
Data Matrix and GS1 DataMatrix
Data Matrix is a two-dimensional symbology. You can recognize it by its solid L-shaped border and alternating elements on the opposite sides. It is available in square and rectangular forms.
GS1 DataMatrix is the same Data Matrix with data under GS1 rules. It is used in healthcare and batch tracking: one symbol can contain a GTIN, an expiry date, a batch and a serial number.
What matters to the designer:
- do not confuse it with QR Code;
- do not distort the symbol: do not stretch it or change its shape to fit the available space;
- keep the quiet zone on all sides;
- look at the module size, not only at the overall image size;
- remember that an ordinary Data Matrix does not automatically meet GS1 requirements.
QR Code: more than a link
You can recognize a QR Code by the three large square finder patterns in its corners. On packaging, it is used to open instructions, ingredient information, recipes, recycling information or a product page.
An ordinary QR Code linking to a website does not replace EAN-13 or UPC-A at the checkout. In the supply chain, three things matter: the data structure, participant requirements and equipment compatibility.
QR Code is a symbology. GS1 Digital Link is a standard for encoding GS1 identifiers in a web address, which can then be encoded in a QR Code.
The difference is visible in an example:
- An ordinary QR stores any link, for example the address of the manufacturer's website.
- A QR with GS1 Digital Link stores a link of a special kind, where the product's GTIN is part of the address: https://id.gs1.org/01/09506000134352.
Visually, two such QR Codes can look the same, but they contain different data.
What matters to the designer:
- check the address and confirm that it works;
- do not reduce the code's size without assessing the module size;
- keep the quiet zone;
- do not cover part of the code with a logo, even though it has error correction;
- check a printed sample, not only the link from a screen.
Parameters to protect in the layout
1. Module size: the X-dimension
For a linear code, it is the width of the narrowest element; for a two-dimensional code, it is the size of one module. It matters more than the overall size of the picture: two QR Codes of the same width but with different numbers of modules have different module sizes.
For EAN-13, the GS1 table sets an X-dimension from 0.264 mm to 0.660 mm with a nominal of 0.330 mm. For a QR Code with GS1 Digital Link on consumer packaging (the table reflects the read range typical of mobile-device scanning), GS1 sets a module size from 0.396 to 0.990 mm, nominal 0.495 mm, which is 1.5 times larger than for linear codes. The overall size of a QR depends on the number of modules, that is, on the amount of data.
Minimum size of EAN-13. The lower limit is 80% of nominal: X = 0.264 mm, bar height 18.28 mm, symbol width together with quiet zones 29.83 mm. At the nominal 100% it is 0.330 mm, 22.85 mm and 37.29 mm. The height is measured from the bottom to the top of the bars; the digits under the code are not included. For EAN/UPC symbols on products sold at the checkout, GS1 has allowed, since August 2026, the bar height to be reduced if the packaging lacks space: by no more than 60% of the minimum height for the chosen X-dimension, so at least 40% of that minimum height must remain (change GSCN 26-144). This can reduce readability at different scan angles, and GS1 says to use it only when a full-height code cannot be printed at all. Talk to the customer first. For distribution codes such as ITF-14 and GS1-128, this change has no effect.
2. Quiet zone
The quiet zone is part of the symbol's requirements. Without it, the scanner cannot separate the code from the rest of the layout.
| Symbology (where it is used) | Quiet zone | X: minimum / nominal, mm | Bar height at these X, mm |
|---|---|---|---|
| EAN-13 (retail) | 11X left, 7X right | 0.264 / 0.330 | 18.28 / 22.85 |
| EAN-8 (retail) | 7X left and right | 0.264 / 0.330 | 14.58 / 18.23 |
| UPC-A (retail) | 9X left and right | 0.264 / 0.330 | 18.28 / 22.85 |
| UPC-E (retail) | 9X left, 7X right | 0.264 / 0.330 | 18.28 / 22.85 |
| ITF-14 (distribution) | 10X left and right | 0.495 / 0.495 | 31.75 |
| GS1-128 (distribution and logistics) | 10X left and right | 0.495 / 0.495 | 31.75 |
| GS1 DataMatrix (retail) | 1X on all sides | 0.396 / 0.495 | depends on the number of modules |
| QR Code (GS1) (retail) | 4X on all sides | 0.396 / 0.495 | depends on the number of modules |
| GS1 DataMatrix and QR Code (GS1) (distribution and logistics) | 1X for DataMatrix, 4X for QR | 0.743 / 0.743 | depends on the number of modules |
The values in the table are taken from the GS1 General Specifications (Release 26.0). Plain Code 128, without GS1 rules, is described in ISO/IEC 15417. Its quiet-zone requirements are specified there and are not included in the GS1 tables. For 2D codes the values are given for the GS1 variants: GS1 DataMatrix and QR Code with GS1 Digital Link.
For retail codes, the X-dimension is never below 0.264 mm: values from 0.249 to 0.264 mm are allowed only for on-demand printing (thermal and laser). Bar height is measured without the digits under the code.
X is the size of the base element: the width of the narrowest bar or the size of one module. The quiet zone is specified in multiples of X. The table gives values for the code itself, while the margins to the cut, seam, fold and edge of the package are determined separately: their size depends on the product type (box, label or pouch) and the printing method. For a specific application, check the current edition of the GS1 General Specifications.
Calculation example:
A QR cell is printed at 0.5 mm, so the 4X quiet zone is 4 × 0.5 = 2 mm on all sides.
With a 0.25 mm cell the zone is 4 × 0.25 = 1 mm. For an EAN-13 with the nominal X = 0.330 mm: on the left 11 × 0.33 = 3.63 mm, on the right 7 × 0.33 = 2.31 mm.
3. Contrast and color
A barcode does not have to be black on a white background, provided the combination gives the optical contrast required for scanning. The main variant is dark bars on a light background.
Contrast on a monitor and contrast in a scanner are different things. Checks of color, polarity and decoding cannot be replaced by the judgment that a code "looks contrasting". On transparent and metallized packaging the background behind the code changes with the contents and the reflectance of the substrate, so it has to be checked separately.
4. Geometry and printing
A linear code must not be compressed in width, and a two-dimensional code must not be distorted. The bar height can be reduced only within the limits the standard allows for the specific code. Also take into account:
- dot gain (widening of printed elements);
- resolution and sharpness;
- material characteristics, including substrate porosity, film stretch, color and gloss;
- seams, folds, curvature and finishing at the code's location.
A vector object is convenient in the layout, but it does not guarantee the correctness of the symbol or the print quality.
Checklist before the packaging goes to print
- It is clear what the code identifies: a product, carton, logistics unit or individual item.
- The code type is agreed with the data owner and the system in which it will be scanned (or a ready-made barcode is received from the owner).
- The encoded value has been checked.
- The digits under the code match the content.
- The module size and overall dimensions suit the application.
- The quiet zone is kept after the final scaling.
- The code is not deformed and is not on a fold, seam or other problem area.
- The background, ink and substrate have been considered together.
- The layout has been checked for decodability.
- A printed sample has been checked.
Scanning and verification solve different tasks. A successful scan shows only that a specific device read the sample under specific conditions. A verifier measures symbol-quality parameters according to ISO/IEC 15416 (linear codes) and ISO/IEC 15415 (two-dimensional codes).
The main rule
You choose the barcode for the job, and you build the layout around its requirements. Before changing the size, shape or type of a code, find out what it carries and who reads it.
Size and quiet zone calculator
The calculator is below on the page. It calculates the X-dimension, quiet zones and minimum bar height for the codes in this article from the GS1 General Specifications tables (Release 26.0), and shows a dimensioned diagram of the chosen code with the distances. If the code type is unknown, the calculator identifies it from the intended use and the human-readable digits below the bars.
Sources
- GS1 General Specifications: https://www.gs1.org/standards/barcodes-epcrfid-id-keys/gs1-general-specifications
- GS1 Sweden, Size guide: https://gs1.se/en/guides/how-to-guides/size-guide/
- GS1 Sweden, Use GS1 DataMatrix: https://gs1.se/en/standards-and-services/use-gs1-datamatrix/
- GS1 Support, rectangular GS1 DataMatrix: https://support.gs1.org/support/solutions/articles/43000734426-can-i-print-gs1-datamatrix-in-a-rectangular-shape-as-well-as-a-square-one-
- GS1 New Zealand, ITF-14 specifications: https://support.gs1nz.org/hc/en-us/articles/360039815091-ITF-14-Barcode-Specifications
- GSCN 26-144, truncation of EAN/UPC bar height, effective August 2026
