Skip to main content

Find your next tool

MAXScanner Guide

Which Barcode Do I Need? Types and Sizes

Products sold in shops need an EAN-13 or UPC-A number licensed from GS1; your own stock and shipping labels can use Code 128 for free. We encoded the same data in each type and measured width and scanning.

The short answer

Choose the barcode by where it will be scanned. A product sold in shops or on marketplaces needs a GTIN, a number licensed by GS1, printed as EAN-13 (or UPC-A in the US and Canada). Cartons in a warehouse use ITF-14 or GS1-128. Anything only your own business scans, such as stock bins, equipment, files and internal shipping labels, can use Code 128 with any text you like and no registration.

The type also sets the size. The same 13 digits are 37.29 mm wide as EAN-13, 47.19 mm as Code 128 and 85.47 mm as Code 39 at the same bar width.

Barcode types and what each one is for

These are the types you will meet on products, cartons and labels, and the ones MAXScanner’s barcode generator makes.

Common barcode types
BarcodeWhat it holdsTypical useNumber from GS1 needed?
EAN-1313 digits (GTIN-13)Retail products worldwideYes
UPC-A12 digits (GTIN-12)Retail products in the US and CanadaYes
EAN-8 / UPC-E8 digitsVery small packsYes
ITF-1414 digits (GTIN-14)Outer cartons, printed on corrugated boardYes
GS1-128GTIN plus batch, expiry date, serial number and morePallets, logistics, healthcareYes
Code 128Letters, digits and symbolsStock, assets, documents, shipping labelsNo
Code 39A–Z, 0–9 and - . $ / + % spaceOlder industrial and government systemsNo
QR code (2D)Text and linksWeb links, payments, ticketsNo

The same data in each barcode

We encoded the same values with MAXScanner’s barcode engine and measured the width of each symbol, including the blank margins (quiet zones) scanners need. A module is the width of the narrowest bar, X.

Width of the same data in each type
DataBarcodeWidth in modulesWidth at X = 0.33 mm
GTIN 9501101530003EAN-1311337.29 mm
GTIN 9501101530003Code 12814347.19 mm
GTIN 9501101530003Code 3925985.47 mm
Order number PO-2026-04817Code 12818761.71 mm
Order number PO-2026-04817Code 3925985.47 mm
16 digits 1029384756102938Code 12814347.19 mm
16 digits 1029384756102938Code 39307101.31 mm
Measured on 10 November 2026. The GTIN uses prefix 950, which GS1 uses in its own examples, so it belongs to no real product. On cartons, ITF-14 and GS1-128 use X = 0.495 mm: the GTIN-14 19501101530000 measured 72.52 mm as ITF-14 (with its bearer frame) and 76.23 mm as GS1-128.

Why Code 128 is shorter

Code 128 packs digits two to a symbol, which is why 16 digits take no more room than the 13-digit GTIN and less than the 13-character order number. Code 39 spends 16 modules on every character at its usual 3:1 bar ratio, so it is always the widest. Its one advantage is that old scanners and software read it without any setup, which is why some older industrial and government specifications still ask for it.

How big a barcode has to be

GS1 sets the size of retail codes. At 100 % an EAN-13 or UPC-A has X = 0.33 mm, is 37.29 mm wide including margins and has bars 22.85 mm tall. For codes scanned at a checkout, GS1 allows 80 % to 200 %. Codes on cartons for warehouses need bars of at least 0.495 mm.

EAN-13 at the GS1 size limits
MagnificationX (narrowest bar)Width with marginsBar height
80 % (smallest)0.264 mm29.83 mm18.28 mm
100 % (standard)0.33 mm37.29 mm22.85 mm
200 % (largest)0.66 mm74.58 mm45.70 mm
Widths from MAXScanner’s layout engine, which follows the GS1 General Specifications. Internal Code 128 labels have no official minimum; our generator warns below X = 0.19 mm, which is our own guidance for office printers.

Sources

Pixels: why a barcode image can stop scanning after resizing

Barcode images are often resized on their way into a document or to a printer. We drew each code sharply, scaled it down to fewer pixels per narrow bar, the way a shrunken PNG or a distant camera sees it, and read it back with the decoder in MAXScanner’s barcode scanner.

Did the code still scan after scaling?
Barcode3 px per bar2 px1.5 px1.25 px1 px
EAN-13ReadReadReadFailedRead
UPC-AReadReadReadReadRead
Code 128ReadReadFailedFailedRead
Code 39ReadReadReadReadRead
ITF-14ReadReadFailedFailedFailed
GS1-128ReadReadFailedFailedRead
Clean greyscale images without noise or blur, so real photos fail sooner. Measured on 10 November 2026 with MAXScanner’s barcode engine and the ZXing-C++ decoder its scanner uses.

What the scaling test means

Two or more pixels per narrow bar read every time. In between, at 1.5 and 1.25 pixels, bar edges fall inside pixels and turn grey, and Code 128, GS1-128 and ITF-14 stopped reading although they still looked like barcodes. At exactly 1 pixel per bar most read again, because every bar lands on whole pixels. So scale a barcode image only by whole numbers, or use SVG or PDF, which keep exact bar widths at any size. MAXScanner’s PNG files round the bar width to whole pixels at the DPI you choose: at 300 DPI, 0.33 mm becomes 4 pixels, which prints at 0.339 mm.

