Looped
← Blog · Article

Barcodes explained: GS1 for South African businesses

GTINs, check digits, cartons, 2D codes and in-store numbers, and how Looped Inventory handles them

Ratul Maharaj

Ratul Maharaj

Founder & CEO

If you run a shop or sell stock to one, you deal with barcodes every day. Most people know the stripes go beep at the till. Fewer know who decides the numbers, why some start with 600 and others with 2, or what changes when the industry starts printing square 2D codes next to them.

The rules come from one organisation, GS1, and they're public. Here's what a South African small business needs from them, with links to the standards themselves, and then how Looped Inventory works with them.

Who GS1 is

GS1 is a global non-profit that runs the numbering system behind retail barcodes. It publishes the GS1 General Specifications, the standard that says how the numbers are built and which barcode carries which number. Each country has a member organisation that hands out numbers. Ours is GS1 South Africa, which describes itself as "the exclusive source of GTIN's & barcodes globally" in this country.

The number: a GTIN

The number under a product barcode is a GTIN, a Global Trade Item Number. It comes in four lengths:

NumberDigitsUsually printed asWhere you see it
GTIN-1313EAN-13Almost every product in a South African shop
GTIN-1212UPC-AImported goods from the US and Canada
GTIN-88EAN-8Very small packs
GTIN-1414ITF-14 or GS1-128Cartons and cases

These are the same number in different widths. Inside a GS1 system every GTIN is padded to 14 digits with zeros on the left, so the EAN-13 9520123456788 and the GTIN-14 09520123456788 identify the same product.

The first few digits are a prefix that says which member organisation issued the number. South African GTINs usually start with 600 or 601. The examples in this post use 952, which GS1 reserves for examples.

The check digit

The last digit of every GTIN is a check digit. It catches a misread or a typo, and every till and scanner works it out to make sure it read the barcode correctly. The method is the same for every length (General Specifications, section 7.9.1):

  1. Take the digits before the check digit.
  2. Starting from the right, multiply them by 3, 1, 3, 1 and so on.
  3. Add the results.
  4. Subtract the sum from the next multiple of ten. That's the check digit.

Here it is for 952012345678:

Digit952012345678
Weight131313131313
Result9152016312518724

The results add up to 102. The next multiple of ten is 110, so the check digit is 8 and the full EAN-13 is 9520123456788.

One product, several packaging levels

A product you sell one at a time often arrives in an inner pack of six, in a carton of 24, on a pallet. GS1 gives each level its own number:

  • Consumer unit. The GTIN-13 on the item, scanned at the till.
  • Inner pack and carton. A GTIN-14, made from the unit's GTIN with an indicator digit from 1 to 8 in front and the check digit worked out again. Our example unit 9520123456788 becomes 19520123456785 for a carton. It's usually printed as ITF-14, which prints well on corrugated cardboard. GS1 reserves indicator 9 for items sold by weight.
  • Pallet. An SSCC (Serial Shipping Container Code), an 18-digit number for one particular shipment, printed on a GS1-128 label.

Extra data: Application Identifiers

A plain EAN-13 only carries the GTIN. To carry a batch number or an expiry date as well, GS1 uses Application Identifiers (AIs): a short number in front of each piece of data that says what it is. The common ones (General Specifications, table 3-1):

AIMeansFormat
(01)GTIN14 digits
(10)Batch or lot numberUp to 20 characters
(11)Production dateYYMMDD
(15)Best before dateYYMMDD
(17)Expiry (use by) dateYYMMDD
(21)Serial numberUp to 20 characters

Written out for people to read, the AIs go in brackets: (01)09520123456788(17)271231(10)ABC123 is that product, expiring 31 December 2027, batch ABC123. The brackets are only for people; they're never encoded in the barcode. A day of 00 in a date means the last day of the month.

Three barcodes carry these strings:

  • GS1-128, a long linear barcode, mostly on cartons and pallet labels.
  • GS1 DataMatrix, a small square 2D code, already standard on medicines.
  • GS1 QR Code, the QR version.

Sunrise 2027 and 2D barcodes

GS1 and the retail industry have set a goal they call Sunrise 2027. In the words of GS1's 2D Barcodes at Retail Point-of-Sale Implementation Guideline: "The initial goal is for retail point-of-sale (POS) scanning to be globally capable of reading and processing the GTIN from both existing linear and 2D barcodes by the end of 2027."

Two things in that guideline matter for a small business.

First, the EAN-13 isn't going anywhere. "Linear barcodes (e.g., EAN/UPC and GS1 DataBar) will not go away and will coexist with 2D barcodes for as long as there are uses for them." During the transition a product carries both: its EAN-13 and a 2D code.

