inventory management

How to Generate UPC Barcodes for Your Products (2026 Guide)

How to generate your own UPC barcodes via free online tools, Excel, and inventory software, plus the part most guides skip: where the 12 digits have to come from, and what GS1 actually charges.

How to Generate UPC Barcodes for Your Products (2026 Guide)

You’re here because someone (a retailer, a marketplace, a wholesale buyer) has asked you for a barcode, and you’re not quite sure where to start.

Good news and slightly annoying news. The good news: making the barcode image is genuinely a five-minute job, and free. The slightly annoying news: the 12 digits inside that image aren’t yours to invent, and most guides on this topic skip straight past that.

We’ll walk you through what a UPC barcode is, how to generate one, which free tools actually work, and when you genuinely need to go through GS1.

Got your barcodes sorted? Now make them mean something.

A UPC is only useful if the system behind it knows what that product cost to make, which batch it came from, and how many are actually on the shelf. Stocksmith is inventory and manufacturing software built for small-batch product businesses: track raw materials, record production runs, roll up true cost per unit, and pull the reports wholesale buyers and accountants ask for.
Start your free 14-day trial. No credit card required.

What is a UPC barcode?

A UPC barcode is a 12-digit identifier used to uniquely track and manage products across retail environments, from checkout systems to warehouse inventory software.

UPC stands for Universal Product Code. The unique combination of numbers in a UPC lets a retailer scan a product at the till and match it to a specific line in their product inventory.

There are two printed formats: UPC-A and UPC-E. UPC-A is the one you picture when you think “barcode”, and it prints all 12 digits.

UPC-E is the squashed version, for products where there simply isn’t room for a full-width barcode. Small cosmetics, lip balms, tiny hardware items. It isn’t a different, shorter number: it’s the same 12-digit code with its zeros suppressed, printed in six symbol positions and shown as eight digits underneath. Scanners expand it back out to the full 12.

Where the 12 digits actually come from

This is the part worth slowing down for, because getting it wrong wastes money.

A UPC is not a number you make up. The leading digits are a GS1 Company Prefix, licensed to one specific company, and the rest identifies a product within that company’s range. If you invent 12 digits that happen to pass a check digit test, you haven’t created your own barcode. You’ve most likely printed someone else’s prefix on your packaging.

For a long time you could get away with that, because nobody looked. That’s no longer true at the big end of retail. Amazon verifies the codes on your listings against GS1’s global database, and codes that don’t resolve to you as the brand owner get rejected or suppressed. Walmart and most large grocery and big-box retailers check the same way. GS1 runs a public lookup service (GEPIR) that anyone can use to see who a prefix belongs to, so this is a 10-second check for a buyer, not a forensic investigation.

There’s a related trap: sites selling “cheap UPC codes” for a couple of dollars each. Those are almost always sub-licensed from a prefix issued to someone else, years ago. They’ll scan fine on a hobby scanner and fail the moment a real retailer validates them.

So: generate the image free, absolutely. But if the codes are going anywhere near Amazon, Walmart, or a chain retailer, the number itself has to be licensed to you.

What GS1 registration costs

GS1 is a global federation of national member organisations, so pricing and packaging differ country to country and do change. Here’s the structure, with GS1 US figures as at September 2026:

  • A single GTIN, if you have one product and no plans for many more. GS1 US licenses these individually for a one-time $30, with no annual renewal.
  • A GS1 Company Prefix, if you have a range. This is tiered by how many products you need to identify, with a one-time fee plus an annual renewal: 10 products runs $250 up front and $50 a year, 100 products $750 and $150 a year, and it scales from there.

Check the current numbers for your own country before you budget. GS1’s barcode page routes you to your national member organisation, and GS1 US publishes its own pricing if you’re in the States.

If you’re selling direct to customers through your own site, at markets, or on Etsy, none of this applies yet. Skip to when you actually need a barcode and come back when a buyer asks.

How UPC barcodes work

Let’s do a bit of theory: what’s actually encoded in those bars?

A UPC has two halves that say the same thing. The machine-readable part (the bars) and the human-readable part (the digits printed underneath). A scanner reads the bars; a human can key in the digits when the scanner is being uncooperative, which happens more than you’d think.

The 12 digits break down like this:

  1. Number system digit: the first digit, indicating broadly what kind of item this is. Most regular retail products start with 0, 1, 6, 7, 8, or 9.
  2. Company prefix: the digits GS1 licensed to the brand owner.
  3. Item reference: the digits the brand owner assigns to distinguish one of their products from another.
  4. Check digit: the last digit, calculated from the other 11, so a scanner can tell instantly if it misread something.

You’ll see the classic “one, then five, then five, then one” split quoted all over the internet. That was true when every prefix was the same length, and it’s still a fine mental model. But GS1 now issues prefixes of varying lengths, so a business with thousands of SKUs gets a shorter prefix and more item digits, and a business with ten gets a longer prefix and fewer. The total is always 12.

