OFFLINE TOOL / DATA MATRIX & QR V1.6
INTEGRATION / 032OFFLINE

Data Matrix and QR codes

Generate Data Matrix (ECC 200, all 30 sizes) and QR Code (versions 1–40, levels L–H) symbols, with GS1 element strings and FNC1, as SVG or PNG at a module size that prints in whole printer dots, one at a time or in batches for A4 label sheets and ZIP files. Check GS1 element strings against the GS1 Barcode Syntax Dictionary and read codes from a camera or a keyboard-wedge scanner. Everything runs in your browser.

Tool

Everything runs in this browser: nothing is uploaded or stored, and the camera picture never leaves the page. The encoders are FactoKit’s own (no library) and are checked by decoding thousands of their symbols with zxing-cpp and libdmtx; see the Method.

Content and symbol

Example dataIllustrative: replace with your own text or GS1 element string

GS1: AIs in brackets, (01)…(17)…(10)…, or unbracketed with separators typed as <GS>, ␝ or ^. FNC1 is added first and after every variable-length AI that is not last; the brackets are never encoded.

Print size

A printer can only print whole dots: at 300 dpi a module of 0.5 mm is 5.9 dots and is printed as 6 (0.508 mm). With “Whole printer dots” the module is rounded to whole dots so that every module prints the same width; the size and the PNG follow it.

Runs in this browser. Data is not uploaded or stored.

Symbol

