GS1 DataMatrix Generator

Make a GS1 DataMatrix code online for free. Enter Application Identifiers such as (01) for the GTIN, (17) for the expiry date, (10) for the batch and (21) for the serial number, and GS1's Barcode Syntax Engine checks each one. See the encoded message and scanner output, then download SVG, PNG, PDF or EPS.

Valid

9.9 × 9.9 mm at 300 DPI

Application Identifiers

  1. GTIN: Global Trade Item Number (GTIN). Format N14; predefined length, no FNC1 needed.

  2. USE BY or EXPIRY: Expiration date (YYMMDD). Format N6; predefined length, no FNC1 needed.

  3. BATCH/LOT: Batch or lot number. Format X..20; FNC1 follows it when another AI comes next.

  4. SERIAL: Serial number. Format X..20; FNC1 follows it when another AI comes next.

Moving AIs with a predefined length, such as (01) and (17), to the front saves FNC1 separators.

Check GS1 dataPaste and load

Write the group separator as {GS}. Valid data replaces the AI rows.

Symbology and content

The element strings in bracket notation. The brackets are not encoded; the generator adds FNC1 where GS1 requires it: 47 characters.

Size and resolution

Output DPI

300 DPI · Thermal / offset

4 px per module at 300 DPI. Print size: 9.9 × 9.9 mm (0.39 × 0.39 in). PNG, WebP and JPEG: 120 × 120 px.

Label textNew

Font

Alignment

Printed in the file with the barcode, outside the quiet zone, in Helvetica or Courier so it looks the same in every format.

Colors

Contrast 21.0:1; estimated symbol contrast 100%.

Quiet zone (modules)4 · 4 · 4 · 4

Bar width reduction0 mil

Makes each bar thinner by this amount, to make up for ink that spreads on paper. Ask your printer for the value, or leave 0 for laser and thermal printing.

Rotation and backgroundNew0° · Filled

Rotation

In the preview, a checkered pattern shows the transparent areas. Print a transparent barcode only on a white or very light surface: scanners need the light quiet zone around it.

Margin and borderNew0 mm · no border

The margin is blank space outside the quiet zone, for cutting; the border is drawn at the outer edge. Both count in the print size.

Data inspectorNew47 chars
PresetsNew0 saved

