Skip to content

← Knowledge base

Barcode types: 1D, 2D, GTIN and SSCC in practice

A barcode is not a picture but a measuring device: the scanner measures the width of the bars and the spaces. So what looks like a cosmetic flaw to the eye — a bar a hair too thick, a smeared edge, a trimmed margin — is a measurement error to the scanner. This guide walks through which symbology is for what, how to build a GTIN and an SSCC, and exactly what belongs on a carton and on a pallet. The codes in the figures are real and scannable: feel free to try them with your phone.

Updated:

1. What makes a barcode readable?

Four things decide whether a code works: the X-dimension, the quiet zone, the bar height and the contrast. Only contrast is visible to the naked eye — the other three have to be measured.

  • X-dimension — the width of the narrowest bar. It determines the total width of the symbol and the printer resolution you need: the smallest dot of a 203 dpi head is 4.92 mil (0.125 mm), and no finer bar exists on it.
  • Quiet zone — the blank margin on both sides, measured in X. For EAN-13 it is 11 X on the left and 7 X on the right; for GS1-128 it is 10 X on both sides. A frame or a line of text reaching into it stops the scan — the single most common fault.
  • Bar height — the scanner’s aiming margin. On a logistic label GS1 requires at least 1.3 in (32 mm); a flat symbol is harder to hit from a forklift.
  • Contrast — dark bars on a light background. Red bars on white cannot be read by a classic red-light scanner: to it, red is just as “light” as the paper.
  • Print quality — ISO/IEC 15416 grades from A to F (ISO/IEC 15415 for 2D codes). Retail chains typically expect grade C (2.0) or better.
An EAN-13 symbol with the quiet zones and the X-dimension marked
The yellow bands are the quiet zones: 11 X on the left, 7 X on the right. The longer guard bars frame the digit groups.

2. 1D codes: one line, data in bar widths

A linear symbol typically holds 8 to 30 characters. In exchange it is cheap to print and every scanner knows it — from a thirty-year-old laser gun to today’s phone. In retail the choice is not a matter of taste: the standard decides.

EAN-13 barcode
EAN-13 — the one scanned at the checkout. Exactly 13 digits and nothing else: it carries the GTIN-13.
EAN-8 barcode
EAN-8 — the short version for small packs where a full EAN-13 does not fit. It must be requested separately; it is not an abbreviation of the EAN-13.
Code 39 barcode
Code 39 — the oldest industrial symbology. It handles letters, but it is bulky and has no mandatory check character. Rarely worth choosing for a new system today.
Code 128 barcode
Code 128 — today’s industrial default: the full ASCII set, dense encoding (digit pairs take half the space) and a mandatory check character.
ITF-14 barcode with bearer bars
ITF-14 — carries the GTIN-14 and nothing else, on cartons. The heavy frame is not decoration: it prevents the scanner from reading only part of the symbol at an oblique angle.
GS1-128 barcode with application identifiers
GS1-128 — the same Code 128, but the data is tagged with application identifiers (AIs), so the receiving system knows what each number means. The backbone of logistics.
GS1 DataBar barcode
GS1 DataBar — a point-of-sale symbol for tight spaces: it fits on a produce label and, unlike EAN-13, can also carry an expiration date or a batch number.

3. 2D codes: more data in less space

A two-dimensional code stores data in a matrix rather than in bars. It has two advantages. Far more fits in — thousands of characters in a QR — and it carries error correction, so it still reads when damaged: a DataMatrix ECC 200 is still decodable with roughly 25–30% of its area damaged. In exchange it needs a camera-based (imager) scanner; an old laser reader that sweeps a single line cannot see it.

QR code
QR — readable with a phone, so it faces the consumer: a web page, product information, GS1 Digital Link. This one points to bluewaytrade.us.
DataMatrix code
DataMatrix — can be laser-marked directly onto a small part and still works at a few square millimeters. The default code of industry and electronics.
GS1 DataMatrix code
GS1 DataMatrix — the same symbol with AIs: this one carries a GTIN, an expiration date and a batch number. Required by pharma (FMD) and healthcare.
PDF417 code
PDF417 — a stacked linear code arranged in rows. You meet it on documents: driver's licenses, boarding passes, waybills.
Aztec code
Aztec — needs no quiet zone around it, so it works well in tight spaces and on screens. This is the code on rail and transit tickets.

4. GS1: where does the number come from?

If the product goes to a store, a wholesaler or a customer’s warehouse, the number on it cannot be invented. The company receives a company prefix from its national GS1 organization (in the United States, GS1 US; the examples below use the Hungarian 599 prefix of GS1 Hungary) and derives every identifier from it. Prefix length varies by company: the shorter it is, the more item numbers fit behind it.

  • GTIN (Global Trade Item Number) — identifies the TRADE ITEM: what this product is. The same product always gets the same GTIN, no matter how many are made.
  • SSCC (Serial Shipping Container Code) — identifies the LOGISTIC UNIT: which particular pallet this is. Every pallet gets a different SSCC even if the contents are identical.
  • The Hungarian 599 prefix is not a mark of origin: it shows which GS1 organization issued the number. A product whose GTIN starts with 599 may have been made anywhere in the world.
  • The numbers in this article are illustrative examples. For live use, build identifiers from your own company prefix.

