ScanMosaic

Barcode basics: EAN, UPC, Code 128, Data Matrix and QR codes

6 min read · Updated 18 October 2026

Barcodes come in two families. Linear barcodes are the familiar lines read by shop scanners. 2D codes, like QR codes and Data Matrix, store far more in a small square and can be read by phone cameras.

Linear barcodes

TypeHoldsUsed for
EAN-1313 digitsRetail products worldwide (outside North America)
UPC-A12 digitsRetail products in the US and Canada
EAN-8 / UPC-E8 digitsSmall packages with little space
Code 128Letters, digits and symbolsShipping labels, warehouses, internal tracking
Code 39Capital letters and digitsOlder industrial, ID and government systems
ITF-1414 digitsOuter cartons and cases
ISBN13 digits (EAN-13)Books

2D codes

  • QR codes hold up to a few thousand characters, are read by every phone camera and can carry links, WiFi details, contacts and payments.
  • Data Matrix is tiny and robust. It's used for marking parts, electronics and medicines.
  • GS1 QR and GS1 Data Matrix carry product numbers plus extra data like batch and expiry, and are replacing linear barcodes on many products.

Which one do you need?

  • Selling in shops? You need a GS1-issued product number printed as EAN-13 or UPC-A. Retailers check that the number is registered to you, so you can't make one up.
  • Shipping or warehouse? Code 128 for labels; ITF-14 for cartons.
  • Reaching customers? A QR code. It opens your page on any phone, and you can add your logo.

Printing barcodes

  • Keep the clear margins (quiet zones) at both ends of linear barcodes.
  • Print black bars on white. Red bars are invisible to many laser scanners.
  • Don't shrink retail barcodes below about 80% of the standard size.
  • Use vector files (SVG, PDF or EPS) for print.

Frequently asked questions

Questions

Can a phone read normal barcodes?

Many phone cameras and apps can read EAN and UPC barcodes, but they mostly show the number. QR codes are made for phones and can open links directly.

Is a QR code a barcode?

Yes, it's a two-dimensional barcode. It stores data in squares in two directions instead of lines in one.

Do I need to register a barcode?

Retail product numbers (EAN, UPC) must be licensed from GS1. Internal barcodes like Code 128 for your own stock don't need registration.

Make your first code in under a minute

Free, private, and checked to scan before you download.