Those digits are encoded into black and white bars, and when a scanner reads them it matches the number to whatever the retailer has stored against it in their own system. That’s the whole trick: the barcode carries no price, no description, no batch. It’s a pointer. Everything useful lives in the database it points at, which is why your inventory tracking matters far more than the barcode itself.

UPC uses a specific symbology, also called UPC-A. There are plenty of other barcode symbologies out there, including Code 39, Code 128, QR codes, and EAN. They are not interchangeable, and that distinction bites people in the Excel section below.

How to generate a UPC barcode for free

You can generate a UPC barcode image for free with online tools, no software installation required.

The fastest route: type your 12-digit number into a free online barcode generator, pick your format, download a print-ready image. Under a minute.

Two that work well:

For small print runs, sample packaging, or testing your label layout, these are entirely sufficient. The catch is the one we’ve already covered: the number you type has to be a valid UPC, and for retail it has to be licensed to you. If you’re laying out your numbering within a prefix you own, run each code through our UPC check digit calculator to confirm the last digit before you send anything to a printer. A transposed digit caught on screen is free. Caught on 2,000 printed labels, less so.

How to create a UPC barcode using Excel

Now that you understand the basics, let’s look at generating barcodes in Microsoft Excel. Here’s the step-by-step:

  1. Open Excel and start with a new or existing spreadsheet.
  2. Install a barcode font on your computer (more on choosing one below).
  3. In the first cell, enter the number for your product.
  4. Select that cell and change the font to your newly installed barcode font.
  5. Adjust the column width until the bars render cleanly.
  6. Save your file and print the sheet.

That’s a working barcode sheet, and for a handful of products it’s fine.

Two things to watch. First, this gets tedious fast: past a dozen or so products you’re maintaining a spreadsheet of numbers and a spreadsheet of stock, and keeping them in agreement by hand. That’s usually the point where people move to inventory software built for small manufacturers and keep the product code on the product record itself, alongside its cost and its stock level.

Second, and this is the one that catches people out: most free barcode fonts are not UPC fonts.

Choosing a barcode font for Excel

You almost certainly don’t have a barcode font installed by default, so you’ll need to grab one. There are plenty of free options:

Install them like any other font, then apply the font to your cells.

Here’s the bit worth repeating: Code 39 and Code 128 are different symbologies from UPC-A. Type your 12-digit UPC into a Code 128 font and you’ll get a perfectly valid, perfectly scannable Code 128 barcode that a retail point-of-sale system will not read as a UPC. It looks right. It scans on a test app. It fails at the till.

If the barcode is going on retail packaging, either use an EAN-13 font (a UPC-A is an EAN-13 with a leading zero, so an EAN-13 font is the correct tool) or use one of the online generators above and set the format explicitly to UPC-A. Save Code 39 and Code 128 for the internal stuff: shelf labels, bin locations, job sheets.

Got your barcodes sorted? Now make them mean something.

A UPC is only useful if the system behind it knows what that product cost to make, which batch it came from, and how many are actually on the shelf. Stocksmith is inventory and manufacturing software built for small-batch product businesses: track raw materials, record production runs, roll up true cost per unit, and pull the reports wholesale buyers and accountants ask for.
Start your free 14-day trial. No credit card required.

Difference between UPC and EAN barcodes

UPC and EAN do the same job and look almost identical. The differences that matter:

  • Length: EAN codes carry 13 digits, UPCs carry 12. A UPC-A is really just an EAN-13 with a leading zero, which is why the two families play nicely together.
  • Leading digits: the first digits of an EAN identify which national GS1 organisation issued the prefix. On a UPC, that first digit is the number system indicator instead.
  • Geography: EAN is the default across Europe and most of the world, UPC dominates North American retail.
  • Compatibility: EAN scanners read UPCs without complaint. The reverse isn’t guaranteed, because an older UPC-only scanner has no room for the 13th digit.

If you’re selling internationally, most modern point-of-sale hardware handles both. Ask your retail partners what they scan before you commit to a format, and if you’re supplying both markets, an EAN-13 keeps everyone happy.

When do you actually need a UPC barcode?

Getting a UPC is a milestone. It’s usually the point where a business moves from selling direct into retail or wholesale channels that need a standard product identifier.

Not everyone needs one, so it’s worth being clear about the line.

If you’re selling directly to customers, whether that’s at markets, through your own store, or on Etsy, you almost certainly don’t need a UPC. Those channels don’t require one.

You’ll need a barcode when:

  • You’re selling to retailers who scan at the till. Boutiques, gift shops, grocers and chains run scan-based point of sale, and a product without a barcode is a product their system can’t ring up. If you want shelf space, you need a code they can scan.
  • You’re listing on Amazon, Walmart Marketplace, or a similar large platform that requires a product identifier to match your listing to their catalogue. These are the channels that validate against GS1, so this is where a licensed code stops being optional.
  • You’re working with a third-party logistics provider whose warehouse runs on scanning. Their receiving process needs something to scan on arrival.