5. How a GTIN is built, and the check digit

The GTIN comes in four lengths: GTIN-8, GTIN-12 (North America), GTIN-13 and GTIN-14. In European practice GTIN-13 belongs to the consumer unit — carried by the EAN-13 symbol — and GTIN-14 to the carton.

A GTIN-14 is not a new number: the same body, with an indicator digit in front (1–8, how big the pack is) and a NEW check digit at the end. This is where most systems slip: they leave the GTIN-13 check digit in place, and the customer’s system rejects the shipment.

The check digit is calculated the same way regardless of length: going from right to left, multiply alternately by 3 and 1, add up, then see how much is missing to the next multiple of ten.

  • GTIN-13 example — the body is 599012345678. The weighted sum: 5×1 + 9×3 + 9×1 + 0×3 + 1×1 + 2×3 + 3×1 + 4×3 + 5×1 + 6×3 + 7×1 + 8×3 = 117.
  • The next multiple of ten after 117 is 120, and the difference is 3 — that is the check digit. The full GTIN-13: 5990123456783.
  • The same as a GTIN-14 with indicator 1: the weighting shifts by one digit, the sum is 120, the next multiple of ten is also 120, so the check digit is 0. The GTIN-14: 15990123456780 — ending in 0, not 3.
  • Indicator digits 1–8 distinguish packaging levels (e.g., 1 = 12-pack carton, 2 = 24-pack carton). The digit 9 is reserved: it marks variable measure trade items (sold by length or weight).
The structure of GTIN-13 and GTIN-14 one below the other, with color-coded fields
The company prefix and the item reference stay the same; the indicator digit is added in front and the check digit has to be recalculated.

6. The SSCC: a serial number for every pallet

The SSCC is 18 digits, and it describes the logistics unit, not the product. If you ship three pallets of the same product, you need three different SSCCs. This is what lets the customer’s warehouse identify a whole pallet with a single scan and match it to the electronic advance ship notice (ASN).

Structure: extension digit (assigned by the company, 0–9, purely to enlarge the number pool) + GS1 company prefix + serial reference + check digit. The prefix length varies from company to company; the serial reference always fills the rest, so extension digit, prefix and serial reference together make 17 digits.

An SSCC must not be reused quickly: GS1 requires at least 12 months from the date of dispatch and recommends treating it as permanently unique in practice. A repeated SSCC merges two different shipments in the traceability record.

  • Example: extension digit 3, company prefix 5990123, serial reference 000000123 → body 35990123000000123 (17 digits).
  • With the same 3-1 rule: the weighted sum is 74, the next multiple of ten is 80, the difference is 6 — that is the check digit.
  • The full SSCC: 359901230000001236. In the barcode it is preceded by application identifier (00) and always sits in its own symbol.
The four fields of an SSCC: extension digit, company prefix, serial reference, check digit
The length of the serial reference depends on the prefix: a shorter prefix leaves room for a longer serial, so more pallets can be numbered.
The example SSCC as a GS1-128 barcode with application identifier (00)
The same number as a barcode. This is what goes at the very bottom of the pallet label, on its own — try it: your phone reads it back together with the (00).

7. Application identifiers: how does the system know what it read?

From a plain Code 128 the receiving system gets only a string: “15990123456780L2608A270131.” Which part is the GTIN and which is the date would have to come from a separate agreement. The application identifier (AI) is the 2–4 digit prefix that says so — this is what turns Code 128 into GS1-128.

Some AIs are FIXED length: the next field can follow immediately. The rest are VARIABLE length and must be closed by a separator character (FNC1) unless they come last. Hence the most useful practical trick: put the fixed-length fields first and the variable one last, and you need no separator at all — a shorter and more robust symbol.

  • (00) SSCC — 18 digits, fixed length.
  • (01) GTIN — 14 digits, fixed. Use it when the package itself is the trade item, i.e., it can be ordered and invoiced.
  • (02) GTIN of the CONTENTS — 14 digits, fixed. Valid only together with (37), and used when the logistic unit itself is NOT a trade item — for example a pallet that cannot be ordered as such.
  • (10) batch / lot number — up to 20 characters, variable length.
  • (11) production date, (13) packaging date, (15) best before date, (17) expiration date — all in YYMMDD form, 6 digits, fixed length.
  • (21) serial number — up to 20 characters, variable. Identifies an individual item, typically alongside (01).
  • (37) count of items in the logistic unit — up to 8 digits, variable. The mandatory partner of (02).
  • (310n) net weight in kilograms — 6 digits, where n is the number of decimal places. So (3103)001250 means 1.250 kg.
  • (400) customer purchase order number, (410) ship-to GLN, (420) ship-to postal code — logistics and shipping data.

8. The carton label: what goes on it?