No presets yet. Save the current settings to reuse them.

    Presets stay in this browser. They keep the type, size and style; the data and the logo are not saved.

    Recent barcodesNew0

    The barcodes you download appear here, newest first.

      The last 10 downloads, kept in this browser only.
      GS1 DataMatrix · Live previewValid
      GS1 DataMatrix barcode encoding (01)09506000134352(17)271231(10)LOT42(21)SN1001
      New

      Scaled to fit. Actual size shows the print size on screen.

      Print simulationNew

      Shows how a worn print looks and tests it with the decoder.

      Type
      GS1 DataMatrix · 2D
      Print size
      9.9 × 9.9 mm
      Raster
      120 × 120 px

      Valid GS1 data: 4 element strings, checked with GS1's Barcode Syntax Engine 1.4.1.

      Message with FNC1

      FNC101095060001343521727123110LOT42FNC121SN1001

      What a scanner sends

      ]d201095060001343521727123110LOT42{GS}21SN1001

      GS1 Digital Link URI

      https://id.gs1.org/01/09506000134352/10/LOT42/21/SN1001?17=271231

      A valid structure is not GS1 certification: the GTIN or SSCC must come from your own GS1 Company Prefix, licensed by GS1.

      The check runs on your device with the GS1 Barcode Syntax Engine 1.4.1, © GS1 AISBL, under the Apache License 2.0.

      Download

      Vector drawing, 9.9 × 9.9 mm. Design and label programs place it at its print size.

      More export optionsNewTest sheet · size set · embed code

      Print test sheet (PDF)

      The code at 80%, 100% and 150% with 100 mm and 4 in rulers. Print it at actual size and scan each copy before printing many.

      Size set (ZIP)

      Magnification

      Embed code

      Nothing you type is uploaded.New

      How to Make a GS1 DataMatrix Code

      Enter the AIs and values, let the check confirm them, and download the code.

      1. Start with a key, such as (01) and the 14-digit GTIN of the product.
      2. Add the batch, dates and serial number your product needs, using the date picker for dates.
      3. Read the check under the preview and fix the AI it names, if any.
      4. Set the module size for your printer and download SVG, PNG, WebP, JPEG, PDF or EPS.

      GS1 DataMatrix Example

      The sample code holds a GTIN, an expiry date, a batch and a serial number: (01)09506000134352(17)271231(10)LOT42(21)SN1001.

      Reading the Example

      • (01) 09506000134352: the GTIN of the product.
      • (17) 271231: the expiration date, YYMMDD: December 31, 2027.
      • (10) LOT42: the batch or lot number.
      • (21) SN1001: the serial number of this one item.
      GS1 DataMatrix with the GTIN (01) 09506000134352, the expiry date (17) 271231, the batch (10) LOT42 and the serial number (21) SN1001.
      The example: (01) 09506000134352 (17) 271231 (10) LOT42 (21) SN1001.

      What the Scanner Sends

      A scanner reports GS1 DataMatrix with the symbology identifier ]d2, then the data, with each FNC1 separator sent as the group separator, ASCII 29. The panel under the preview shows this output for your data.

      Application Identifiers for GS1 DataMatrix

      These AIs identify a product and its batch, dates and serial number; the builder accepts all 541 AIs in GS1's list.

      Format: N is a digit; X, Y and Z are characters from GS1's character sets 82, 39 and 64; ".." means up to that many; brackets mark an optional part.

      GS1 Application Identifiers
      AIData titleDescriptionFormatFNC1 after it
      (01)GTINGlobal Trade Item Number (GTIN)N14No
      (10)BATCH/LOTBatch or lot numberX..20Yes, unless last
      (11)PROD DATEProduction date (YYMMDD)N6No
      (13)PACK DATEPackaging date (YYMMDD)N6No
      (15)BEST BEFORE or BEST BYBest before date (YYMMDD)N6No
      (16)SELL BYSell by date (YYMMDD)N6No
      (17)USE BY or EXPIRYExpiration date (YYMMDD)N6No
      (21)SERIALSerial numberX..20Yes, unless last
      (30)VAR. COUNTVariable count of items (variable measure trade item)N..8Yes, unless last
      (240)ADDITIONAL IDAdditional product identification assigned by the manufacturerX..30Yes, unless last
      (7003)EXPIRY TIMEExpiration date and time (YYMMDDhhmm)N10Yes, unless last
      (8008)PROD TIMEDate and time of production (YYMMDDhh[mm[ss]])N8[+N..4]Yes, unless last

      Sources: GS1 Barcode Syntax Dictionary, release 2026-01-27, and the GS1 Application Identifiers vocabulary, version 1.2.

      GS1 DataMatrix vs Data Matrix

      GS1 DataMatrix is Data Matrix ECC 200 that starts with FNC1, so its data must be GS1 element strings.

      Data Matrix and GS1 DataMatrix on Barcode.codes
      PropertyData MatrixGS1 DataMatrix
      First characterDataFNC1
      DataAny textGS1 element strings (AI and value)
      Scanner prefixNot GS1 data]d2
      Checks on this siteCharacters and capacityAIs, lengths, check digits, dates and AI pairs

      Which One to Use

      Use GS1 DataMatrix when trading partners read the code as GS1 data, such as a GTIN with a batch and expiry date. Use plain Data Matrix for your own parts and assets.

      Printing GS1 DataMatrix Codes

      Keep at least one module of blank space around the code and print each module as a whole number of printer dots.

      Module Size

      The X-dimension is the width of one square module. The generator turns it into whole printer dots at the DPI you choose and shows the printed size; ask your trading partners which size range their scanners need.

      Test Before Printing Many

      Scan a test print with the scanner on this site: it reads GS1 DataMatrix and lists every AI and value. A matching result shows the data is right, not that the print quality meets a grade.

      Frequently Asked Questions

      What Is GS1 DataMatrix?

      GS1 DataMatrix is Data Matrix ECC 200 that starts with FNC1 and carries GS1 element strings. GS1's General Specifications state that ECC 200 is the only version of Data Matrix that supports GS1 data structures.

      Why Is My Serial Number Rejected?

      AI (21) takes up to 20 characters from GS1's character set 82 and needs (01), (03) or (8006) in the same code. The check names the rule that fails and marks the characters it rejects.

      Does the Expiry Date Need a Day?

      AI (17) is written YYMMDD. GS1 allows 00 as the day when only the year and month are known, so 271200 means December 2027.

      Is a Valid Code the Same as a Certified One?

      No. The check confirms the structure of the data, not that the GTIN belongs to you or that a printed code meets a quality grade. GTINs come from your GS1 Member Organization, and print quality is graded with a barcode verifier.

      Can I Make Many GS1 DataMatrix Codes at Once?

      No: the builder makes one code at a time, and the bulk barcode generator does not draw GS1 DataMatrix. Changing the serial number and downloading again takes a few seconds per code.

      Is This GS1 DataMatrix Generator Free?

      Yes. There is no account, watermark or download limit, and the data never leaves your browser.