Start with the question that decides it
Ask where the barcode will be scanned. If it will pass through a shop checkout, you need EAN-13 or UPC-A. If it only stays inside your business, such as stock bins, asset tags or file folders, you are free to choose, and Code 128 is the usual answer. If it must carry a web link or a lot of text, use a QR code.
The rest of this guide goes through each type, in the order most people meet them.
Code 128: the general-purpose choice
Code 128 holds letters, digits and symbols in a compact line. It is common in shipping labels, inventory and internal tracking. It has a built-in check character, so scanners catch misreads.
Use it for your own SKUs, order numbers and asset IDs. A value like INV-2026-0042 works. It cannot be used for retail products that must be sold through other companies' shops, because those shops expect EAN or UPC.
EAN-13 and UPC-A: retail product codes
EAN-13 holds 13 digits and is the standard on products sold in most of the world, including India. UPC-A holds 12 digits and is used mainly in the United States and Canada. A UPC-A is in effect an EAN-13 with a leading zero.
The last digit is a check digit, calculated from the others. The generator adds it for you if you leave it off, and validates it if you type it.
The important point: the image is the easy part. The numbers must come from GS1, the organisation that licenses them, and in India that is GS1 India. A generator only draws the bars. If you invent a number, it may collide with a real product at a retailer's system. For testing or internal shelf use, any number works. For selling through shops or marketplaces, get licensed numbers first.
Books use the same symbol. An ISBN is the book number. Printed as a barcode, it is an EAN-13 that starts with 978 or 979, sometimes called the Bookland barcode. You can enter an ISBN-10 or an ISBN-13 and the generator converts it. Check the number on the copyright page against the barcode before you send files to the press. The ISBN itself is assigned to the publisher by the national ISBN agency, not created by a tool.
Code 39 and ITF-14: older systems and cartons
Code 39 holds digits, capital letters and a few symbols. It is older and wider than Code 128, which makes it bulky, but it needs no check digit and works with almost every scanner. You see it on ID badges, library items, defence and automotive parts. Choose it when a system you must feed already asks for it.
ITF-14 holds 14 digits and is printed on outer cartons that hold several retail units. It uses wide bars and a frame, so it survives printing on rough corrugated board. It carries the product number plus a packaging indicator. Use it for cases and pallets in distribution, not on the single item a customer buys.
QR code: when you need more than a number
A QR code is two-dimensional. It stores web links, WiFi details, payment requests and contact cards, and it is read by any phone camera. It also holds far more than a line barcode. It is not accepted by most retail checkout lines for product identification, so do not replace an EAN with a QR on a shop product. Use the QR code generator for the link or text, and put both a QR and an EAN on a pack if you need both jobs.
Print and placement basics
Every line barcode needs a blank margin on its left and right, often called a quiet zone. Do not crop it, and do not place the barcode across a fold, seam or curved edge where the bars distort. Keep bar colour dark on a light background; red or orange bars often read as blank to a red-light scanner.
Do not squash the height to fit a small label. A taller barcode is easier to hit with a handheld scanner, because the beam can cross the bars at a slight angle and still read them. If you must shrink, reduce the width and height together and test a printed sample on the scanner you will actually use.
Also show the human-readable number under the bars. When a bar is scratched or a scanner fails, a person can type the digits in, which saves the sale or the stock count.
Quick chooser
| Your need | Use |
|---|---|
| Product sold in shops, India or worldwide | EAN-13 with GS1 numbers |
| Product sold in the US or Canada | UPC-A with GS1 numbers |
| Printed book | ISBN as EAN-13 |
| Internal stock, assets, shipping labels | Code 128 |
| Older system that asks for it | Code 39 |
| Outer carton or case | ITF-14 |
| Link, WiFi, payment, contact | QR code |
Whatever you choose, scan a printed sample with the scanner before printing a run. If you need hundreds of labels, the bulk barcode generator makes them from a list.
Questions people ask
Can I make my own EAN-13 numbers?
You can draw any valid number, but numbers for products sold through shops must be licensed from GS1. For internal use or testing, any number is fine.
What is the difference between EAN-13 and UPC-A?
EAN-13 has 13 digits and is used worldwide. UPC-A has 12 digits and is used mainly in the United States and Canada. Most modern scanners read both.
Why does my barcode not scan at a shop?
Common causes are bars printed too small, low contrast, or missing white space on the left and right of the code. Print a sample and test it before the full run.
Is Code 128 better than Code 39?
For most new uses, yes. Code 128 is more compact and has a built-in check. Code 39 is mainly for systems that already require it.
Can a QR code replace a barcode on my product?
Not at a retail checkout, which expects EAN or UPC. A QR code is useful in addition, for linking to instructions or a website.
Updated 2026-10-14 · Written by the CodingMarble team