Skip to the content
UPC Generator

How to make a barcode

Making a barcode is two jobs, and GS1 says the number must exist before any software turns it into bars. The picture is the quick part. For your own stock, any number you choose will do. For a product sold in a store, the number is licensed through GS1 and the bars are a UPC-A or an EAN-13.

By the UPC Generator team. Written from GS1's 10 steps to barcode your product and its General Specifications. The GS1 US, Walmart and Google product identifier pages, Microsoft's field code pages, the Libre Barcode manuals, and Canva's and Avery's help pages fill in the routes. Nothing was run in Excel, Word, Canva or a label program. Last updated 4 November 2026. How UPC Generator pages are made.

Decide what the barcode is for

Three jobs cover almost every barcode anyone makes, and each one wants a different number.

For your own stock, assets, bins or tickets, any number or text you choose will do. Code 128 holds letters and digits, and Code 39 is the older format some label systems ask for. No license and no registration are involved. The SKU generator builds a whole list of codes from your product options.

For a product sold in a store or on a marketplace, the number is a GTIN licensed through GS1. The bars are a UPC-A in North America or an EAN-13 elsewhere. GS1 says that symbol is scanned by point-of-sale systems all over the world. Walmart checks every product ID against the GS1 database and removes listings with invalid ones. Google says never to guess or make up a GTIN. GS1 US says that for most retailers a UPC is a requirement, and that is GS1's wording rather than a law.

For a book, the number is an ISBN, which is already an EAN-13. ISBN barcode with a price covers the price add-on beside it. For a link that phones open, a QR code is the right picture, and the barcode generator draws one.

The number comes first

A UPC-A is 12 digits. GS1 US explains them with its example 6 14141 99999 6. The company prefix is 6 to 10 digits that GS1 assigns. The item reference is 1 to 5 digits that the company assigns. One check digit is worked out from the other 11. An EAN-13 is the same idea in 13 digits, and the shortest retail symbol holds 8.

The prefix is a license. GS1's rules say a prefix or a single key may not be sold, leased or given to another company. GS1 US says a retailer may look a UPC up and find another company's name, or no record. The seller then risks rejection or the cost of relabeling. Each variant of a product gets its own number. Google asks for a separate GTIN for each color or size. GS1 US gives the example of a small T-shirt in three colors, which needs three barcodes.

GS1 US sells single numbers and prefixes. On its price list of 2 November 2026, the first payment runs from $30 for one number, with no renewal, up to $10,500 for a prefix of 100,000 numbers. The renewals run from $0 to $2,100 a year. GS1 US says it can change those prices. A single GS1 US GTIN is not available for pharmaceuticals, variable measure products, mixed cases or coupons. How to get a UPC code walks through the purchase and what each marketplace asks for.

The check digit is the one part of the number nobody chooses. GS1's sum multiplies the digits by 3 and 1 in turn, adds them, and takes the gap to the next multiple of ten. The check digit tool shows the steps for any number, and every generator here adds the digit for you.

GS1 US puts it plainly: an online generator makes the picture easily, and the data inside it still has to be structured correctly to be tracked through a supply chain. A generator draws whatever digits you give it. The license is a separate purchase.

Pick a route

Six ways to turn a number into a barcode, and what each one cannot do
Route What you need What it cannot do
The barcode generator or a format's own page A number or text, typed in Issue or license a number; it draws what you give it
Excel A Code 39 font with asterisks, or an encoder for Code 128, or a picture you insert Excel has no barcode feature; a General cell drops a leading zero and keeps 15 digits
Word The DisplayBarcode field, on Word for Windows Word for Mac and the web differ; the field draws 10 types
Canva The barcode app from its marketplace, nine formats, or an uploaded picture Nothing about GS1 numbers; QR codes are the only kind Canva draws itself
Label software such as Avery's A spreadsheet or a sequential number, mapped to the barcode field Checking that a number is yours
GS1 US Data Hub A number you bought there Drawing any number you did not license

A font is the simplest route, and it only works for Code 39, because that format needs no computed check character. Code 128 fonts need an encoder that picks the shortest code set and works out the check symbol before the stop. Three guides take each route step by step from the makers' documents: Excel, Word and Canva.

Free tools come with terms, and they differ. One free online generator states that its output is for non-commercial and private use only, with commercial use needing written approval. Read the terms of any tool before a product run. The files from the generators here carry no such limit.

Make it in a minute

On the barcode generator, pick the format, or let the job menu pick it for you. Type the digits or text. For a UPC-A, 11 digits are enough and the check digit is added. With 12 digits the last one is checked, and a wrong one is refused with the right one offered. Download the SVG for a designer or a printer, the PNG for a label program, or the PDF for a sheet.

Size and clear space

GS1 sets the retail sizes by the width of the narrowest bar, the X dimension. For a UPC-A or an EAN-13 it runs from 0.264 mm to 0.660 mm, about 10 to 26 mil. GS1 calls that 80 to 200 percent, with 0.330 mm (13 mil) as the target. At the target an EAN-13 with its clear space is 1.468 inches wide (37.29 mm), and its bars are 0.9 inches tall (22.85 mm). Across the whole range the symbol with clear space runs from about 1.17 to 2.94 inches wide.

Width and height move together. GS1 says that when one changes, the other changes by the same proportion. Cutting the bars shorter, which it calls truncation, is not permitted because it hurts scan rates. GS1's text gives two minimum heights for the smallest size: 18.28 mm in its size table and 20.7 mm in its design rules. It does not reconcile them. Use the height the generator gives and do not cut it.

