Reference · Updated 2026

Barcode Types: Complete Guide to 1D and 2D Barcodes

Dozens of barcode symbologies are in active use. This guide covers every common type for retail, shipping, books, pharma, and identification. UPCGen renders eight directly: UPC-A, UPC-E, EAN-13, EAN-8, ISBN, ITF-14, Code 128, and Data Matrix. The rest are documented here for reference. Paste any sample value into our generator.

1D vs 2D in one line

1D barcodes (UPC, EAN, Code 128) are linear stripes that encode digits or short alphanumeric strings. 2D barcodes (QR, Data Matrix, PDF417) are grids that can hold paragraphs of data. Retail still runs on 1D. Pharma, ID, and shipping have moved to 2D.

Every common barcode, at a glance

NameTypeCapacityUsed forSample
UPC-A1D12 digitsRetail products in North America (Amazon, Walmart, Target)036000291452
UPC-E1D8 digits (compressed UPC-A)Small retail packaging where UPC-A doesn't fit01234565
EAN-131D13 digitsInternational retail products (Europe, Asia)5901234123457
EAN-81D8 digitsSmall international retail packaging96385074
ISBN1D13 digits (EAN-13 with 978/979 prefix)Books and book-like publications9780306406157
ITF-141D14 digitsOuter cases / shipping cartons of retail products10012345678902
Code 1281DAlphanumeric, variable lengthAmazon FNSKU, logistics labels, internal trackingX00ABC12345
Code 391DAlphanumeric (43 chars + 7 symbols)Auto parts, defense, libraries, healthcareABC-1234
GS1-1281DStructured alphanumeric (with Application Identifiers)Shipping labels (UPS, FedEx, USPS SCAC), supply chain(01)10012345678902(17)301230
GS1 DataBar1D14-digit GTIN + extensionsFresh foods, coupons, healthcare items too small for UPC01234567890128
Codabar1DNumeric + 6 symbolsBlood banks, FedEx, photo labs, librariesA12345B
MSI Plessey1DNumeric, variable lengthWarehouse inventory, shelf marking1234567
QR Code2DUp to 4,296 alphanumeric charactersMarketing, mobile payments, product pages, contactless menushttps://example.com
Data Matrix2DUp to 2,335 alphanumeric charactersPharma serialization (DSCSA, EU FMD), electronics, defense parts markingGTIN+lot+expiry
PDF4172DUp to 1,850 alphanumeric charactersUS driver licenses, boarding passes, AAMVA-compliant IDsGovernment ID payload
Aztec2DUp to 3,067 alphanumeric charactersTransit tickets (rail, airline boarding passes in Europe)Ticket payload
MaxiCode2DFixed-size, ~93 charactersUPS package routing labelsUPS routing data
USPS Intelligent Mail (IMpb)Postal26-char tracking numberUSPS package tracking and routing9201 9690 0010 0000 0000 0001 23
Royal Mail 4-State (RM4SCC)Postal8 alphanumeric charactersRoyal Mail (UK) automated sortingSN34RD1A
PZN1D7 digits (Code 39 variant)German pharmaceutical products12345678

Which barcode does each platform require?

PlatformAccepted barcode types
Amazon (product GTIN)UPC-A, EAN-13, ISBN
Amazon FBA (FNSKU label)Code 128
Shopify productUPC-A, EAN-13, Code 128
Etsy listing GTINUPC-A, EAN-13
eBay product identifierUPC-A, EAN-13, ISBN
Walmart supplier portalUPC-A, EAN-13, GS1-128 (logistics)
Target supplierUPC-A, ITF-14 (case)
Books (publishers + Ingram)ISBN
UPS / FedEx / USPS shipping labelGS1-128, Code 128, Data Matrix, MaxiCode (UPS)
EU pharmacy serialization (FMD)Data Matrix
US pharmacy serialization (DSCSA)Data Matrix
Boarding pass (airlines)PDF417, Aztec (Europe)
US driver license back sidePDF417

The GS1 question

Most retail platforms (Amazon, Walmart, Target) require a UPC or EAN that's registered with GS1, the global standards body. GS1 sells number prefixes starting at around $30 plus annual renewal. For internal warehouse use, Etsy, eBay, or print-on-demand, any valid check-digit code works — you don't need to buy from GS1.

If you're selling on Amazon and you're not sure whether you need a GS1-registered UPC, check what GS1 is and whether you need one.

Picking the right code

Generate any supported format now

UPCGen renders UPC-A, UPC-E, EAN-13, EAN-8, ISBN, ITF-14, Code 128, and Data Matrix. Need a different format? Email us — we prioritize by demand.

Open the generator