A GS1 DataMatrix is a two-dimensional barcode that can be square or rectangular. They are commonly used on medical devices. A single data matrix code can contain several pieces of information. These codes often include an UDI (Unique Device Identification) code as well as lot numbers, serial numbers, expiration date, and date of production.
The information within the data matrix code, the element string, must start with a AI (Application Identifier). The AI is a set of numbers that define the meaning of the information that follows. If you are familiar with UDI codes, you may recognize these numbers. For instance, a UDI will start with (01). This indicates that the next 14 digits represent the GTIN which is the Device Identifier. The AI (10) indicates that the next element in the string contains the lot number. (See below for additional examples)
The parentheses around these AIs are not allowed in the data matrix code. The parentheses are only present in the human readable code. For example, a UDI that appears in human readable form as (01)67548320187766(10)567432 when scanned will read 016754832018776610567432 in the data matrix code.
The number of cells within a data matrix code will control the maximum amount of information it can carry. GS1 standards recognize both square and rectangular data matrix codes. The square codes vary in size from 10×10 to 22×22 and the rectangular codes range from 8×16 to 16×48. These data matrix codes can be quite small. For example, we use a 16×36 rectangular code with an overall height of 2.5 mm. Even on stainless steel it is quite readable.
When creating a GS1 UDI code you are required to start your data string with an FNC1 application identifier. The FNC1 (function one symbol) looks like ~1. It can be found on a standard keyboard at the top left and requires the shift key. This symbol might not appear when the code is read but is required to enable the AIs that follow it. So, when entering the earlier example, you will add the ~1 at the start of the string. Example ~1016754832018776610567432
If a data string includes a serial, it should be the last segment in the element string. You will need to insert a FNC1 followed by the AI (21) and then the serial number. Here’s an example of human readable version of this (01)67548320187766(10)567432(21)012345
And the data matrix version would be entered ~1016754832018776610567432~121012345
Breakdown of Human Readable UDI code
Human Readable (01)67548320187766(10)567432(21)012345
(01)67548320187766 = Device Identifier GTIN (the last digit is a checksum)
(10)567432 = Lot code
(21)012345 = Serial number
Breakdown of Data Matrix code entry
Code Entered ~1016754832018776610567432~121012345
~1 =FNC1
01 = AI for Device Identifier GTIN
67548320187766 = device number (the last digit is a checksum)
10 = AI for Lot
567432 = lot number
~1 = FNC1
21 = AI for Serial number
012345 = serial number
List of Application Identifiers
(01) Device Identifier Numeric 14 Digits
(10) Lot code Alphanumeric 20 Digits
(11) Manufacture date Numeric 6 Digits YYMMDD
(17) Expiration date Numeric 6 Digits YYMMDD
(21) Serial Number Alphanumeric 20 Digits
Example DataMatrix code
The UDI code pictured here is an example of a 16×36 DataMatrix code. This code contains a Device Identifier, Lot code, and Serial number.
The code was entered in the following format. ~1016754832018776610567432~121012345
The scanned code reads as follows. 01675483201877661056743221012345
This is the screenshot from a smartphone using the “QR code reader” app. The screen shows the results of reading the sample code. The rectangles with the x inside indicate the presence of the FNC1.
This is the screenshot from a smartphone using the “barValid” app. The screen shows the results of reading our sample code. The red rectangles indicate the presence of the FNC1.
I work at American Laser Mark. We are a contract manufacturer providing Laser Engraving, Pad Printing, and Screen Printing. We use these technologies to apply information and graphics to customer supplied products and materials. Visit us at ALMtech.com
I have not been able to find any source that would provide a basic understanding of GS1 codes. That is the reason I created this document. I hope you find it useful. If you have corrections or additional information, please email me ddubois@almtech.com
Additional resources.
The most helpful document I have found on this is the”GS1 DataMatrix Guideline”
It is also very useful to download a data matrix code reader on your smartphone. The one I use is called “barValid”. It’s free. My phone has a very good camera and I have read data metrics codes as small as 2.5mm tall. In this app the FNC1 will appear as a red rectangle.