To make a barcode, choose the barcode type you need, enter the number or text it should hold into a barcode generator, and save the image to print. For your own stock, labels or asset tags, any free barcode generator works and Code 128 is the usual choice. For a product sold in shops or on marketplaces, first license a GTIN (UPC or EAN number) from GS1, then draw that number as a UPC-A or EAN-13 barcode.
A barcode generator only draws stripes for the data you give it. The hard part is choosing the right type and, for retail products, the right number. This guide covers both cases, the steps on a phone or computer, how to size and print a barcode so it scans, and the mistakes that make a new barcode fail at the checkout.
What does a barcode generator do?
A barcode generator turns a number or a piece of text into a barcode image, following the rules of one barcode type (symbology), such as UPC-A, EAN-13 or Code 128. It does not register anything or give your product an identity: the barcode holds exactly the characters you typed. That is why a barcode scanner reading your label shows those same characters, and why a barcode doesn't contain the price unless a store's own system links the number to one.
So the first question is not which generator to use, but what the barcode is for.
Which barcode type should you make?
Use UPC-A or EAN-13 for products sold in retail, Code 128 for internal labels with letters and numbers, and a QR code when the code should open a link or hold longer text.
| Barcode type | Holds | Use it for |
|---|---|---|
| UPC-A | A 12-digit GTIN-12 | Retail products, mainly in the US and Canada. Needs a GS1 number |
| EAN-13 | A 13-digit GTIN-13 (also the barcode on books, holding the ISBN) | Retail products outside North America; books. Needs a GS1 number or ISBN |
| Code 128 | Letters, digits and symbols | Inventory, SKUs, bin and shelf labels, asset tags, order numbers |
| Code 39 | Upper-case letters, digits and a few symbols | Older inventory and ID systems that already use it |
| QR code | Links, text, Wi-Fi details, contact cards | Anything a phone camera should open; see how to create a free QR code |
GS1 US's page on what a GTIN is sets the retail rules: a GTIN-12 is 12 digits, is synonymous with UPC and is the only GTIN type that can be encoded in a UPC-A barcode; a GTIN-13 is 13 digits, is synonymous with EAN and is the only type that goes in an EAN-13 barcode. A GTIN-14 is for cases and cartons and is not intended for the checkout. If you are unsure which format your system expects, ask the retailer, marketplace or software that will read the barcode.
How do you make a barcode for your own inventory?
For barcodes that only your own business will scan, pick any value you like, such as your SKU or an asset number, and generate it as a Code 128 barcode with a free generator. No registration or fee is needed, because no one outside your system has to recognise the number.
- Decide the numbering. Use the SKU or ID your inventory software or spreadsheet already has. Keep every value unique and short; shorter values make a narrower barcode.
- Open a barcode generator on your phone or computer and choose Code 128 (or the type your scanner software asks for).
- Enter the value exactly as it is stored in your records, including any letters or dashes.
- Save the image as PNG or SVG and add it to your label layout. Many generators can also create a series of codes at once.
- Test-scan the printed label with the scanner or phone you will actually use, and check that the result matches the record.
We suggest not putting a made-up 12- or 13-digit number into a UPC-A or EAN-13 barcode for internal use: those formats are read as product identifiers, and a random number may already belong to another company's product.
How do you make a barcode for a product you sell?
To make a barcode for a retail product, first get a GTIN from GS1, assign one GTIN to each product variation, then generate that number as a UPC-A or EAN-13 barcode and print it on the packaging. GS1 is the non-profit standards body that licenses barcode numbers; GS1 US covers the United States.
- Count your products. GS1 US's get-started guide says each variation of each product you sell requires a unique barcode, so a T-shirt in three sizes and two colors needs six numbers.
- License the numbers. Buy a single GTIN for one or a few products, or a GS1 Company Prefix if you need many. The same guide lists a single GS1 US GTIN at $30 with no annual renewal fee.
- Assign a number to each product and record it with the product's name, size and variant.
- Create the barcode image. GS1 US includes its own tool for this (Data Hub), or you can enter the full number into any barcode generator that supports UPC-A or EAN-13.
- Check the last digit. The last digit is a check digit calculated from all the others. GS1 US's check digit calculator confirms it; most generators add or verify it automatically.
- Place, print and test it following the size rules below.
Avoid cheap barcode numbers from resellers. GS1 US warns in its GTIN FAQ that GTINs sourced from unauthorized third parties may already be associated with another company or product, and the registered owner of a resold number is not you. To see who a number is registered to, use a barcode lookup such as Verified by GS1.
How do you make a barcode on iPhone?
On iPhone and iPad, a barcode maker app creates the barcode on the device: choose a barcode format, type the number or text, then save or share the image. The free QR Code Scanner * Barcode Reader app (iOS 16 or later, also on Mac with Apple silicon) is a QR generator and barcode maker in one, with no ads and no registration:
- Open the code creator in QR Code Scanner * Barcode Reader.
- Choose the barcode format that matches your data from the formats the creator lists: a UPC or EAN type for a GS1 product number, a general-purpose type for your own labels.
- Enter the data exactly as it should be read back.
- Save or share the barcode as an image for your label or packaging artwork.
- Scan it back with the same app to confirm it reads the data you entered.
Creating codes works offline, and the app supports bulk creation when you need a series of codes. Every feature is free to use up to a usage limit; an optional Premium in-app purchase removes the limits. To check a barcode you printed, see how to scan a barcode on iPhone.
What size should a printed barcode be?
A UPC-A barcode at its standard 100% size is 1.644 inches wide by 1.153 inches tall according to GS1 US, and it can be scaled up or down only within GS1's limits, keeping its proportions. GS1 US's help page on working with a UPC-A barcode gives these rules:
- Keep the proportions. UPC-A barcodes have a fixed relationship between height and width, so resize both together; GS1 lists a minimum width of 1.174 inches and a maximum of 2.936 inches.
- Don't cut the height. Truncating the barcode (reducing its height) is not recommended.
- Leave the quiet zone. The blank space left and right of the bars must be at least nine times the width of the narrowest bar; no space is required above or below.
- Print it flat. Place the barcode on a flat surface, don't wrap it around a curve or corner, and don't let anything cover it.
For internal Code 128 labels there is no retail size rule, but the same habits help: a clear margin on both sides, bars that are not too thin for your printer, and a test scan of the real label.
Why won't my new barcode scan?
A newly made barcode usually fails because of low contrast, a missing quiet zone, a size that is too small, or a number the store's system doesn't know. Check these in order:
- Colors. We suggest dark (ideally black) bars on a white or very light background. Scanners use red light, so red, orange or light-colored bars can disappear.
- Margins. Text, borders or artwork touching the bars removes the quiet zone.
- Size and print quality. A shrunk barcode or a low-resolution image prints blurred bars. Export as SVG or a high-resolution PNG and don't stretch it in only one direction.
- The wrong format. A 12-digit number drawn as Code 128 is not a UPC, even though it shows the same digits. Point-of-sale scanners expect UPC-A or EAN-13 on products.
- Scans, but nothing comes up. The barcode is fine but the number isn't in that store's or marketplace's database. The retailer has to add your GTIN to its system, usually when you list the product with it.
Make and scan barcodes on your iPhone
Create barcodes and custom QR codes, then scan them back to check them. Free, no ads, no sign-up, works offline.
Frequently asked questions
How do I make a barcode for free?
Open a free barcode generator, choose the barcode type, type the number or text it should hold and save the image. For your own labels, Code 128 with your SKU or ID is free and needs no registration; for a retail product the generator is free, but the GTIN number itself has to be licensed from GS1.
Can I make my own barcode for my products?
Yes, but for products sold in stores or on marketplaces the number inside the barcode has to be a GTIN licensed from GS1, so the barcode identifies your product and not someone else's. For items only your business scans, such as stock or asset tags, you can make your own number and print it as a Code 128 barcode.
Do I need to buy a barcode from GS1?
You need a GS1 number (GTIN) to sell through retailers and most marketplaces, but you don't need to buy the barcode image: once you have the number, any barcode generator can draw it. GS1 US sells a single GTIN or a Company Prefix for larger product ranges, and warns that numbers from unauthorized third parties may already belong to another company.
What is the best barcode type for inventory?
Code 128 is the usual choice for inventory because it holds letters, digits and symbols in a compact barcode, so it can store an SKU or asset number exactly as it appears in your records. UPC-A and EAN-13 are meant for retail product numbers from GS1.
How do I make a barcode on my iPhone?
Use a barcode maker app such as QR Code Scanner * Barcode Reader: open its code creator, choose the barcode format, type the number or text and save or share the image. Scan the saved barcode with the app afterwards to check that it reads back what you entered.