Getting a product number (GTIN)

Retail barcodes encode a GTIN, and GTINs come from GS1, a non-profit standards body with one member organisation per country or region. You license either a single number or a company prefix that lets you number many products. GS1 US, for example, charges $30 once for one GTIN, or $250 plus $50 a year for a prefix that covers 10 products (its prices on 10 November 2026). Elsewhere the local GS1 office sets the fees.

Marketplaces check the number against GS1’s records. Amazon India’s seller guide says Amazon’s systems regularly verify product IDs against the GS1 database and that barcodes bought from resellers often lead to rejected listings; brands in Amazon Brand Registry may qualify for a GTIN exemption.

What the first digits mean

The first digits of a GTIN show which GS1 office licensed the number, not where the product was made. A company that joined GS1 India gets numbers starting with 890 and may have its goods made in any country. Prefixes in the markets MAXScanner serves:

GS1 prefixes (first digits of an EAN-13)
PrefixLicensed by
001–019, 030–039, 060–139GS1 US
754–755GS1 Canada
750GS1 Mexico
778–779GS1 Argentina
789–790GS1 Brasil
300–379GS1 France
400–440GS1 Germany
500–509GS1 UK
560GS1 Portugal
800–839GS1 Italy
840–849GS1 Spain
450–459, 490–499GS1 Japan
880–881GS1 Korea
680–681, 690–699GS1 China
471GS1 Taiwan
622GS1 Egypt
628GS1 Saudi Arabia
629GS1 UAE
890GS1 India
894GS1 Bangladesh
200–299Numbers for use inside one shop or region, such as weighed goods
978–979Books (ISBN)
950GS1 Global Office, also used in GS1’s examples
GS1 publishes the official list of prefixes; this table follows the published list as summarised on Wikipedia, read on 10 November 2026.

Sources

The check digit

The last digit of every GTIN is a check digit that catches typing and scanning errors. Multiply the other digits alternately by 3 and 1, starting from the right, add them up and take the amount needed to reach the next multiple of 10. For 950110153000 the weighted sum is 47, so the check digit is 3 and the full number is 9501101530003. MAXScanner’s generator adds a missing check digit and, if you type a wrong one, names the right one and shows the sum. Code 128 carries its own hidden check character, so you never type one.

When our generator is not the right tool

MAXScanner makes the barcode image. Some jobs need more than that.

  • It does not issue GTINs. Get those from GS1 first.
  • It makes linear barcodes and QR codes only. GS1 DataBar (fresh produce), Data Matrix (medicines, medical devices) and PDF417 (ID cards, boarding passes) need other software.
  • Its scan check proves that the code decodes to the right value; it is not a print-quality grade. Retailers who ask for an ISO/IEC 15416 grade need a barcode verifier.
  • On a thermal label printer, choose its DPI (203 or 300) in the generator, so the bar width is rounded to whole printer dots.

Frequently asked questions

What is the difference between UPC and EAN?

UPC-A has 12 digits and is used mainly in the US and Canada; EAN-13 has 13 digits and is used in the rest of the world. A UPC-A number is an EAN-13 with a leading 0, and checkout scanners everywhere read both.

Can I make my own barcodes for products?

For your own stock, yes: Code 128 with any text needs no registration. For products sold through shops or marketplaces, the number must be a GTIN licensed to your business by GS1. The barcode image itself can come from any generator, including ours.

Does a barcode show the country of origin?

No. The first digits show which national GS1 office licensed the number. A company can license numbers in one country and make its products in another.

What size should a barcode be?

For EAN-13 and UPC-A, the GS1 standard size is 37.29 mm wide including margins, and checkout codes may range from 80 % (29.83 mm) to 200 %. Carton codes use bars of at least 0.495 mm. For internal Code 128 labels, keep the narrowest bar at 0.33 mm when the label allows it.

Should I use Code 128 or Code 39?

Code 128 for anything new: it holds all keyboard characters and is much shorter, 47.19 mm against 85.47 mm for the same 13 digits in our test. Use Code 39 only when an older system or a customer specification asks for it.

Do I need GS1 barcodes to sell on Amazon?

In most categories, yes. Amazon checks product IDs against GS1 data, and Amazon India’s seller guide warns that barcodes bought from resellers often lead to rejected listings. Brands enrolled in Amazon Brand Registry can apply for a GTIN exemption.

Keep reading

What DPI Means: Pixels, Print Size and KB

DPI only tells software how large to print the pixels. We wrote 72, 300 and 600 DPI into one scan and every file stayed 437,719 bytes. Here is what really changes the size, and the pixels each print needs.

Read the related guide →

JPG vs PNG: Which to Use, With Measured Sizes

Use JPG for photos and PNG for signatures, screenshots and transparency. We saved 7 real files both ways: one photo was 786 KB as PNG and 174 KB as JPG with no visible difference.

Read the related guide →