UPC code 4
How to generate UPC code ?

How to generate UPC code ?


Running short of time? Get PDF of the blog in your mail.

Play Now

UPC (Universal product codes) are 12 digit numbers used to mark the products of a company. These contain the information such as size, color, manufacturer information and discount etc of a product from a particular company.

Benefits of UPC Code

  • Discounts can be applied quickly
  • The billing is lightning fast
  • Two like products can be distinguished.
  • Helpful in B2B product transactions

Moreover, all the marketplaces – Amazon, Walmart, Jet, Rakuten etc. – require UPC codes as a product identifier. On the basis of these UPCs, the two similar products are differentiated that they belong to different sellers.

UPC distinguish between two similar products from different sellers in the marketplace.

Furthermore, to prevent merging of two products sellers purchase UPCs so their products are displayed uniquely on the marketplaces’ website.


Step 1:

To generate UPC codes for your product first apply for the membership to GS1 and get the prefix from GS1. PREFIX is the string of digits that identifies your company as the manufacturer of the product during the entire product cycle.

The no of digits in Prefix varies between 6 – 10 characters and depends on upon the number of products offered by the company.

For example, if a company offers only single product then prefix can have 9 characters whereas, the company offering a large number of products have prefix depending upon the number of products.

upc code 3Image Source: GS1 -US INFO

Step 2:

After getting the PREFIX, you can allot a unique product number to the each product. A company that has 6 characters PREFIX can have a string of 5 digits to assign product code against each product whereas a company which has 9 characters can have 2 characters for labeling the products.

The PREFIX + PRODUCT digit must be 11. The 12th digit is added after mathematical calculation based off of previous 11 digits.

Below is the example for labeling product, the PREFIX for the company is 012345.

upc code 1

Image Source: GS1 -US INFO

Now, the UPC for these products will be:

upc code 2

Note: However, the 12th digit is automatically calculated but to understand how this works. Read the example:

Consider the No: 5 1234567890.

It has eleven digits, 12th digit has to be calculated.

1. Now first add all the numbers lying in odd positions.

5 + 2 + 4 + 6 + 8 + 0 = 25

2. Now, add all the numbers lying on even positions

1 + 3 + 5 + 7 + 9 = 25

3. Add the two numbers

25 + 25 = 50

Now that this number is divisible by 10, therefore, the last digit would be 0.

So the UPC code will be 5 1234567890 0

Had the sum of two numbers would have been 49. Then the number upon whose addition the resultant would become the multiple of 10 would be the last digit.

49 + 1 = 50


Therefore in this case 1 is the 12th digit


Now that you’ve got your UPC codes, you can use them.

Either get them digitally printed on the product packaging, if it hasn’t been done yet or use the printed barcodes and apply them to your products and the products are ready for purchase or to be shipped.


To validate UPC code there are several online services that check the validation in the real-time. You may refer any of these.

For example: www.hipaaspace.com

Getting UPC’s printed on your products prevent them from merging with other products which are absolutely vital for the successfully selling the products.


Don’t fall trap to Cheap barcodes, most certainly most of them would be INVALID.


Should You further doubts, comment

Thanks for your interest

Team Cedcommerce

About The Author

  1. Avatar for CedCommerce
    terry schneider

    I have a upc manufacturer id number and 100000 product codes from 1989 for sale how much is it worth Terry

    • Hi Terry,

      Sellers do upload vintage items on Walmart, however, we're not sure about the worth of your product codes. At CedCommerce we help sellers onboard Walmart (and other marketplaces), upload their inventory, manage orders, and sell them. So I'm not sure how we can help you.
      However, if you need help onboarding Walmart, please drop a comment and we'll surely help you out.

      Have a nice day

Leave a Reply