How to get a barcode for your product: GTIN, EAN-13 or UPC-A, and a QR code with GS1 Digital Link

Grzegorz OsakGrzegorz OsakFounder, Thing Identity
10 min read

A BARCODEHOW TO GET ONEAND WHAT TO PRINT NEXT TO IT

The question "how do I get a barcode?" usually comes up when the product is almost ready: the recipe is final, the packaging design is in progress, and the first retailer or marketplace is asking for an EAN or UPC. That is when it turns out that the image with the bars is the smallest part of the job.

Any program can generate a barcode in seconds. What you actually need to obtain is the GTIN, the number encoded in that barcode. It identifies the product at the checkout, in the warehouse, in the product feed, and in the GS1 database. Below we explain where to get it, how to turn it into an EAN-13 or UPC-A barcode for your label, and why it pays to plan a QR code with GS1 Digital Link next to it from the start.

The short answer: first the number, then the barcode

You get a barcode for a product sold in retail in three steps:

  1. Join your local GS1 Member Organization and license a GS1 Company Prefix, a block of numbers assigned to your company.
  2. Assign a GTIN from that block to every product.
  3. Print the number on the label as an EAN-13 or UPC-A barcode and, with Sunrise 2027 in mind, in a QR code with GS1 Digital Link next to it.

We explain the difference between the number and the barcode in more detail in GTIN vs. EAN. For now, remember one thing: the GTIN is the number, and the linear barcode and the QR code are two ways of presenting it.

Do you need your own barcode at all?

Before you apply, check which situation you are in.

You manufacture, or have someone manufacture, products under your own brand. You need your own GTINs. This also applies to brands that outsource production: the number belongs to the brand owner, not to the plant that physically makes the goods.

You resell someone else's product. You do not assign a new number. You use the GTIN assigned by the manufacturer and do not put your own barcode on the packaging. Two different numbers on the same item are a sure way to create a mess in your trading partners' databases.

You manufacture for a retailer under its private label. The contract with the retailer decides whose prefix goes on the packaging. Sometimes the retailer assigns the numbers itself.

You only sell locally, with no scanning checkouts and no marketplaces. No law requires a barcode. It usually turns out to be needed with the first larger customer, though, so it is better to plan it from the start than to redesign the label a few months later.

Products weighed and packed in store are a separate case. They carry in-store codes starting with the digit 2, printed by the store's scale. These numbers only work within one retail chain and do not replace the manufacturer's GTIN.

Step 1. Join your GS1 Member Organization

GS1 is the global organization that manages the GTIN system. National GS1 Member Organizations allocate the numbers, such as GS1 US in the United States, GS1 UK in the United Kingdom, or GS1 Poland in Poland. You join by signing an agreement and paying the membership fee. Each Member Organization publishes its current terms and fees.

In return you license a GS1 Company Prefix. Its first digits show which Member Organization allocated it: a prefix licensed from GS1 US, for example, starts with 0 or 1, in one of the ranges assigned to GS1 US. These digits do not indicate the country of manufacture, only the national organization that allocated the block. A product made in the United States can carry a different prefix, and goods with a GS1 US prefix can be made abroad.

The length of the prefix decides how many numbers you can assign. A company with a few products needs a smaller block than a manufacturer with hundreds of variants, so count all current and planned variants before joining, including cases and other outer packaging.

Step 2. Assign GTINs to your products

A GTIN-13, or a GTIN-12 in North America, consists of three parts:

  • the company prefix allocated by GS1,
  • the item reference, which you assign yourself,
  • a check digit calculated from the other digits.

Example: in the number 5901234123457 the last digit, 7, is the check digit. If someone mistypes one digit, the system will catch the error because the checksum will no longer match.

The rules for assigning numbers are simple, but easy to forget with your first product:

  • every variant gets a separate number. A different size, flavor, color, formulation, or pack count always means a new GTIN,
  • a case has its own number, different from the unit inside,
  • a number is never moved to another product. A discontinued GTIN stays in your partners' systems long after sales end,
  • a new packaging design usually does not need a new number, as long as the product stays the same for the buyer.

Step 3. The EAN-13 or UPC-A barcode on the label

Outside North America, retail products carry an EAN-13 with a 13-digit GTIN. In the United States and Canada they usually carry a UPC-A, which encodes a 12-digit GTIN. Both belong to the same EAN/UPC family and share the same dimensions, and US businesses have been updating their systems to read EAN-13 barcodes since 2005, so an imported product does not need a new barcode.

Only now do you turn the number into an image. You can prepare the barcode file in a graphics program with a barcode plugin or in your label printer's software. Whatever tool you use, keep an eye on a few parameters when designing the label.

EAN-13 and UPC-A barcode parameters on a label

Parameter

What to watch for

Size

At nominal size (100%) both an EAN-13 and a UPC-A are 37.29 mm (1.468 in) wide including the quiet zones, and the bars are 22.85 mm (0.9 in) high. The narrowest bar is then 0.33 mm (0.013 in). The permitted range is 0.264 to 0.660 mm, that is 80% to 200% of the nominal size. Keep the proportions when scaling.

Bar height

Do not cut the bars down to fit the barcode on a small label. A truncated barcode is harder to scan at the checkout.

Quiet zones

For an EAN-13, leave a clear area at least 11 times the narrowest bar wide on the left and at least 7 times on the right, about 3.6 mm and 2.3 mm at nominal size. For a UPC-A, leave at least 9 times on both sides, about 3 mm. Nothing is printed in these areas.

