Shopify guides · Updated 2026-11-07

UPC vs EAN vs SKU vs Code 128: which barcode does your Shopify store need?

Short answer: use Code 128 for internal codes you print yourself, and UPC or EAN (GS1-issued GTINs) when a marketplace or retailer needs to identify your product. A SKU isn't a barcode type at all. It's your own stock code, which you can print as a Code 128 barcode. The rest of this guide explains the differences, when you must pay GS1, and how check digits work.

The four terms in one table

What it isCharactersWho assigns itTypical use
SKUYour internal stock code (not a barcode format)Anything you likeYouInventory, picking, reorders
Code 128A barcode symbology that can encode any textAll 128 ASCII charactersYou (it's just a way to draw a value)Internal labels, SKUs, shipping, warehouses
UPC-ABarcode for a 12-digit GTIN (GTIN-12)12 digitsThe brand owner, using a GS1 licenseRetail products, mostly North America
EAN-13Barcode for a 13-digit GTIN (GTIN-13)13 digitsThe brand owner, using a GS1 licenseRetail products, mostly outside North America; books (ISBN)

The key distinction: UPC and EAN carry a globally unique product number (a GTIN) that ties the item to the company that licensed it from GS1. Code 128 is only a drawing method. It encodes whatever text you give it, and it means nothing outside your business.

UPC vs EAN: same family, different length

GS1 calls the 12-digit number a GTIN-12, encoded as a UPC-A barcode, and the 13-digit number a GTIN-13, encoded as an EAN-13 barcode. GTIN-12 is used mainly in North America and GTIN-13 mainly elsewhere. Retail scanners in the US were updated to read both (GS1 US's "Sunrise 2005" initiative).

The two are closer than they look. A UPC-A is an EAN-13 whose first digit is 0. The bars are identical, and only the printed digits differ. 036000291452 as a UPC is 0036000291452 as an EAN-13. Books use EAN-13 too: an ISBN-13 is an EAN-13 starting with 978 or 979.

There are also short versions (UPC-E and EAN-8) for tiny packages. If you sell normal-sized products, you can ignore them.

Code 128: the right choice for internal codes

Code 128 is a compact, high-density barcode that encodes letters, digits and punctuation. Your SKU TEE-BLK-M can be printed exactly as it is. It's the default for in-store labels, stockroom bins and shipping, because:

The catch: Code 128 numbers are only meaningful inside your store. Amazon, Google Shopping and retailers can't look them up. You'll also see GS1-128 on shipping cartons. It's Code 128 with GS1 data formatting for logistics, not for scanning at a retail register.

Which barcode does your Shopify store need?

Your situationWhat to use
You make products and sell only on your own Shopify store and at markets with Shopify POSCode 128 internal codes are fine, often just your SKU.
You resell other brands' productsUse the manufacturer's existing UPC/EAN. Never relabel another brand's product with your own GTIN.
You sell your own brand on AmazonGS1-issued GTINs, or an approved Amazon GTIN exemption (available for some private-label, handmade and generic products).
You sell your own brand on Google ShoppingGoogle recommends GTINs for products whose manufacturer assigned one. For your own private-label goods with no GTIN, you can submit brand + MPN instead. Never make one up.
A retailer or wholesaler is stocking your productGS1-issued GTINs, almost always. Ask for the buyer's requirements.
You need a code for weighed or in-store-only itemsInternal Code 128, or EAN-13 in the GS1 in-store range (prefix 20–29), which is reserved for restricted, internal use.

Why "cheap UPC codes" cause trouble

Amazon says it verifies UPCs by checking the GS1 database. A number bought from a reseller is usually still registered to whichever company originally licensed it, so it won't match your brand, and listings can be removed. Google also warns not to guess or invent GTINs. It doesn't accept numbers with restricted prefixes (such as 2, 02 and 04) and numbers with a wrong check digit.

What GS1 barcodes cost (GS1 US, November 2026)

In the US, you license GTINs from GS1 US. Prices from GS1 US's store:

OptionInitial feeAnnual fee
Single GS1 US GTIN$30 eachNone
Company Prefix, up to 10 products$250$50
Company Prefix, up to 100 products$750$150
Company Prefix, up to 1,000 products$2,500$500
Company Prefix, up to 10,000 products$6,500$1,300

Single GTINs suit a few products. Remember that every variant needs its own GTIN, so one shirt in 12 sizes and colors needs 12. Past a handful of SKUs, a Company Prefix is usually cheaper and also gives you a brand-specific prefix. Outside the US, buy from your country's GS1 member organization. Prices vary by country.

Check digits explained

The last digit of every UPC and EAN is a check digit, calculated from the others with GS1's modulo-10 method. Scanners redo the math on every scan. If it doesn't match, the scan is rejected instead of ringing up the wrong product.

How to calculate it

  1. Take every digit except the check digit.
  2. Starting from the rightmost of those digits, multiply alternately by 3, 1, 3, 1…
  3. Add up the results.
  4. The check digit is whatever you add to reach the next multiple of 10. If the sum already ends in 0, the check digit is 0.

Worked example: EAN-13 4006381333931

The first 12 digits are 400638133393. The weights start at 3 on the rightmost digit, so the leftmost digit gets 1:

Digit400638133393
Weight131313131313
Product40018324193999

The sum is 89. The next multiple of 10 is 90, so the check digit is 1, which gives 4006381333931.

For UPC 036000291452, the first 11 digits give a weighted sum of 58, so the check digit is 2. Because the weights start from the right, the same rule works for 8-, 12-, 13- and 14-digit GTINs.

Don't want to do the math? Our free barcode label generator has a check digit calculator. It also flags any EAN-13 or UPC-A with a wrong last digit before you print.

Setting the barcode type in Shopify

In the Shopify admin, open a product and go to the Inventory section. In the Barcodes field, choose a type for each code: Custom (the default, for internal codes such as Code 128 values), GTIN, UPC, EAN, ISBN or ASIN. Shopify validates standard types as you type. It also suggests GTIN when a Custom value turns out to be a valid GTIN, and it warns you if a GS1-registered number lists a different product name or vendor. A variant can hold up to 20 barcodes, and the first one is used for labels and channel feeds.

Mixing GTINs and internal codes? Oak Glen Barcode Labels prints Code 128, UPC and EAN labels from your Shopify products. Its barcode report finds variants with missing codes, invalid check digits or barcodes shared with another variant, and fixes them in one click.

Try Barcode Labels free

Next: How to print barcode labels for Shopify products and How to find missing or duplicate barcodes in Shopify.

FAQ

Do I need to buy UPC codes to sell on Shopify?

No. Shopify doesn't require a barcode at all. You need GS1-issued UPC or EAN codes when you sell your own brand on Amazon or Google Shopping, or to retailers that ask for them. For your own store and POS, internal Code 128 codes work fine.

Can I use an EAN-13 in the US, or a UPC in Europe?

Yes. US retail systems were upgraded to scan both UPC and EAN barcodes years ago (GS1's "Sunrise 2005"), and a 12-digit UPC is the same as a 13-digit EAN with a leading zero. Where you license the number matters less than licensing it from GS1.

Are cheap UPC codes from resellers OK?

Risky. Amazon says it checks UPCs against the GS1 database, and resold numbers are usually registered to another company, so they don't match your brand. GS1 US sells single GTINs for $30 each, which removes most of the reason to buy elsewhere.

Is a SKU the same as a barcode?

No. A SKU is your internal stock code. A barcode is a scannable symbol that encodes a value, which might be your SKU (as Code 128) or a GTIN (as UPC/EAN). In Shopify they're separate fields on each variant.

What is the check digit in a barcode?

The last digit of a UPC or EAN, calculated from the other digits. Scanners recalculate it on every scan and reject the code if it doesn't match, which catches misreads and typos.