Product data

How to get an EAN or UPC barcode for a product

You cannot invent one, and the cheap barcode resellers sell numbers that marketplaces increasingly refuse. What a GTIN is, where a real one comes from, and the cases where you don't need one at all.

By Rehan Idrisi · · 5 min read

Part of: Logistics & Shipping, SEO for Ecommerce

This question usually arrives in a hurry. A marketplace listing has been rejected for a missing or invalid GTIN, someone has found a site selling barcodes for a few hundred rupees, and the question is whether to just buy one. The short answer is that it depends on who you are selling to, and the cheap option carries a risk that is not obvious until it fires.

EAN, UPC and GTIN are mostly the same thing

GTIN is the umbrella term. EAN-13 is a 13-digit GTIN, common everywhere outside North America. UPC-A is the 12-digit North American form, and it is simply an EAN-13 with a leading zero. ISBNs are GTINs too: a modern 13-digit ISBN is an EAN-13 that happens to start with 978 or 979.

This matters practically, because a system asking for an EAN will usually accept a UPC once you pad it, and a catalog holding both is holding one kind of number in two notations, not two kinds of number.

The last digit is calculated, not chosen

The final digit of any GTIN is a check digit, derived arithmetically from the digits before it. Reading the first twelve digits from the left, multiply those in odd positions by one and those in even positions by three, add the results, and the check digit is whatever takes that total up to the next multiple of ten.

5 9 0 1 2 3 4 1 2 3 4 5   <- first 12 digits

odd  positions: 5+0+2+4+2+4 = 17   x1 = 17
even positions: 9+1+3+1+3+5 = 22   x3 = 66
                                  total 83

next multiple of ten = 90
check digit = 90 - 83 = 7

full EAN-13: 5901234123457

This is why a typo in a barcode is usually caught immediately instead of slipping through. It is also why you cannot patch a number by changing a digit in the middle: the check digit stops matching, and any validator rejects it.

A valid check digit only proves the number is well-formed. It says nothing about whether the number is yours, and ownership is the part marketplaces verify.

Where a real barcode comes from

GS1 issues company prefixes. You license a prefix, and every GTIN you create begins with it. That shared prefix is the link between the number and your business in GS1's records. The fee scales with how many numbers you need, so a small catalog costs considerably less than most people assume before they look.

The prefix is the product. The individual numbers are yours to assign afterwards, and assigning them is arithmetic you can do yourself: pick the next unused item reference and compute the check digit.

Why the cheap resellers are a real risk

Sites selling individual barcodes cheaply are generally reselling numbers from company prefixes issued long ago, under older terms that did not treat a prefix as a licence tied to one business. The numbers are structurally valid. Their check digits compute correctly. A scanner reads them without complaint.

The problem is ownership. Several large marketplaces now check a submitted GTIN against GS1's register and compare the registered company against the seller account. A resold number is registered to someone else, so the listing is refused. Worse, this can surface after you have been selling for months, when the marketplace runs a verification pass across existing listings and a catalog you thought was settled starts failing.

Policies differ between marketplaces and change over time, so check the current requirements of the specific channel you are selling on. What worked for someone else last year is not evidence about this year. The direction of travel has been consistently toward stricter verification.

When you don't need a barcode at all

If you manufacture your own products and sell them only through your own store, nothing requires a GTIN. Your SKU is sufficient for your own picking, stock and reporting. Buying barcodes for a direct-to-consumer catalog that never touches retail is a cost with no return.

You need one when something outside your business has to recognise the product: a physical retailer stocking it, a marketplace that requires a GTIN for the category, or Google Merchant Center, which expects the identifier for any product that has one.

There is also a middle case worth knowing. Some marketplaces will issue an internal identifier, or grant an exemption for handmade or own-brand goods, letting you list without a GTIN. That is usually the right route for a small own-brand catalog, and it costs nothing.

What to do with the numbers once you have them

  • Store the GTIN in its own field, never in the SKU field. They answer different questions and different systems read them.
  • Store it as text, not as a number. Spreadsheets strip leading zeros, which silently turns a valid UPC into an invalid one.
  • Validate the check digit on import, not on upload. A bad digit found at upload time may already be printed.
  • Keep the mapping from GTIN to your own SKU somewhere deliberate. You will need it every time you onboard a new channel.

The leading-zero problem is the one that bites hardest, because it is invisible. A twelve-digit UPC beginning with zero, opened in a spreadsheet and saved again, becomes an eleven-digit number that is not a valid GTIN in any notation. It will pass a glance and fail a validator.

Can I create my own EAN number for a product?

Only for internal or test use. You can compute a structurally valid EAN-13 yourself, but without a GS1-licensed company prefix the number is registered to someone else or to nobody. Marketplaces that verify GTIN ownership will reject it, so a self-made barcode is safe for testing a system and unsafe for a real listing.

Share this guideLinkedInXWhatsAppFacebook
All guides