GS1 barcodes: the complete guide (GTIN, GS1-128, SSCC, DataMatrix)
What every GS1 code encodes, how check digits and application identifiers work, and how to print barcodes that scan first time.
GS1 is the global organization that assigns the numbers behind almost every barcode in retail, healthcare and logistics. A GS1 code is not a random string: every digit has a meaning and a position, and a scanner at a customer's warehouse expects exactly that structure. This guide explains the pieces you need to get right on a label.
1. The GS1 Company Prefix and the GTIN
Everything starts with a GS1 Company Prefix licensed from your national GS1 member organization. You append an item reference and a check digit to build a GTIN (Global Trade Item Number), the number that identifies a product. GTINs come in four lengths:
| Format | Digits | Typical use | Symbology |
|---|---|---|---|
| GTIN-13 | 13 | Retail items outside North America | EAN-13 |
| GTIN-12 | 12 | Retail items in the US and Canada | UPC-A |
| GTIN-8 | 8 | Very small packages | EAN-8 |
| GTIN-14 | 14 | Cases and pallets (packaging levels) | ITF-14 or GS1-128 |
Example: the 12 digits 750123456789 get the check digit 3, so the retail GTIN-13 is 7501234567893. A case of that product uses indicator digit 1 in front: 17501234567890. The check digit is recalculated because the digits changed.
2. How the check digit is calculated
All GS1 keys use the same modulo-10 algorithm: starting from the rightmost digit (excluding the check digit), multiply digits alternately by 3 and 1, add the results, and the check digit is what you must add to reach the next multiple of 10. Label software should compute it for you — typing it by hand is the most common cause of unscannable codes.
3. GS1-128 and Application Identifiers
A GTIN identifies what the product is; it says nothing about which lot, when it expires or how many units are in the case. GS1-128 (Code 128 with the FNC1 start character) carries that extra data using Application Identifiers (AIs): two-to-four-digit prefixes that tell the reader what follows. The parentheses printed in the human-readable text are never encoded in the bars.
| AI | Meaning | Format |
|---|---|---|
| 00 | SSCC (logistic unit) | 18 digits, fixed |
| 01 | GTIN | 14 digits, fixed |
| 10 | Batch / lot number | Up to 20 characters, variable |
| 11 / 13 / 15 / 17 | Production, packaging, best-before, expiration date | YYMMDD, fixed |
| 21 | Serial number | Up to 20 characters, variable |
| 30 / 37 | Count of items / count in logistic unit | Up to 8 digits, variable |
| 310n | Net weight in kg, n decimals | 6 digits, fixed |
Fixed-length AIs can be concatenated directly; a variable-length AI must be the last element or be followed by an FNC1 separator. Getting this wrong produces a code that scans but is parsed incorrectly by the receiving system — a far more expensive error than a code that does not scan at all.
(01)17501234567890(17)270315(10)MX-240917
Reading the example above: GTIN of the case, expires 15 March 2027, lot MX-240917. The lot is last because its length is variable.
4. The SSCC for pallets
The Serial Shipping Container Code identifies one specific logistic unit — this pallet, not this kind of pallet. It is 18 digits: an extension digit, your GS1 Company Prefix, a serial reference you must never repeat, and a check digit. Example: 075012340000001236. On the GS1 Logistics Label the SSCC is the bottom barcode, encoded as AI (00), and it must be the last symbol on the label so operators scan it first.
5. GS1 DataMatrix and 2D codes
Healthcare, small items and any label with several AIs benefit from GS1 DataMatrix: it holds the same AI structure in a square a few millimeters wide and reads even when partially damaged. Pharmaceutical serialization (DSCSA in the US, FMD in Europe) mandates it. GS1 is also driving retail toward 2D codes at the point of sale under its "Sunrise 2027" program, so new packaging designs should reserve space for a QR or DataMatrix next to the EAN.
6. Print quality: why codes fail to scan
- Module width (X-dimension) not matched to printer resolution: on a 203 dpi printer, use whole-dot multiples; do not scale a code to 97%.
- Quiet zones: EAN/UPC needs 11X on the left and 7X on the right; GS1-128 needs 10X on both sides. Text, borders and the label edge count as intrusions.
- Height: GS1-128 on logistics labels should be at least 32 mm tall; truncating bars to save space reduces the omnidirectional read rate.
- Colors: dark bars on a light background. Red bars are invisible to red laser scanners.
- Verification: grade to ISO/IEC 15416 (1D) or 15415 (2D); most trading partners require grade C (1.5) or better.
How EtikStudio handles this
The editor generates every GS1 symbology natively, computes check digits, inserts FNC1 where the standard requires it, validates AI syntax before printing and warns when the module width does not fit the printer's dots. Data for AIs (lot, dates, serials, weights) comes from your database or ERP as variable fields, so the barcode and the human-readable text can never disagree.
This guide is informational and does not constitute legal advice. Regulations change; always verify against the current official text before printing.