—Symbol
—Printed size, no quiet zone
—Data capacity used
—Error correction

    SVG: vector, sized in millimetres, for label software and print shops. PNG: whole pixels per module at the printer resolution (marked in the file), for printers that take images. Test-print the code and read it with the scanner it is meant for.

    GS1 element string

    Example dataIllustrative: replace with your own element string

    Bracketed: (01)09506000134352(10)ABC123, a “(” inside a value written as \(. Unbracketed: 010950600013435210ABC123 with the separator typed as <GS>, {GS}, ␝, \x1D or ^; a symbology identifier (]d2, ]Q3, ]C1) at the start is removed.

    Check digit calculator

      Runs in this browser. Data is not uploaded or stored.

      Check

      —Element string
      —Elements
      —Problems
      —FNC1 separators

        Camera

        Reading from the camera needs JavaScript and a browser with BarcodeDetector (Shape Detection API); the scanner field below works in every browser.

        Scanner (keyboard wedge)

        USB and Bluetooth scanners type the code and press Enter. GS cannot be typed: a scanner sends it as Ctrl+] (shown here as ␝) or, if set up so, as text such as <GS>. A symbology identifier at the start (]d2 GS1 DataMatrix, ]Q3 GS1 QR Code …) is read and removed.

        Runs in this browser. Data is not uploaded or stored.

        Reads

        —Reads
        —Last symbology
        —GS1

          Codes

          Example dataIllustrative: replace with your own codes, template or table
          Input

          Paste, open a CSV, TSV, TXT or XLSX file (up to 20 MB), or drop it on the field. Files are read in this browser only.

          Columns

          Data from the first column or a column named Data, Code or Text; Label (optional, by its header: Label, Name …) goes under the code and into the file names. Choose “Single column” when codes contain commas or semicolons.

          Data                          Label
          (01)09506000134352(21)S-0001  Carton 1
          Long format
          1 row = 1 code

          Columns: tab, ; or ,
          Decimals: 12,5 or 12.5

          Paste measurements to start.

          {0001..0500}: a counter from 1 to 500, zero-padded to 4 digits because the start or end is written with a leading zero; {1..500..5} counts in steps of 5, {500..1} down. One counter per template, at most 10,000 codes. {date:YYMMDD} is the batch date, {date+730:YYMMDD} that date plus 730 days (YYYY, YY, MM, DD and separators); write {{ and }} for literal braces.

          Paste, open a CSV, TSV, TXT or XLSX file (up to 20 MB), or drop it on the field. Files are read in this browser only.

          {GTIN} takes the column with that header (case, spaces, “_” and “-” ignored), {C3} the third column; {date:YYMMDD} as in the serial generator. Every placeholder needs a column; an empty cell is an error in that row.

          Columns of the placeholders

          Symbol: one setting for the whole batch

          Print size

          Runs in this browser. Data is not uploaded or stored.

          Check

          —Codes
          —Ready for output
          —Warnings
          —Errors

            A4 label sheets

            Label grid in millimetres

            Common A4 label sheet layouts with the margins and gaps as these layouts are commonly published, written from memory and checked only for adding up to 210 × 297 mm. Measure your sheet or check its data sheet before a large print run.

            Code width: the largest code with its quiet zone that fits this width in whole printer dots per module (codes of different sizes then get different modules). A code that does not fit its label is an error, never shrunk.

              The sheets print through the browser on A4 without page margins: choose 100 % or “Actual size”, margins “None” and no headers or footers, and print one test sheet on plain paper held against the label sheet first. Every module starts on a printer dot of the chosen resolution.

              ZIP download

              File names from {row} (zero-padded row number), {label} and {data}: letters other than A–Z, a–z and 0–9 become “_”, and a repeated name gets -2, -3 …. The ZIP also holds manifest.csv (file, row, label, data, symbol, size). One batch is at most 10,000 codes.

              How the codes are made and read

              Two-dimensional codes for traceability labels, part marking and packaging: Data Matrix ECC 200 and QR Code model 2 are generated by FactoKit’s own encoders (no library), GS1 element strings are checked against GS1’s machine-readable Application Identifier table, and codes are read with the browser’s BarcodeDetector or a keyboard-wedge scanner. Everything runs in this browser.

              Worked example: GS1 DataMatrix with GTIN, expiry date and batch

              Data Matrix ECC 200

              QR Code model 2

              GS1 element strings

              Print size

              Reading

              Batch

              Not verified

              Questions

              Data Matrix or QR Code: which one should I use?
              For marking parts and packs in manufacturing and healthcare, Data Matrix is the usual choice: it is smaller for the same data, works well on small labels and direct part marking, and GS1 DataMatrix is widely used for healthcare items. QR Code is the one phones read without an app, so it suits web addresses and GS1 Digital Link. Both can carry GS1 element strings with FNC1. Follow your customer’s or your industry’s labelling specification when it names one.
              What are FNC1 and the GS separator in a GS1 code?
              A GS1 symbol starts with FNC1, which tells the reader that the data are GS1 Application Identifiers. AIs with a predefined length (such as (01) GTIN or (17) expiry date) need nothing after them; a variable-length AI (such as (10) batch or (21) serial number) that is not the last one is ended by another FNC1. Readers pass that separator on as the ASCII character GS (29). The brackets of the human-readable text are never encoded. The tool adds every FNC1 for you, and putting the fixed-length AIs first saves separators.
              How large should the code be printed?
              The size follows from the module size (the X dimension) times the number of modules, plus the quiet zone. Choose the module size your specification and your scanners need, then let the tool round it to whole printer dots: a 300 dpi printer can print 0.508 mm (6 dots) exactly, but not 0.5 mm (5.9 dots), and uneven modules read worse. Keep the quiet zone free: at least 1 module for Data Matrix and 4 modules for QR Code. Test-print and read the code with the scanner it is meant for.
              Why does the camera not read codes in my browser?
              The camera part uses the browser’s BarcodeDetector (Shape Detection API), which only some browsers offer; the page says whether yours does. The camera also needs your permission and a secure page (https or the downloaded offline file). Where it is missing, use a USB or Bluetooth barcode scanner with the scanner field: it works in every browser. Reading codes from image files is not offered.
              My scanner adds ]d2 or strange characters. What are they?
              Scanners can send a symbology identifier before the data: ]d2 means GS1 DataMatrix, ]Q3 GS1 QR Code, ]C1 GS1-128. The tool reads and removes it. GS (ASCII 29), the GS1 separator, cannot be typed on a keyboard, so a scanner in keyboard mode sends it as Ctrl+] or as text such as <GS>, depending on its set-up; the scanner field shows it as ␝ and understands the usual forms.
              How do I print many codes, for example serial numbers, on label sheets?
              Use the Batch part: paste a list, open a CSV or Excel table, or write a template with a counter such as (01)09506000134352(21)SN{0001..0500}. Every code is checked first (GS1 errors, data too long, repeated codes and serial numbers). Then choose an A4 label layout, the text under the code and the label to start on, and print the sheets at 100 % without page margins, or download a ZIP with one PNG or SVG file per code and a manifest. Print one test sheet on plain paper and hold it against the labels first.
              Are my data or the camera picture uploaded?
              No. The codes are generated, checked and read in your browser. The camera picture goes only to the browser’s BarcodeDetector on your device; frames are not stored or sent. The results leave the page only as the files you download.