BaseToolbox LogoBaseToolbox
Blog

© 2025 BaseToolbox. All rights reserved.

Privacy PolicyAboutContact Us

Code 128 vs EAN-13 vs UPC: Which Barcode Should You Generate?

Published on June 25, 2026

Most barcode generator mistakes start before anyone clicks Download. The problem is not the artwork. It is choosing the wrong barcode type for the job.

If you are deciding between Code 128, EAN-13, UPC-A, Code 39, ITF-14, and MSI, use this simple rule:

  • Use Code 128 for internal labels, serial numbers, inventory IDs, and text.
  • Use EAN-13 or UPC-A for retail product codes when you already have a valid product number.
  • Use ITF-14 for packaging and cartons, not individual retail checkout labels.
  • Use Code 39 only when you need broad legacy scanner compatibility and simple uppercase data.

Quick Comparison

| Format | Best for | Input style | Good default? | |---|---|---|---| | Code 128 | Inventory, assets, serials, badges, forms | Text and numbers | Yes, for internal use | | EAN-13 | Retail products outside UPC-A workflows | Numeric product codes | Yes, if you have a valid GTIN | | UPC-A | North American retail products | Numeric product codes | Yes, if you have a valid UPC | | Code 39 | Older systems and simple labels | Uppercase letters, numbers, limited symbols | Sometimes | | ITF-14 | Cartons and shipping units | Numeric packaging codes | Packaging only | | MSI | Warehouse and inventory systems | Numeric IDs | System-specific |

Use Code 128 for Internal Labels

Code 128 is usually the safest choice for internal labels because it supports compact barcodes for many kinds of text and numbers. It works well for:

  • Asset tags
  • Warehouse shelf labels
  • Serial numbers
  • Order IDs
  • Employee badges
  • Test data
  • Form tracking numbers

If the barcode only needs to work inside your own workflow, Code 128 is often easier than forcing the value into a retail barcode format.

Use EAN-13 or UPC-A for Retail Products

EAN/UPC barcodes are the familiar product barcodes scanned at retail checkout. GS1 describes EAN/UPC as the longest-established and most widely used consumer product barcode family.

The key detail: a barcode generator can create the image, but it cannot give you an officially assigned product identity. If you plan to sell a product through retail, marketplaces, or distributors, get a valid GTIN or UPC through the relevant GS1 organization first. GS1 says it is the official provider of GS1 GTINs and EAN/UPC barcodes globally.

Use a generator after you already know the number you are allowed to encode.

Do Not Use a Random UPC for a Real Product

Random UPC/EAN numbers are fine for mockups and tests. They are not fine for real products.

Using a made-up retail barcode can cause problems later:

  • Another product may already use that number.
  • A marketplace may reject the listing.
  • Retail partners may fail validation.
  • Product data can be mismatched in lookup systems.

For a product concept, mockup, catalog draft, or internal demo, a random test value is okay. For a real product, use an assigned code.

When ITF-14 Makes Sense

ITF-14 is usually used for cartons, cases, and logistics packaging. It is not the format you put on an individual consumer product for normal checkout.

If you are making packaging labels for distribution, check the retailer or logistics partner requirements before printing. Barcode size, quiet zones, contrast, and placement can matter as much as the encoded number.

Which One Should You Pick?

Use this checklist:

  1. Is this for internal inventory or labels? Pick Code 128.
  2. Is this for a retail product sold at checkout? Use EAN-13 or UPC-A with an assigned product number.
  3. Is this for cartons or outer cases? Check whether ITF-14 or GS1-128 is required.
  4. Does your old scanner only support limited formats? Try Code 39.
  5. Are you testing software? Use Code 128 unless the software specifically needs EAN/UPC validation.

Quick Answer

For most non-retail labels, generate Code 128. For real retail products, generate EAN-13 or UPC-A only after you have a valid GS1 product number. A free barcode generator can create clean SVG or PNG artwork, but it does not replace official product code assignment.

Barcode checks that matter

Choose the right barcode format for inventory labels, product mockups, retail packaging, and internal IDs before you download a barcode SVG or PNG. Barcodes should be tested as labels, not only as graphics. Check the symbology, encoded value, quiet zone, contrast, and final print size. A barcode that looks sharp as SVG can still fail if it is resized badly or printed on a low-quality label.

Before using Generate a Barcode, decide whether the code is for retail, inventory, packaging mockups, or internal tracking. Retail identifiers may need official GS1 allocation, while internal labels can often use more flexible formats such as Code 128.

Ready to try it yourself?

Put what you have learned into practice with our free online tool.

Generate a Barcode