A carton is a trade item: it has its own GTIN-14 because it can be ordered and invoiced. The minimum on the label is therefore the GTIN — but in practice that is rarely enough.

There are two routes, and they do not exclude each other. ITF-14 carries only the GTIN but can be printed straight onto corrugated board. With GS1-128 you can add the batch and the date — in a recall, that is exactly what decides whether one lot has to come back or the whole production run.

  • GTIN-14 under AI (01) — the mandatory element; it says what is in the box.
  • Batch or lot number under (10) — for traceability. Effectively mandatory for food and pharmaceuticals.
  • Best-before (15) or expiration (17) date in YYMMDD form — the two are not the same, and the customer’s system can tell them apart.
  • Piece count and product name in plain text as well — the warehouse operator does not always have a scanner on hand.
  • If the carton is also the smallest shipping unit (it does not travel on a pallet), it may carry its own SSCC under (00).
Carton label mock-up with GS1-128 and ITF-14 barcodes
Both symbols carry the same GTIN-14; the GS1-128 also carries the batch and the date. The codes in the figure are scannable.

9. The pallet label: the GS1 logistic label

The layout of a pallet label is standardized and consists of three horizontal bands. This is not aesthetics: the forklift driver, the warehouse operator and the scanner each look in a different place, and the standard is what makes that predictable.

Band 1 (top) is free format: sender, consignee, carrier, logo — for human eyes only. Band 2 (middle) shows the same data in readable text with data titles; if the scanner fails, this is what gets keyed in. Band 3 (bottom) belongs to the barcodes.

The SSCC is ALWAYS the bottom-most barcode and always stands in its own symbol. It is the only mandatory element of the label: everything else is optional, the SSCC is not.

  • Label size: typically A5 (5.83 × 8.27 in [148 × 210 mm]). If only the SSCC goes on it, A6 (4.13 × 5.83 in [105 × 148 mm]) is enough.
  • Every GS1-128 symbol should be at least 1.3 in (32 mm) high, with an X-dimension between 19.5 and 40 mil (0.495 and 1.016 mm) — the recommended value is 19.5 mil (0.495 mm).
  • The bottom edge of the barcode should sit between 15.7 and 31.5 in (400 and 800 mm) from the base of the pallet, and at least 2 in (50 mm) from the vertical edge.
  • Put a label with identical content on two adjacent sides — one short and one long — so that one is visible from any direction.
  • If the load is low and 15.7 in (400 mm) cannot be kept, place the label as high as possible on the sides that face the forklift entry.
  • For a homogeneous pallet the correct pair is (02) + (37), not (01). Using (01) would claim that the pallet itself is the orderable item — but the cartons are.
GS1 logistic label mock-up with three bands and three barcodes
The A5-proportioned mock-up is drawn at 4 units = 1 mm, so all three symbols are exactly the 1.3 in (32 mm) required by the standard. The SSCC sits at the bottom, on its own.

10. The seven most common mistakes

These are what we meet most often when a customer’s system rejects a delivery, or when “the code doesn’t scan” in the warehouse.

  • Leaving the GTIN-13 check digit at the end of a GTIN-14. New length = new check digit; it always has to be recalculated.
  • Using (01) on a pallet instead of (02) + (37) — the customer’s system then looks for an item that does not exist in the master data.
  • A frame, a line of text or a fold reaching into the quiet zone. The most common reason a perfectly good-looking symbol will not scan.
  • An X-dimension too small for the printer. At 203 dpi no bar finer than the 4.92 mil (0.125 mm) dot exists: the printer rounds, and the bar widths drift.
  • A missing FNC1 separator after a variable-length AI — the receiving system glues the next field onto the previous one.
  • The wrong ribbon for the material. The fault is not immediately visible: the code is perfect when fresh and only becomes unreadable after the abrasion of shipping.
  • Reusing an SSCC within 12 months — two different shipments end up under the same identifier in the traceability record.
Ribbon selector: which ribbon for which material →

11. Printing and verification

Code quality is not something to judge by eye — use a verifier. Readability and standards-compliant quality are not the same thing: a grade D symbol still scans when freshly printed, but not after three weeks in a warehouse and a truck ride. The verifier measures how much margin the symbol has left.

Resolution: 203 dpi is enough for general logistics symbols; 300 dpi is needed for small 2D codes, tight X-dimensions and fine text; 600 dpi for small-part marking. The machines follow suit: the CAB SQUIX 4 comes in 300 and 600 dpi, wide pallet labels call for the CAB SQUIX 6.3, pallet and drum labels wider than 6 inches for the CAB SQUIX 8.3 (8.5 in [216 mm] print width), and the smallest marking for the CAB SQUIX 4 M. Print orientation is a topic of its own: the same symbol can earn a different grade in “picket fence” and in “ladder” orientation.

Material and ribbon go together: wax for paper labels, wax-resin or resin for synthetics. A bad pair does not show up immediately, so measure a sample printed with the final material combination, not one made in the lab.

Print orientation, inverse codes and grading — in detail →

Questions? We help you choose.

Describe the task and we will suggest the right label-ribbon-printer combination.