Second, the 2D code is either a GS1 DataMatrix or a QR code holding a GS1 Digital Link, which is a web address with the GTIN in it, such as https://id.gs1.org/01/09520123456788. A till reads the GTIN out of it; a customer's phone opens the web page.

For a South African shop, that means checking whether your till scanners are imagers (cameras) or older lasers, because lasers can't read 2D codes. The guideline says the goal "may require equipment upgrades if the POS scanner is not already imager capable". If you make products, you can start adding a 2D code next to the EAN-13 when you next redo your packaging. GS1 South Africa has a page on 2D in retail, and we couldn't find a separate South African deadline.

In-store codes starting with 2

Plenty of shops print their own barcodes for things that never had one: loose items, house-brand goods, a market stall's stock. GS1 sets number ranges aside for this, called Restricted Circulation Numbers (RCNs). The General Specifications say RCNs "SHALL NOT be used globally or in open environments". They're for use inside one company, or inside a country under the local member organisation's rules.

In practice:

  • Your own shop, your own labels. An in-store code is fine. It only has to be unique in your system.
  • Selling through another retailer or a wholesaler. Your code ends up in their system next to everyone else's, so it has to be a real GTIN licensed from GS1 South Africa. An in-store code could clash with another supplier's.
  • Weighed or cut items. GS1 South Africa uses codes starting 28 and 29 for items with the price in the barcode, so keep your own codes out of that range.
  • 2D codes. RCNs "are not permitted for use in 2D barcodes". A GS1 DataMatrix or GS1 QR code should carry a real GTIN.

To get real GTINs, GS1 South Africa offers a single GTIN or a Company Prefix licence, with a once-off entrance fee and an annual renewal in March. Its page notes that "each variation of each product you sell requires a unique barcode", so a shirt in three sizes and two colours needs six. Check the current fees on that page. GS1 South Africa keeps each licensed number linked to your company's details for as long as you renew.

Practical advice

  • Shelf and product labels: EAN-13. Every till in the country reads it.
  • Cartons: ITF-14 with a GTIN-14, or GS1-128 if you also want a batch or expiry on the box.
  • Batch and expiry on the item: GS1 DataMatrix.
  • Something a customer scans with a phone: a QR code. If it's on a product, make it a GS1 Digital Link so tills can read it too.
  • Quiet zones: leave blank space around every barcode. For an EAN-13 at standard size GS1 asks for 11 bar-widths on the left and 7 on the right, about 3.6 mm and 2.3 mm. A DataMatrix needs one module of space all round, and a QR code needs four.
  • Size: an EAN-13 at standard size is about 37 mm wide with its margins and 23 mm high (symbol specification table 1). You can shrink it to 80%, but cutting the bars short to save space makes it harder to scan.
  • Print a test. Scan your first labels with the scanner you'll use before you print a thousand.

How Looped Inventory handles barcodes

Every item in Looped Inventory can have a barcode in one of these formats: EAN-13, EAN-8, UPC-A, ITF-14, GS1-128, GS1 DataMatrix and GS1 QR code, plus Code 128, Code 39, QR and Data Matrix for codes outside the GS1 system.

Checking. When you type a GS1 number, Looped checks its length and check digit and tells you what the last digit should be if it's wrong. Leave the check digit off and Looped works it out. For the GS1 element-string formats, Looped reads AIs (01), (10), (11), (15), (17) and (21), checks the GTIN's check digit and that each date is a real date, and stores the code in the bracketed form with (01) first.

Generate. An item without a barcode can get one with Generate. It makes an in-store code starting with 2 that doesn't clash with any other barcode or SKU in your company. Use it for your own labels. If you sell through other retailers, enter the GTINs GS1 South Africa gives you instead.

Scanning. Scanning matches on the GTIN, whatever format you stored. Scan the GS1 DataMatrix on a box and Looped finds the item you saved with its EAN-13, and the other way round. A UPC-A read as an EAN-13 with a leading zero finds the same item too. You can scan with your phone or laptop camera, or with a USB or Bluetooth scanner that types into the scan box, when you count a stock take, adjust stock and receive stock.

Labels. The labels page prints barcodes on A4 sheets (24 labels of 70 × 37 mm, or 14 of 99 × 38 mm), on thermal rolls (50 × 25 mm or 100 × 50 mm), or on a custom size you set. Each barcode type gets its own layout: linear barcodes with the item above and the digits below, 2D codes with their quiet zone and the text beside them.

Each item has one barcode for now. Batch and expiry tracking, and a separate barcode for each packaging level, are things we've looked at but haven't built.

Sources

Share this article