Colors

Dark bars on a light background, ideally black on white. Scanners typically use red light, so red and brown bars are invisible to them. A reversed barcode, with light bars on a dark background, cannot be read.

File format

Vector (PDF, EPS, SVG), not a screenshot or a JPG. A raster barcode loses sharp edges when scaled.

Placement

A flat surface, away from seals, folds, and edges. Usually the lower right part of the back panel.

Print quality

Before a large print run, check a proof with a barcode verifier that grades print quality according to ISO/IEC 15416. The required values are set out in the GS1 General Specifications.

Sources for the values in the table: EAN-13 size by GS1 UK, EAN-13 and UPC-A dimensions by GS1 Canada, size range and quiet zones by GS1 Sweden, quiet zones and barcode colors by GS1 UK, and the GS1 General Specifications.

The number is also printed in digits under the bars. It is not decoration: if the barcode is damaged, the cashier can type the GTIN in by hand.

This is where most guides stop. Yet the same GTIN you have just printed as an EAN-13 or UPC-A can go on the label a second time, this time in a QR code that follows the GS1 Digital Link standard. You do not need a new number or another registration. The GTIN you already have is enough.

GS1 Digital Link writes the product number as a web address, for example:

https://gtin.at/01/00012345000058

This is the working address of our demo product. You can open it and see what a customer sees after scanning the code.

The 01 segment is the GS1 Application Identifier for a GTIN, and the number itself follows it, padded with leading zeros to fourteen digits. The address can be extended with more data, such as a batch or lot number (/10/) or a serial number (/21/).

Thanks to this structure, one QR code serves two audiences at once:

  • the checkout scanner reads the GTIN from the address and recognizes the product just as it would from the EAN-13 or UPC-A,
  • the customer's phone opens the product page: ingredients, allergens, instructions, certificates, recycling information, or an e-label.

This is the key difference from an ordinary QR code with a marketing link. That kind of code only works on a phone, and the checkout will not find a product number in it. A code with GS1 Digital Link is a full carrier of the GTIN and the successor to the barcode: GS1 is gradually moving retail from linear barcodes to 2D codes.

Sunrise 2027: why print both codes now

Sunrise 2027 is the name under which GS1 runs the initiative to move retail from linear barcodes to 2D codes. In the global GS1 guideline for 2D barcodes at retail point of sale, the same goal is called Ambition 2027: by the end of 2027, checkouts around the world should be able to read and process the GTIN from both linear barcodes and 2D codes. Retailers are therefore updating software and replacing scanners so that the GTIN can be read from an EAN-13 or UPC-A, from a QR code with GS1 Digital Link, and from a GS1 DataMatrix. In Poland, for example, Biedronka, MAKRO, Żabka, and Auchan have already signed implementation declarations.

Sunrise 2027 does not mean the EAN-13 and UPC-A disappear from packaging in 2028. According to the same guideline, linear barcodes will coexist with 2D codes for as long as they are needed. A product with a 2D code for the checkout must also carry a linear barcode until at least 90% of point-of-sale systems can read the GTIN from a 2D code. For a manufacturer this leads to a practical recommendation:

  1. The EAN-13 or UPC-A stays as the primary barcode for the checkout.
  2. You place a QR code with GS1 Digital Link next to it and encode the same GTIN in it.
  3. Both codes go on the label in one design, not in two successive redesigns.

If the QR code is to be scanned at the checkout together with the linear barcode, the whole 2D code, including its quiet zone, should fit within 50 mm of the center of the linear barcode. This distance comes from the testing described in the GS1 guideline for 2D barcodes at retail point of sale, in the section on placement. We cover the details, including minimum sizes and the mistakes printers make most often, in where to place GS1 Digital Link on packaging. For a comparison of the QR code and the DataMatrix code, see which 2D code to choose.

The biggest benefit is long term. A linear barcode is printed for good, while a QR code with GS1 Digital Link goes through a resolver, the service that decides what content to show after a scan. You can change the product page, add translations, update the ingredients, and later connect a Digital Product Passport without reprinting a single label.

The most common mistakes when getting a barcode

A number bought from a reseller. You can find "cheap EAN codes" online, resold outside the GS1 system. These numbers come from blocks allocated to other companies, so the Verified by GS1 database shows someone else's name. This ends with a marketplace rejecting the listing or attaching your product to someone else's product page.

One number for several variants. The checkout then cannot tell the 250 ml version from the 500 ml one, and the warehouse mixes up the stock.

A barcode generated from random digits. An online generator will draw a barcode from any string with a valid check digit. The scanner will read it, but the number does not belong to you and is not in any database.

A QR code without a GTIN. An ordinary link to a company website in a QR code does not replace GS1 Digital Link.

A 2D code added at the last minute. A QR code squeezed into the first free spot, on a seal, or too far from the linear barcode causes problems both at the checkout and when scanning with a phone.

Frequently asked questions

Summary

A barcode is just a carrier. You get a GTIN from the company prefix licensed from your GS1 Member Organization, assign it to the product, and only then print that number on the label as an EAN-13 or UPC-A barcode.

You can put the same number right next to it in a QR code with GS1 Digital Link. The checkout reads the GTIN from it, and the customer sees up-to-date product information.

Already have a GTIN? Enter it in our 2D code generator to see your GS1 Digital Link address, or schedule a free consultation.

Official GS1 resources

Read next

We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our Cookie Policy.