Development 9 min read

Barcode Types Explained: UPC, EAN-13, Code 128 & More

Barcode types explained: UPC-A, EAN-13, Code 128, Code 39, Interleaved 2 of 5 and QR codes. Learn how each format works, when to use it, and how to create one free.

What Is a Barcode?

A barcode is a machine-readable pattern that encodes data — usually a product number — so a scanner can read it instantly and accurately. Those familiar black-and-white stripes have quietly run global commerce for decades, appearing on everything from grocery items to shipping cartons and library books. But not all barcodes are the same: there are many barcode types, each designed for a specific job, and choosing the right one is the difference between a label that scans on the first try and one that gets rejected at the checkout.

This guide explains the most common types of barcodes — UPC, EAN-13, Code 128, Code 39, Interleaved 2 of 5, and QR codes — including how each works, where it is used, and how to pick the right format. When you are ready to create one, our free Barcode Generator supports every format below and downloads a print-ready PNG or SVG.

Free Barcode Generator Create UPC-A, EAN-13, Code 128, Code 39 & more — download PNG or SVG, no signup
Try It Free

How Do Barcodes Work? (1D vs 2D)

Barcodes fall into two broad families. 1D (linear) barcodes — the classic vertical stripes — encode data in the varying widths of bars and spaces, read left to right by a laser or camera scanner. They typically hold a short number, like a 12- or 13-digit product code. 2D barcodes, such as QR codes, store data in a grid of squares both horizontally and vertically, packing far more information (URLs, text, contact details) into a small space.

Most retail and inventory barcodes are 1D. The right choice depends on how much data you need to store, where the barcode will be scanned, and which standard your industry or marketplace requires.

The Main Barcode Types at a Glance

Type Encodes Best For
UPC-A12 digitsUS & Canada retail products
EAN-1313 digitsInternational retail products
EAN-88 digitsSmall retail packages
Code 128All ASCIIShipping, logistics, inventory
Code 39Letters + digitsIndustrial, defense, automotive
Interleaved 2 of 5Even-length digitsShipping cartons (ITF-14)
QR Code (2D)URLs, text, lots of dataMarketing, mobile, payments

UPC-A: The US Retail Standard

The UPC code (Universal Product Code, UPC-A) is the 12-digit barcode found on virtually every retail product in the United States and Canada. The first digits identify the manufacturer, the next identify the product, and the final digit is a check digit that validates the scan. If you sell physical goods in North America — or on marketplaces like Amazon and Walmart — a UPC is almost always required. Each UPC product code number is assigned through GS1 so it is globally unique to your brand.

EAN-13 and EAN-8: The Global Standard

EAN-13 (European Article Number) is the international equivalent of UPC-A, encoding 13 digits and used on retail products worldwide. In fact, UPC-A is just an EAN-13 with a leading zero, so the two are compatible and most scanners read both. For small items where space is tight — candy, cosmetics, cigarettes — the shorter 8-digit EAN-8 is used instead.

Books and magazines add a supplement to the main code. This is the format written as EAN-13 (5) or "EAN 13 5" — a standard 13-digit EAN printed next to a 5-digit EAN-5 add-on that encodes the price or issue number. It is exactly what you see on the back cover of most books alongside the ISBN.

Need a UPC or EAN-13 barcode? Enter your number and our generator calculates the check digit automatically
Generate One

Code 128: The Versatile Workhorse

Code 128 is the most flexible 1D barcode. It encodes all 128 ASCII characters — uppercase and lowercase letters, digits, and symbols — in a compact, high-density format, which is why it dominates shipping labels, warehouse inventory, and internal tracking. Unlike UPC or EAN, Code 128 has no fixed length, so you can encode order numbers, SKUs, or serial numbers of almost any size. If you just need a quick Code 128 sample to test a scanner or label template, it is the go-to choice.

Code 39: The Industrial Classic

Code 39 (also called Code 3 of 9) was one of the first alphanumeric barcodes and remains common in manufacturing, defense, and automotive industries. It encodes uppercase letters, digits, and a few symbols. A Code 39 barcode is bulkier and lower-density than Code 128, but it is extremely reliable and supported by virtually every scanner ever made, which keeps it in service on legacy systems and asset tags.

Interleaved 2 of 5 (ITF): Shipping & Cartons

Interleaved 2 of 5 is a compact numeric-only barcode that encodes digits in pairs, making it very space-efficient. Its fixed-length cousin, ITF-14, encodes 14 digits and is the standard for shipping cartons and cases because it prints and scans reliably on rough corrugated cardboard. If you package products into cases for distribution, ITF-14 is the format on the outer box.

