Home › Which barcode

Which barcode type to use: a practical guide

EAN, UPC, Code 128, Code 39, ITF-14 or QR: each format solves a different problem. This guide helps you pick the right one for what you are labelling and who will scan it.

  • Your data never leaves your browser
  • PDF in real millimetres
  • Automatic check digit
  • Avery models for A4 and Letter
Everything is processed in your browser
What kind of label do you want to make?

Pick a type and everything is set up for you (code, sheet size and design). You can change anything afterwards.

Code type

To make several different labels (for example, several products with their prices) on the same sheet.

Print at 100% · “Actual size”. Never “Fit to page”.

Several different labels on the same sheet? Add another label

Selected label:

Your product lists, prices and logos are never uploaded to any server. The PDF, PNG, SVG and ZIP are created on your own device. So you don't lose your work, a copy is kept only in this browser (you can delete it with “Clear all”).

The question that decides everything: who will scan the code?

Before choosing a format it helps to ask two questions: who will scan it and what does it need to contain. A code that scans at any shop checkout in the world is not the same as one that only has to work in your warehouse, and a code that holds a link for a phone has nothing to do with either of them.

The short rule: if the code leaves your business and another company has to understand it (a shop, a distributor, a marketplace), use the EAN or UPC standard. If it is for internal use, use Code 128. If a person will scan it with a phone, use QR. The other formats are special cases. Here is why.

Comparison at a glance

CodeWhat it holdsLengthTypical useBest thingWatch out for
UPC-A12 digits (11 + check)FixedProducts sold in the US and CanadaEvery checkout reads it; it equals an EAN-13 with a leading 0An “official” one is assigned by GS1
EAN-1313 digits (12 + check)FixedProducts sold elsewhere; books (ISBN)Scans at any shop checkoutSame as UPC-A
EAN-88 digits (7 + check)FixedVery small packagesTakes little widthIssued on a restricted basis
Code 128Letters, numbers and ASCII symbolsVariableInventory, warehouse, shipping, ordersVery compact and flexibleDoesn't identify a product in other shops
Code 39A-Z, 0-9 and - . space $ / + %VariableIndustrial and administrative settingsAlmost every scanner reads itMuch wider; capitals only
ITF-1414 digits (GTIN-14)FixedCartons and palletsThe bearer frame helps printing on cardboardNeeds large labels
QRText, links, wifi, dataUp to thousands of charactersPhones: product cards, catalogs, storageRead with the cameraDoesn't replace the UPC/EAN on a shop item

Choose by your case

You sell in shops, big retailers or marketplaces: UPC-A (or EAN-13)

If your product will go through another company's checkout, you need a standard product code: UPC-A in the US and Canada, EAN-13 in Europe and most of the rest of the world. Both belong to the same system (GTIN), and current checkouts read both. A UPC-A is, in practice, an EAN-13 with a zero in front.

What matters: for the number to be unique in the world, it has to have been assigned by GS1, the organization that runs the system. Codes are bought from the GS1 organization in your country (for example GS1 US in the United States or GS1 UK in the United Kingdom), which gives you your own company prefix. Marketplaces such as Amazon and many distributors usually require registered codes. A generator, this one included, only draws the bars: it cannot give you a number that is yours. We also explain this in the frequently asked questions.

You have your own shop and just want to check out faster: Code 128 or an internal-use EAN

If the product never leaves your shop, nothing needs to be registered. You have two reasonable options:

  • Code 128 with your own reference (for example OLIVE-500 or a serial number). Almost all counter scanners read it. Check that your point-of-sale software accepts alphanumeric codes.
  • An EAN with a 20-29 prefix, a range GS1 reserves for internal store use. It looks like a normal EAN, but it must not leave your premises because other shops may use the same number for something else.

Inventory, warehouse, assets and internal references: Code 128

It is the most practical format for internal use. It accepts letters, numbers and symbols, has variable length and is very compact: a reference such as INV-001000 or B-12-04 fits in little space. To number things well, use a meaningful prefix (SHF- for shelves, BOX- for boxes), leading zeros so lists sort properly, and never reuse a number. With the automatic series tool you can generate 1000 to 1200 at once.

Cartons and pallets: ITF-14

ITF-14 encodes a GTIN-14, the number that identifies a carton containing several units of the same product. It has a frame around it (the bearer bars) that helps print it directly on corrugated cardboard. It needs quite a lot of width: these are large labels. For logistics labels with more information (batch, expiry date, pallet number), the usual standard is GS-128, an application of Code 128; if that is your case, ask your customer or carrier which format they require.

