GS1 barcodes explained: company prefixes, check digits and in-store numbers

GS1 is the non-profit organisation behind the numbers in retail barcodes. When you join your national GS1 office, you get a company prefix: the first digits of every barcode you'll ever make. The rest of each number is yours to hand out.

By Kodelo Labs · Updated 25 November 2026

On this page

From prefix to product numbers

A 13-digit GTIN has three parts: your company prefix, an item reference you choose for each product variant, and one check digit at the end. The shorter your prefix, the more digits are left for item references:

Numbers in one prefix (13-digit GTIN)
Prefix lengthDigits left for itemsProduct numbers
7 digits5100,000
8 digits410,000
9 digits31,000
10 digits2100

Every variant needs its own number: a T-shirt in three colours and four sizes uses twelve. Some GS1 offices also sell single numbers for shops that only need a few.

Working out the check digit

The final digit is there so a scanner can spot a misread. Here is the sum for 061414100001, built on GS1's own example prefix:

  1. Begin with the rightmost digit and give the digits weights of 3 and 1 in turn: 1×3, 0×1, 0×3, 0×1, 0×3, 1×1, 4×3, 1×1, 4×3, 1×1, 6×3, 0×1.
  2. Add the results: 3 + 0 + 0 + 0 + 0 + 1 + 12 + 1 + 12 + 1 + 18 + 0 = 48.
  3. Go up to the next multiple of ten (50). The difference, 2, is the check digit.

The full number is 0614141000012. The same steps work for 8, 12 and 14-digit GTINs.

In-store numbers

Numbers that start with 2 in an EAN-13 (or 4 in a UPC-A) are set aside for use inside one business. They are free and work at your own till and in your stockroom, but they aren't unique worldwide, so another shop may use the same number for something else. Marketplaces and retail chains won't accept them.

Use them for products you make and sell yourself, items that never leave your shop, or while you wait for your GS1 membership.

Keeping every number unique

GS1's rules say a GTIN, once given to a product, isn't given to a different product later. So keep a record of which numbers you have used, and never hand out the same item reference twice. If several people add products, or numbers are given out automatically, that record has to stay in one place.

Kodelo keeps a counter for each kind of code, so the next number always follows the last one it gave out. With Prevent duplicate codes on, it also checks every barcode already in your store before writing. If numbers were used since you opened the page, it tells you and suggests the next unused one.

Numbers from resellers

Some websites sell barcodes cheaply that were once licensed to other companies. Marketplaces that check numbers against GS1's records may reject them, because the number points to a different company. If you plan to sell through a marketplace or a retailer, get your numbers from your national GS1 office.

Create GS1 barcodes for Shopify products with Kodelo

  1. Get a company prefix. Join your national GS1 office and note your company prefix.
  2. Open Generate. In Kodelo, go to Generate and choose Barcodes only, then GS1 barcode.
  3. Choose the format and enter your prefix. Pick the barcode format (EAN-13, UPC-A, EAN-8 or ITF-14) and type your company prefix.
  4. Tick the products. Tick the products or variants that need barcodes, and check the new barcodes in the list.
  5. Generate. Click Generate. Each variant gets the next number with its check digit.

Questions

How many barcodes do I need?

One for each variant you sell: every size and colour is a separate product number.

Does Kodelo add the check digit?

Yes. You enter the company prefix; Kodelo adds the item reference and the check digit.

Can I use in-store numbers on Amazon?

No. Amazon and other marketplaces expect GTINs licensed from GS1. In-store numbers are for your own shop.

Sources

Checked on 25 November 2026. Rules change: check the official source before you rely on it.