Codabar, MSI & Pharmacode

A few specialist formats round out the 1D family. Codabar (sometimes spelled "codebar") is a self-checking numeric barcode long used by libraries, blood banks, and courier airbills. MSI Plessey appears on retail shelf labels for inventory control, and Pharmacode is a specialized code used to verify pharmaceutical packaging on the production line. You will rarely need these unless your industry specifically calls for them.

QR Codes: The 2D Alternative

When you need to store more than a product number — a website link, a menu, a Wi-Fi password, or payment details — a QR code is the answer. As a 2D barcode, it holds hundreds of characters and is designed to be scanned by any smartphone camera, which has made it the format of choice for marketing, restaurants, and mobile payments. If that is what you need, use our free QR Code Generator instead of a 1D barcode.

How to Choose the Right Barcode Type

Picking a format comes down to a few simple questions:

  • Selling retail products? Use UPC-A (US/Canada) or EAN-13 (international).
  • Small package? Use EAN-8.
  • Shipping, inventory, or internal tracking? Use Code 128 for maximum flexibility.
  • Legacy or industrial systems? Use Code 39.
  • Shipping cartons and cases? Use Interleaved 2 of 5 / ITF-14.
  • Storing a link or lots of data? Use a QR code.

How to Get and Create a Barcode

There are two separate things people mean by "getting a barcode": the number and the image. For products sold in retail, the underlying UPC or EAN number should be purchased from GS1, the official body that assigns globally unique codes — this prevents two products from sharing the same barcode. Once you have your number (or if you only need a barcode for internal use, testing, or a prototype), creating the scannable image is free and instant.

Just open our free Barcode Generator, choose your format, type your value, and download a print-ready PNG or SVG — no signup and no watermark. It supports every type covered in this guide, calculates check digits automatically, and even generates barcodes in bulk. For a URL or marketing code, switch to the QR Code Generator.

Create any barcode type free UPC-A, EAN-13, Code 128, Code 39, ITF & more — PNG or SVG, no signup
Try It Free

Frequently Asked Questions

What are the most common barcode types?

The most common barcode types are UPC-A and EAN-13 for retail products, Code 128 for shipping and inventory, Code 39 for industrial use, Interleaved 2 of 5 (ITF-14) for shipping cartons, and QR codes for storing URLs and larger amounts of data. Each is designed for a specific use case.

What is the difference between UPC and EAN?

UPC-A encodes 12 digits and is the retail standard in the US and Canada, while EAN-13 encodes 13 digits and is used internationally. They are fully compatible — a UPC-A is simply an EAN-13 with a leading zero — so most scanners read both formats without any issue.

What is EAN-13 (5) or "EAN 13 5"?

EAN-13 (5) is a standard 13-digit EAN-13 barcode printed alongside a 5-digit EAN-5 add-on. The supplement encodes extra data such as a book's price or a magazine's issue number, which is why you see it on the back cover of books next to the ISBN.

Which barcode should I use for shipping?

For shipping labels and package tracking, Code 128 is the most versatile choice because it encodes letters, numbers, and symbols in a compact form. For outer shipping cartons and cases, Interleaved 2 of 5 (specifically ITF-14) is the standard, as it prints reliably on corrugated cardboard.

How do I get a barcode for my product?

Purchase a unique UPC or EAN number from GS1, then generate the scannable barcode image for free using an online barcode generator. GS1 ensures your product number is globally unique, while the generator turns that number into a print-ready barcode you can add to your packaging.

Is a QR code a type of barcode?

Yes. A QR code is a 2D barcode, meaning it stores data in a grid of squares rather than the vertical lines of a traditional 1D barcode. This lets it hold much more information — like URLs and text — and it is designed to be scanned quickly by smartphone cameras.

Conclusion

Barcodes may all look similar, but each type is built for a purpose: UPC-A and EAN-13 for retail, Code 128 for shipping and inventory, Code 39 for industry, Interleaved 2 of 5 for cartons, and QR codes for links and rich data. Match the format to where and how your barcode will be scanned, and you will avoid rejected labels and reprints.

Once you know which type you need, creating it takes seconds. Our free Barcode Generator supports every format in this guide and downloads clean PNG or SVG files with no signup — and for anything that needs to store a link or more data, the QR Code Generator has you covered.

Advertisement
Ad