addaScan home
Assessment
Barcode basics // Chapter 4 of 5

What is GS1 DataMatrix, and how is it different from Data Matrix?

By Frank GuoTechnical review: Frank GuoPublished Updated 8 min read

// In short

GS1 DataMatrix is a Data Matrix 2D code that carries data under GS1 rules: it starts with an FNC1 character and holds GS1 Application Identifiers such as the GTIN, batch and expiry date. A plain Data Matrix uses the same square pattern but carries any text, which other companies’ systems cannot interpret. On a line, a 2D code reader decodes it, parses the fields and checks them against the run.

// Key takeaways

  • GS1 DataMatrix and plain Data Matrix look the same; the difference is the FNC1 and the GS1 data rules inside.
  • A GTIN, expiry date and short batch fit in an 18 × 18 symbol, about 9 mm square at the GS1 target module size.
  • On retail items GS1 sets a module size of 0.396 to 0.990 mm and a 1-module quiet zone, in addition to the linear barcode.
  • Reading needs a 2D imaging reader or smart camera; laser scanners and linear imagers cannot read it.
  • Direct part marks on metal are a related but different job, with their own lighting and grading.

What makes a Data Matrix a GS1 DataMatrix?

A GS1 DataMatrix is the ECC 200 version of Data Matrix, the only version that supports GS1 element strings. It begins with an FNC1 character, which marks it as carrying GS1 data, and separates variable-length fields with FNC1 or the group separator character <GS> (GS1 General Specifications, 5.6.2). A reader reports it with its own symbology identifier, ]d2, so the receiving system knows to parse GS1 Application Identifiers. GS1 publishes a guideline on its use (GS1 DataMatrix Guideline).

GS1 DataMatrix, Digital Link Data Matrix, plain Data Matrix and direct part marks compared
CodeWhat it carriesWho can read the meaningHow it is applied
GS1 DataMatrixGS1 Application Identifiers after a leading FNC1Receiving and retail systems can split the data into GTIN, batch and datesPrinted or laser-marked; small
Data Matrix with a GS1 Digital Link URIA web address built from GS1 identifiersGS1-aware scanners and phonesPrinted; usually larger than a GS1 DataMatrix with the same data
Plain Data MatrixAny text the printer was givenOnly the owner’s own systems know what it meansSame symbol, different content rules
Direct part mark (DPM)Usually a serial or part numberTraceability of partsDot-peen or laser on metal or plastic

How is a GS1 DataMatrix built?

The symbol is a grid of square modules. A solid L-shaped finder pattern, one module wide, runs down the left and along the bottom; the opposite two sides carry an alternating clock track that tells the reader the grid size. A quiet zone one module wide must stay clear on all four sides. Square symbols come in 24 sizes from 10 × 10 to 144 × 144 modules, rectangular ones in 6 sizes from 8 × 18 to 16 × 48; symbols of 32 × 32 and above are split into data regions by alignment patterns. Reed-Solomon error correction lets the reader rebuild damaged modules (GS1 General Specifications, 5.6.2–5.6.3).

[Schematic]GS1 DataMatrix anatomy · illustration, not a readable code

Swipe sideways to see the whole drawing →

Anatomy of a GS1 DataMatrix symbolAn 18 by 18 module Data Matrix drawn as an illustration, not a readable code. A solid L-shaped finder pattern runs down the left side and along the bottom. An alternating clock track of dark and light modules runs along the top and down the right side. The data region fills the inside. A quiet zone one module wide surrounds the symbol. On the right, the data string of a GS1 DataMatrix is shown: FNC1 first, then GTIN, expiry date and batch, with a separator only after a variable-length field that is not last.[1] L FINDER (LEFT + BOTTOM)[2] CLOCK TRACK (TOP + RIGHT)[3] QUIET ZONE 1XDATA STRING (EXAMPLE)FNC101 1061414112345917 27113010 L2610AGTIN (fixed) → EXPIRY (fixed) → BATCH (variable, last: no separator)READER OUTPUT: ]d2 + 0110614141123459 17271130 10L2610A≈18 DATA CODEWORDS → FITS 18 × 18 (18 CODEWORDS)AT 0.495 mm PER MODULE ≈ 8.9 mm SQUARE + 1X QUIET ZONEILLUSTRATION ONLY · NOT A READABLE CODE
[1]: Solid L finder: tells the reader where the symbol is and which way up
[2]: Clock track: tells it how many rows and columns
[3]: Quiet zone, one module wide on every side
Data: FNC1, then fixed-length AIs, variable-length last

Worked example: how big is the code? GS1 counts FNC1, every pair of digits and every letter as one codeword (GS1 General Specifications, 5.6.3.2). Take FNC1, then (01)10614141123459, (17)271130 and (10)L2610A. That is 1 codeword for FNC1, 8 for the 16 digits of the GTIN field, 4 for the 8 digits of the expiry field, and 5 for “10”, “L”, “26”, “10” and “A”: about 18 data codewords. GS1’s Table 5-32 gives the 18 × 18 symbol exactly 18 data codewords, so this fits, and a batch one character longer moves it to 20 × 20. Printers’ encoders may optimise differently; the arithmetic is for planning the space on the artwork.

Selected GS1 DataMatrix square sizes: capacity from GS1 Table 5-32; side length is modules × 0.495 mm
Square symbolData codewordsNumeric capacitySide at 0.495 mm modules (without quiet zone)
16 × 161224 digits7.9 mm
18 × 181836 digits8.9 mm
20 × 202244 digits9.9 mm
22 × 223060 digits10.9 mm
26 × 264488 digits12.9 mm

