Skip to main content
Brands & ManufacturersPrinter Partners
AIQR LogoFree GS1 QR codes

Packaging design tool

How big does my 2D code need to be?

Packaging is adding 2D codes alongside the 1D barcode: GS1 DataMatrix, and QR codes carrying a GS1 Digital Link. A 2D code can carry much more than a product number: batch, expiry, a serial number for each unit, and a web link for consumers. But every piece of data you add makes the code bigger, and space on a pack is limited.

Get the size wrong and the code fails where it counts:

  • Too small: checkout scanners and phones can't read it reliably.
  • Too big: it won't fit the label, or crowds out the design.
  • No quiet zone: the clear margin around the code is part of the code. Leave it out and it may not scan at all.

GS1 sets the rules: a minimum, target and maximum module size, plus a quiet zone for each code type. Most teams only find out whether they've met them after artwork is approved and plates are made. That's an expensive point to learn a code doesn't fit.

A product carton with a GS1 DataMatrix and a QR code printed on itIllustration of a white product carton. A label panel on the front carries a small GS1 DataMatrix holding a demo GTIN, expiry and batch, and a QR code that opens this page. An enlarged view of the Data Matrix marks one module, the X dimension, and the clear quiet zone around the code.DEMO PRODUCTDaily care100 mlGTIN 09506000134352EXP 27-12-31 · LOT DEMO1GS1 DataMatrix1 module = XQuiet zone20 × 20 modules
Demo codes: the QR code opens this page; the Data Matrix holds GS1's example GTIN.
Barcode type
QR error correction level
Check your printer (optional)

QR + Digital Link

Within GS1 range

Same data, each option allowed here

At 0.495 mm module size, including quiet zone.

BarcodeGridSpace to reserve
QR + Digital Linkadd a valid domain—
GS1 DataMatrixadd a valid domain—
Data Matrix + Digital Linkadd a valid domain—

A Digital Link carries your domain as well as the data, so it needs more modules than the same data as a GS1 element string. A shorter domain gives a smaller code.

Why error correction matters

Error correction adds extra codewords so a scanner can rebuild data from a code that is scuffed, creased, partly covered or badly printed. More correction means more modules, so a bigger code at the same module size.

LevelCan recover aboutGridSpace to reserve
L7% of the data——
M15% of the data——
Q25% of the data——
H30% of the data——
  • • GS1 does not set a QR error correction level for Digital Link codes at retail. Balance damage tolerance against the space you have.
  • • Do not put a logo inside the code. GS1 treats it as damage: it uses up error correction and can make the code fail verification.
  • • Error correction does not fix a code that is too small, low-contrast or crowded by artwork.

Runs entirely in your browser: nothing you type is sent to AIQR. Sizes from the GS1 General Specifications Release 26.0 (January 2026), Table 5-46, section 5.12.3.1 (Symbol specification table 1, addendum 2 for 2D barcodes). This tool estimates size; it does not grade print quality. Check final artwork with a verifier.

What the calculator does

Enter the data you plan to encode: GTIN, batch or lot, expiry, serial number, and a GS1 Digital Link if you're using one. The calculator then shows you:

  • The encoded data: exactly what goes into the code.
  • Symbol size: the version and grid size for GS1 DataMatrix and for QR, side by side.
  • Size on pack in mm: with and without the quiet zone, at the module size you choose.
  • Pass, warn or fail: against GS1's minimum, target and maximum for retail point of sale.
  • A to-scale preview: downloadable as an SVG for your designer.
  • Error correction explained: how much damage each QR level survives, and what that costs in size.
  • A printer check: whether the code fits your coder's print window, and how the module size rounds to your printer's dot resolution.

Who it's for: brand owners, packaging designers and production teams planning a move to 2D before redesigning artwork or buying coding equipment.

Private by design: everything runs in your browser. Your GTINs, batch numbers and serials never leave the page.

What it doesn't replace: a print trial. Whether your printer can reliably print this code on your pack, at your line speed, is only known from a trial on your actual packaging material, with the codes checked by a verifier.

What decides the size of a 2D code

The data. More data means more modules (the small squares). A GTIN alone makes a small code; adding batch, serial and expiry makes it larger. A GS1 Digital Link also carries your web domain, so a short domain keeps the code small.

The module size. The X-dimension is the width of one module. GS1 sets a minimum, target and maximum for each use. For a consumer product scanned at retail checkout, that is 0.396 to 0.990 mm with a target of 0.495 mm.

The quiet zone. Every code needs a blank margin so the scanner can find its edges: one module round a Data Matrix and four round a QR Code. On a small pack that difference alone can decide the choice.

Error correction. QR Codes let you trade space for damage tolerance (levels L, M, Q, H). Data Matrix has a fixed, built-in level.

Your printer. A printer places whole dots, so the module size rounds to its resolution. Its maximum print height can rule out a code before anything else does.

Read more

Sources

  • GS1 General Specifications, Release 26.0 (January 2026), section 5.12.3 symbol specification tables: Table 5-46, Table 5-49, Table 5-52 and Table 5-56. ref.gs1.org/standards/genspecs
  • GS1 2D Barcode Playbook for Creation and Printing, Release 1.0.1 (June 2026), sections 5.1 and 6. ref.gs1.org/sme-guidance
  • Symbol capacity and error correction: ISO/IEC 16022 (Data Matrix) and ISO/IEC 18004 (QR Code), as implemented by the open-source encoder bwip-js.