Shipping and orders: Code 128 (and QR for links)

Tracking and order numbers are usually alphanumeric and of variable length, so Code 128 is the usual choice. If you want the recipient to scan something with a phone (a tracking page, a returns form), add a QR. Shipping labels have their own guide.

Links, wifi and product cards: QR

A QR code is two-dimensional: it holds far more information in little space and is read with a phone camera, with no special scanner. It can contain a link, access to a wifi network, a phone number, an email or free text; in its largest version it reaches about 4,000 alphanumeric characters. In exchange, it needs a minimum size (about 20 mm on a side as a rule of thumb) and it doesn't replace the UPC or EAN on a shop item.

Books: EAN-13 with the ISBN

A book's ISBN is printed as an EAN-13 whose prefix is 978 or 979. If you enter a number that starts that way, the tool tells you it is in the books range.

Legacy systems: Code 39

Code 39 is older and takes much more width than Code 128 for the same content, besides accepting only capitals, numbers and a few symbols. Use it only if your scanner, your software or your customer requires it, which still happens in industrial and administrative settings.

Four questions to decide in a minute

  1. Is it going to leave my business? If another company reads it, you need registered UPC or EAN codes. If not, use Code 128.
  2. Does it contain letters? UPC, EAN and ITF-14 are numeric only. If you need letters or symbols, Code 128 (or Code 39 if you are forced to).
  3. Who reads it? A checkout or warehouse scanner wants a linear code. A phone is happy with a QR.
  4. How much space do I have? A UPC-A or EAN-13 needs about 37 mm of width with its margins; a short Code 128, quite a bit less; a QR, about 20 mm on a side. With very small labels, a short Code 128 or an EAN-8 is usually the best choice (see the minimum size guide).

Common mistakes when choosing

  • Using a made-up EAN to sell in other shops. The checkout will read it, but the number may match another product's. To sell outside your shop, register your codes.
  • Trying to encode letters in an EAN or UPC. It is not possible: they are numeric.
  • Choosing Code 39 “because it's the classic one”. It takes much more width and only accepts capitals.
  • Using a QR to check out at a shop till. Most still read UPC and EAN. GS1 is pushing for points of sale to also read 2D codes in the coming years, but today the checkout standard is still the linear one.
  • Choosing a format that doesn't fit. An ITF-14 on a 40 mm label won't scan. The tool warns you when the bars come out too thin or too short.

How to try your choice with GeneraEtiquetas

The tool above is set up with a UPC-A. Change the code type in step 1 and you will see instantly how it looks on your label, whether the code is valid (it calculates the check digit for you) and whether it is large enough to scan. Numeric formats warn you about length or digit errors; Code 128 and Code 39 warn you about the characters they don't accept. And if you will make many, you can paste the list from Excel and generate the whole sheet at once.

If you wonder how we check all this, we explain it in How we verify measurements and codes.

Frequently asked questions

Can I use the same barcode to sell in shops and for my inventory?

You can, but it is not recommended. To sell in shops you need a UPC or EAN registered with GS1; for internal inventory a Code 128 with your own references is more convenient, accepts letters and doesn't depend on any registry.

What is the difference between EAN-13 and UPC-A?

UPC-A has 12 digits and is used in the US and Canada; EAN-13 has 13 and is used in the rest of the world. They belong to the same system and current checkouts read both. A UPC-A equals an EAN-13 with a zero in front.

Why does my label need to be so wide for a UPC or EAN?

Because a UPC-A or EAN-13 has a fixed width of 95 modules plus the blank margins the scanner needs. With the nominal thin bar (0.33 mm) that is about 37 mm in total. It can be reduced, but below 80% the code stops being reliable.

When is a QR better than a linear barcode?

When the code will be read by a person with a phone or when you need to store a lot of content (a link, wifi details, some text). For a shop checkout or a warehouse scanner, a linear code is still the safe option.

Can I generate a free barcode that I can sell in shops?

You can generate the drawing of the bars for free, and it will scan at any checkout. But the number is unique in the world only if GS1 assigned it to you. For internal use you don't need that; to sell in shops or on marketplaces, you do.

More guides

Most-used sheets: Avery 3474 · Avery L7162 · Avery 5162 / 8162 · Avery 3422 · Avery L7165 · Avery 5160 / 8160