How big must it be printed?

Because a camera has to resolve each module, GS1 requires 2D symbols to be printed at 1.5 times the X-dimension allowed for linear barcodes in the same scanning environment (GS1 General Specifications, 5.12.3). The ranges are:

GS1 DataMatrix size and quality by scanning environment (GS1 General Specifications, Release 26.0)
UseX-dimension (module size)Quiet ZoneMinimum quality
Retail consumer item, in addition to the linear barcode (table 1, addendum 2)Minimum 0.396 mm, target 0.495 mm, maximum 0.990 mm1X on all four sides1.5/12/660
Retail item also scanned in distribution (table 3, addendum)Minimum 0.743 mm, target and maximum 0.990 mm1X1.5/20/660
Cases scanned in general distribution (table 2)Minimum and target 0.743 mm, maximum 1.50 mm1X1.5/20/660
Items not scanned at retail or in distribution (table 4)Minimum 0.375 mm, target 0.495 mm, maximum 0.990 mm1X1.5/08/660

On retail items scanned at the till, a 2D barcode is used in addition to the linear barcode, not instead of it, and GS1 asks for the whole 2D symbol including its quiet zone to sit within 50 mm of the centre of the linear barcode, so the scanner can tell both belong to the same item (GS1 General Specifications, 6.3.3.1).

Where is GS1 DataMatrix used?

GS1 lists GS1 DataMatrix and QR codes with a GS1 Digital Link URI as the two most widely recognised 2D barcodes; both can carry the GTIN together with data such as an expiry date or a serial number (GS1, 2D barcodes). GS1 South Africa describes GS1 DataMatrix as a compact 2D barcode that holds a lot of data in a small space, used for example on healthcare and grocery products (GS1 South Africa, barcode types). Regulated healthcare packaging is outside addaScan’s scope; food and consumer goods lines are not.

For a South African packaging line, the practical uses are: a date and batch in machine-readable form on the unit, for stock rotation and recalls; a serial number on high-value items; and the same data on cases where a GS1-128 would be too long for the panel.

How is GS1 DataMatrix read on the line?

A fixed code reader or a smart camera with code tools reads it. Linear imagers and laser scanners cannot (GS1 General Specifications, 5.12.2.3). The reader must resolve the smallest module, so the module size and the field of view set its resolution; as a rule of thumb, plan for several pixels across each module and test on real samples. The GS1 DataMatrix Guideline describes three complementary production controls: verification as part of quality control, reading every symbol on the line, and sample checks (GS1 DataMatrix Guideline). A line station is the second of these.

  1. Decode every pack; a no-read rejects.
  2. Check the symbology identifier is ]d2, so a plain Data Matrix with the same characters fails.
  3. Parse the AIs and compare GTIN, batch and date with the run from the PLC or MES.
  4. Watch the quality trend: many readers report a decode-margin value; a falling value means the coder needs attention.
GS1 DataMatrix faults on packaging lines
FaultUsual causeWhat the reader seesFix
Missing or merged dotsInkjet nozzle blocked, speed too high for the print headLow modulation or no-readPrint head maintenance; slower print or larger module
Distorted gridPack moving unevenly under the printer; encoder not tracking speedGrid non-uniformity, no-readEncoder-driven print; stable conveying
Quiet zone violatedCode printed against a seam, text or the edge of a panelNo-read at the till, often fine on the lineArtwork and print position
Low contrastLaser mark on a light film, or dark code on dark printSymbol contrast lowPrint window, ink colour, laser settings
Valid code, wrong dataWrong batch or date in the coder; no FNC1; plain Data Matrix instead of GS1Reads perfectly; only a content check catches itExpected values from the recipe; check the symbology identifier

Choosing a code reader explains the selection; OCR/OCV and code inspection covers stations that check the code and the printed text together.

Is a direct part mark the same thing?

Related, not the same. A Data Matrix dot-peened or laser-marked onto metal or plastic parts is read under angled or diffuse light and graded with its own method, ISO/IEC 29158. Printed codes are graded to ISO/IEC 15415 (ISO/IEC 15415:2024). DPM code reading covers parts.

Frequently asked questions

Can a normal barcode scanner read GS1 DataMatrix?

Only an imaging (2D) scanner or camera can; a laser scanner or linear imager that reads linear barcodes cannot. Fixed code readers and smart cameras on lines are imaging devices.

Is a GS1 DataMatrix printed on our carton the same as the one on a metal part?

The symbol rules are the same; the marking process, the lighting needed to read it and the grading method differ. Printed codes are graded to ISO/IEC 15415, direct part marks to ISO/IEC 29158.

How small can a GS1 DataMatrix be on a retail pack?

GS1 sets a minimum module size of 0.396 mm for 2D codes on retail items. The overall size then depends on the data: a GTIN, expiry date and short batch fit in about 18 × 18 modules.

Does a GS1 DataMatrix replace the EAN-13?

Not yet at the till. GS1 requires 2D barcodes on retail items to be in addition to the linear barcode during the transition, placed close to it.

Read next · Chapter 5QR codes on packaging: what a line can checkPlain QR, GS1 QR and GS1 Digital Link, GS1 sizes, the retail move to 2D, print faults, and what a line check proves.
// Next step

Have a line in mind?

Describe the product and the fault you need to catch. We test on your samples and reply with a feasibility note and a budget.