Wholesale marketplaces are a maybe rather than a must. Faire, for instance, doesn’t force sellers to supply UPCs, though some brands add them anyway because their stockists scan at the till. If you’re heading that way, our guide to selling on Faire covers how the channel works. The general principle holds: the requirement comes from wherever the product is eventually scanned, not from the marketplace in the middle.

If you’re just trying to get your own stock under control, barcodes aren’t the answer, and a GS1 licence definitely isn’t. Good inventory software tracks products by name and SKU, which is faster to set up and more useful day to day for a small-batch operation. If you don’t have a numbering convention yet, our free SKU generator will build you a consistent one in a couple of minutes.

What happens after you get your UPC codes

Once you’ve got codes assigned, the next job is making sure your systems can actually use them. And here’s where a lot of businesses discover the barcode was the easy part.

A UPC identifies a product. It doesn’t tell you which production run a particular unit came from. Wholesale buyers increasingly want both, especially for food, cosmetics, supplements, and anything with a shelf life or a use-by date.

That’s the job lot numbers do. Assigning a lot number to each production run means any unit in the field can be traced back to the batch it was made in, the specific materials that went into it, and the date it was manufactured. It’s the level of traceability that retail buyers and regulators expect, and it turns a recall from a catastrophe into a defined list of affected units.

The practical setup, once you’re past a spreadsheet: your product record holds the SKU and the UPC, your production records hold the lot numbers and the materials consumed, and your costing rolls up from the materials you actually bought. Then the barcode on the box is a genuine pointer into something worth pointing at.

Frequently Asked Questions

What is a UPC barcode and what is it used for?

A UPC barcode (Universal Product Code) is a 12-digit identifier used to uniquely track and manage products in retail environments. The barcode has two halves that carry the same information: machine-readable bars plus the human-readable digits printed underneath. Retailers scan UPCs at checkout and at inventory checkpoints to identify a product, match it to their own database record, and process the sale. UPC-A (12 digits) is the standard format in North America.

How do I generate a UPC barcode for free?

Generating the barcode image is free. Enter your 12-digit number into an online tool such as Barcode Tec-IT or Shopify's free barcode generator, set the format to UPC-A, and download a print-ready file. In Excel, install an EAN-13 barcode font (Libre Barcode EAN13 Text from Google Fonts works), type your number into a cell, and apply the font. Avoid Code 39 and Code 128 fonts for retail packaging: they produce a valid barcode in a different symbology that retail point-of-sale systems will not read as a UPC. What isn't free is the number itself, if the product is going to a retailer that validates codes against GS1.

Do I need to register my UPC barcode with GS1?

It depends entirely on where the product is sold. Selling direct through your own store, at markets, or on Etsy, you don't need a UPC at all. Selling through Amazon, Walmart, or a chain retailer, you need a code licensed to you by GS1, because those platforms verify barcodes against GS1's global database and reject codes that don't resolve to you as the brand owner. Invented codes and cheap resold codes both fail that check. GS1 is a federation of national organisations, so pricing varies by country: in the US, as at September 2026, a single GTIN is a one-time $30 with no renewal, and a Company Prefix covering 10 products is $250 up front plus $50 a year.

What is the difference between a UPC barcode and an EAN barcode?

UPC barcodes carry 12 digits and dominate North American retail. EAN barcodes (European Article Numbers) carry 13 and are the standard in Europe and most of the rest of the world. A UPC-A is effectively an EAN-13 with a leading zero, so EAN scanners read UPCs without any trouble, while older UPC-only scanners can't always handle a full EAN. If you sell internationally, check what your retail partners scan before committing to a format.

Do I need a UPC barcode to sell on Etsy or Shopify?

No. Neither Etsy nor Shopify makes a UPC mandatory to list and sell a product. Both let you identify products by your own names, SKUs, or variant codes. UPCs only become necessary when you sell through channels that scan at the point of sale, or platforms like Amazon that require a product identifier to match your listing to their catalogue.

Can Stocksmith help me manage products that have UPC barcodes?

Stocksmith doesn't issue barcodes, and no software can: the number has to come from GS1. What it does is hold the operational record behind the code. Every product and variation carries an optional SKU field, so you can store your UPC there and search on it. Attached to that record you get stock on hand, raw material usage, the lot numbers from each production run, and true cost of goods sold rolled up from what you actually paid for materials. That's the data a retailer or an accountant is really asking about when they ask for the barcode, and it's the part a spreadsheet stops being able to hold together once you're running real production volume.

Nicole Pascoe Nicole Pascoe - Profile

Written by Nicole Pascoe

Nicole is the co-founder of Stocksmith, inventory and manufacturing software designed for small-batch product businesses. She has been working with, and writing articles for, small manufacturing businesses for the last 12 years. Her passion is to help product businesses scale with confidence — with accurate costs, controlled inventory, and systems their team can actually follow.