GS1 calls the clear space a frequent source of scanning problems. A UPC-A needs 9 modules of empty space on each side, and an EAN-13 needs 11 on the left and 7 on the right. Bars are dark on a light background, and red bars are out because most scanners use red light. The digits stay under the bars in a clear font. GS1 says they are the backup when the bars are damaged or poorly printed, and a person keys them in.

Print at 100 percent. Canva's own help page says to set the print scale to 100 percent or actual size, never fit to page. That rule holds for every program. A barcode that fits the page has changed size.

An office printer makes this harder than a thermal label printer does, GS1 says, because its dots are bigger than a pixel. Bars come out wider and spaces narrower unless the software allows for it. Thermal and laser label printers work at 203 and 300 dots per inch. At 203 dpi, 2 dots a bar gives 0.250 mm, about 76 percent, and 3 dots gives 0.375 mm, about 114 percent. At 300 dpi, 4 dots gives 0.339 mm, within 3 percent of the target. GS1's own table, written for 304.8 dots per inch, gives 0.333 mm. The PNG from the generators here rounds the bars to whole dots at the resolution you pick. The readout under the barcode says what that did to the size.

Pre-printed labels and printing straight onto packaging are the other two routes GS1 lists. A static number can go through conventional printing on the packaging. A number that changes with each item needs digital printing on site.

Test before the batch

Scan a printed copy with a real scanner, not the one on the screen. Canva, Avery and OnlineLabels all say to test. GS1 names the clear space as the usual fault: a printed box around the symbol, or a symbol too close to the label edge. OnlineLabels adds the others: too small, stretched, low in contrast, or on a curved surface.

A barcode verifier grades print quality the way the standard does. GS1 asks for at least a grade of 1.5, a C, on every retail symbol, and advises 2.5, a B, at the time of printing. A scan with a phone or an ordinary scanner tells you whether it read, not what grade it would earn. For a product that will be scanned a million times, a verifier report from the printer is worth asking for.

Mistakes that cost a reprint

  • A made-up number on a product sold through a retailer. Walmart removes the listing, and GS1 US warns of the cost of relabeling.
  • A Code 128 font with the number typed straight in. Without an encoder there is no check symbol and no start or stop, so the bars read as nothing.
  • A UPC that lost its leading zero in a General cell in Excel. Format the column as text first.
  • Fit to page. The size changes and the bars with it.
  • A barcode shrunk to fit a gap in the layout. Cut the layout, not the symbol.
  • A barcode copied from another product. It names that product, not yours.

Placement, the GS1 family and the scanner's side

The UPC generator draws the retail symbol with the GS1 sizes built in. GS1's placement rules are in where the UPC code is on a product. What a GS1 barcode is sets out the family and who issues the numbers. How barcodes work follows the scanner from the red light to the digits.

More about making a barcode

Can I make a barcode for free?

Yes, the picture. The barcode generator draws any of its 10 formats as SVG, PNG or PDF with no sign-up. The number is a separate matter. For goods sold through a retailer it is licensed through GS1. GS1 US says the data in a barcode must be structured correctly to be tracked through a supply chain, and an online generator only draws what it is given.

Do I need a different barcode for each size and color?

Yes, once the product is sold. Google says each product and each variant, such as a different color or size, has its own GTIN. GS1 US gives the example of a small T-shirt in three colors, which needs three barcodes.

Can I print barcodes on a normal office printer?

You can, and GS1 says it is harder to get good bars from one than from a thermal label printer. An office printer's dot is larger than a pixel, so bars print wider and spaces narrower unless the software corrects for it. Print at 100 percent, scan a test copy, and keep the clear space.

How do I make many barcodes at once?

Word's MergeBarcode field builds one per row of a spreadsheet, and Avery's label software takes a spreadsheet or a sequential number. The barcode generator draws one at a time. The SKU generator builds a whole list of stock codes and draws any one of them.

Which barcode type should I pick?

By what will read it. A store checkout reads UPC-A or EAN-13, and GS1 says that symbol is scanned by point-of-sale systems all over the world. Your own scanners read Code 128 or Code 39 with any text. A phone camera reads a QR code best.

18 source documents

  1. GS1: 10 steps to barcode your product, fetched 2 November 2026
  2. GS1: Ready to sell? Start with a GS1 barcode, fetched 2 November 2026
  3. GS1: General Specifications, Release 26.0, sections 1.5, 5.2, 5.12 and 7.9, fetched 2 November 2026
  4. GS1 US: Guide to UPCs, fetched 2 November 2026
  5. GS1 US: What is a Company Prefix, fetched 2 November 2026
  6. GS1 US: Create a barcode, with the fee table, fetched 2 November 2026
  7. GS1 US: What is a barcode, fetched 2 November 2026
  8. Walmart Marketplace: Choose a product identifier, fetched 2 November 2026
  9. Google: Merchant Center, GTIN, fetched 2 November 2026
  10. Microsoft: Add barcodes to labels, fetched 2 November 2026
  11. Microsoft: Field codes: DisplayBarcode field, fetched 2 November 2026
  12. Microsoft: Keeping leading zeros and large numbers, fetched 2 November 2026
  13. Libre Barcode: Code 39 and Code 128 font manuals, fetched 2 November 2026
  14. Canva: Free online barcode generator, fetched 2 November 2026, archive copy of 16 January 2026
  15. Canva: Print designs using a personal printer, fetched 2 November 2026, archive copy of 17 January 2026
  16. Avery: Barcode generator and label software, fetched 2 November 2026
  17. TEC-IT: Online barcode generator, terms of use, fetched 2 November 2026
  18. OnlineLabels: Barcode generator, questions and answers, fetched 2 November 2026, archive copy of 5 September 2026