Barcode Formats: A Plain-English Field Guide
A reference of the symbologies you'll actually meet in retail, logistics and healthcare — what each one encodes and where it shows up. The free ReadBarcode barcode reader decodes the 1D and 2D symbols shown here, including Code 128, QR Code, Data Matrix and PDF417, from a camera or an uploaded image.
Your team is launching a new product across UK supermarkets, US mass-market and a German pharmacy chain. By the end of the day someone needs an answer to a question that sounds simple — "which barcode goes on the box?" — and that answer turns out to be different on every channel. The consumer pack wants EAN-13. The US version wants UPC-A. The pharmacy version wants GS1 Data Matrix carrying batch and expiry. The outer case wants ITF-14. The carton-level pallet wraps a GS1-128 with an SSCC. And the marketing team would quite like a QR code on the front for the Digital Link.
There are dozens of barcode formats in the wild, but a dozen account for almost every barcode you'll meet in retail, logistics, healthcare and identity documents. This barcode formats field guide covers what each one encodes, where you'll see it on packaging, paperwork or screens, and which ReadBarcode tool decodes or generates it. By the end of the article you should know the different types of barcodes, the difference between 1D barcode types and 2D ones, and how to identify an unknown barcode from nothing but the printed value.
The Short Answer
Barcodes split into two families. 1D barcodes are the parallel bars you see on every supermarket pack — they encode short identifiers like the GTIN that the till looks up to find a price. 2D barcodes are the square or stacked grids you see on boarding passes, driver's licences, pharma vials and consumer-marketing posters — they encode a full payload (batch, expiry, URL, serial) inside a much smaller footprint with built-in error correction.
Within each family a handful of symbologies dominate. On 1D side, you'll almost always be choosing between UPC-A, EAN-13, EAN-8, Code 128 (and its GS1-128 cousin), Code 39 and ITF-14. On 2D side, QR Code, GS1 Data Matrix, PDF417 and Aztec cover effectively everything you'll meet. Niche industrial formats exist (Code 93, Codabar, MaxiCode, Han Xin) but if you're reading this for a packaging or logistics decision, you don't need them.
All Formats at a Glance
The single reference table for the rest of the article. Capacities are practical rather than spec-maximum — what fits on a label and still scans reliably on real hardware.
| Format | Family | Capacity | Where you see it |
|---|---|---|---|
| UPC-A | 1D | 12 digits | US & Canadian retail GTIN |
| EAN-13 | 1D | 13 digits | Worldwide retail GTIN |
| EAN-8 | 1D | 8 digits | Small retail packs (sweets, lip balm, electronics blisters) |
| Code 128 | 1D | ~80 alphanumeric | Shipping labels, asset tags, hospital wristbands |
| GS1-128 | 1D (Code 128 + FNC1) | Code 128 capacity, AI-structured | GS1 logistics labels, SSCC pallet IDs |
| Code 39 | 1D | ~30 alphanumeric (upper only) | Legacy automotive, defence, library catalogues |
| ITF-14 | 1D | 14 digits | Outer cases printed direct on corrugated cardboard |
| ISBN (EAN-13) | 1D | 13 digits (978/979 prefix) | Books, magazines, music |
| QR Code | 2D matrix | ~4,000 alphanumeric | Consumer marketing, payments, GS1 Digital Link |
| Data Matrix | 2D matrix | ~2,300 alphanumeric | Pharma vials, surgical instruments, electronic components |
| PDF417 | 2D stacked | ~1,800 characters | US driver's licences, airline boarding passes |
| Aztec | 2D matrix | ~3,000 characters | Rail and transport tickets (Eurostar, SNCF, Deutsche Bahn) |
1D Formats
The 1D family is dominated by GS1-issued retail identifiers (UPC-A, EAN-13, EAN-8, ITF-14) and the alphanumeric workhorses behind them in logistics (Code 128, GS1-128, Code 39). All of them encode data along a single horizontal axis using bars of varying width, all of them carry a trailing check character (optional in Code 39), none of them have meaningful error correction.
UPC-A and EAN-13 — the Retail Backbone
UPC-A is 12 digits, EAN-13 is 13. They're the same product identifier in different sleeves — a UPC-A is an EAN-13 with a leading zero. Every modern point-of-sale scanner reads both. For the full deep-dive on why the two exist, see the UPC vs EAN guide.
50123456789005012345678900 — the typical consumer-pack barcode outside North America.EAN-8 — the Short Retail Form
EAN-8 is a separate 8-digit GS1 allocation for packages too small for an EAN-13. It is not a truncation of EAN-13 — the brand has to apply for the EAN-8 allocation specifically.
9638507496385074, sized to fit on lip-balm-class packaging.ITF-14 — the Case-Level Identifier
ITF-14 is Interleaved 2 of 5 fixed to exactly 14 digits. The thicker bars survive direct-print on corrugated cardboard where the fine bars of an EAN-13 would bleed into each other. It encodes the GTIN-14 of the outer case — the consumer GTIN with an indicator digit on the front.
1061414100041510614141000415 — leading 1 is the packaging-level indicator.Code 128 — the Alphanumeric Workhorse
Code 128 encodes the full 128-character ASCII range in a dense form, with three internal subsets (A, B, C) that the encoder picks between to keep the symbol narrow. It dominates shipping labels, asset stickers and hospital wristbands. The Code 128 guide walks through subsets and FNC1 in detail.
SHIP-2026-00042SHIP-2026-00042 — a mixed-case alphanumeric payload typical of warehouse labels.GS1-128 — Code 128 With GS1 Syntax
GS1-128 is Code 128 with a mandatory FNC1 at the start, signalling that the payload follows GS1 Application Identifier syntax. The bars look identical to a plain Code 128, but parsers treat the contents as a chain of AIs separated by FNC1.
(01)07640156790009(10)ABC123(17)26123107640156790009, batch ABC123 and expiry 2026-12-31 in a single 1D symbol.Code 39 — the Legacy Alphanumeric
Code 39 predates Code 128 and is still found in defence, automotive and library systems whose scanners haven't been refreshed. It only encodes uppercase letters, digits and a handful of symbols, and produces a symbol roughly twice as wide as Code 128 for the same payload.
ASSET-2026-00042ASSET-2026-00042. Note the wider footprint compared with the equivalent Code 128 above.ISBN — Books, Magazines, Music
The 13-digit barcode on the back of every book is an EAN-13 with a fixed 978 or 979 prefix, allocated globally for publishing. A library system that doesn't know the prefix treats it as a plain EAN-13 and works fine.
97801404491439780140449143 encoded as an EAN-13 barcode — the 978 prefix marks it as a book.2D Formats
The 2D family arrived later and addresses two limits of 1D barcodes: capacity and damage tolerance. Every 2D format encodes data in a matrix of light and dark modules with Reed–Solomon error correction that can repair a damaged part of the symbol (up to roughly 30% at QR Code's highest level) — the same maths that lets a phone scan a QR code through a coffee stain. The four formats below cover effectively everything in practice; the rest are industrial niches.
QR Code — the Consumer 2D
QR (Quick Response) is the format every modern phone camera reads natively. It handles URLs, Wi-Fi credentials, vCards, payments and — increasingly — GS1 Digital Link payloads that double as the retail GTIN. For Sunrise 2027, the QR with a Digital Link URL is what most consumer-pack brands will print alongside the 1D EAN.
https://readbarcode.comhttps://readbarcode.com — the simplest 2D format and the only one a phone camera reads with zero setup.GS1 Data Matrix — the Pharma 2D
Data Matrix achieves the same density as QR in a smaller footprint, which is why GS1 specifies it for pharmaceutical secondary packaging, medical devices and unit-dose markings. The GS1 variant uses the same FNC1 + Application Identifier structure as GS1-128, in a square symbol that fits on a vial cap.
(01)05012345678900(10)ABC123(17)26123105012345678900, batch ABC123 and expiry 2026-12-31 in a footprint a few millimetres across.PDF417 — the Document 2D
PDF417 is a stacked 2D barcode — rows of small 1D-like patterns stacked vertically — rather than a true matrix. It dominates documents that need a lot of data in a single capture: US driver's licences, airline boarding passes, shipping manifests. Phone cameras read it but support is patchier than QR.
M1DOE/JOHN EABC123 LHRJFKBA 0179 226Y012A0001 100Aztec — the Transit 2D
Aztec has a distinctive bullseye finder pattern at its centre and doesn't need a quiet zone, so it scans reliably from glossy phone screens with thin status bars. That makes it the standard for European rail and transport tickets — Eurostar, SNCF, Deutsche Bahn — where the symbol lives on a small screen the passenger flashes at a gate scanner.
M1DOE/JOHN EABC123 LHRJFKBA 0179 226Y012A0001 100How to Choose
The choice between formats almost always reduces to four questions: what data are you encoding, what hardware scans it, how much space does the label have, and which standards apply on the receiving end? The pragmatic answers for the common cases:
- Fixed consumer product. EAN-13 worldwide, UPC-A if you have a North American GS1 allocation. Add a QR with a Digital Link if you want a Sunrise-2027-ready consumer pack.
- Books and serials. ISBN-13 as an EAN-13 with
978or979prefix; ISSN as EAN-13 with977. - Outer case or pallet. ITF-14 on the case (corrugated tolerance) or GS1-128 on the pallet (SSCC + AI payload). Don't use EAN-13 on cardboard — the fine bars bleed.
- Internal asset / inventory label. Code 128 — densest alphanumeric without the GS1 overhead.
- Pharma / medical device. GS1 Data Matrix on the unit-dose package, GS1-128 on the carton, GS1 Digital Link QR if you also need a consumer-facing scan.
- Document or ID. PDF417 for fixed-format US documents (drivers licences, BCBP boarding passes); Aztec for ticket-style screens; QR for anything else.
- Marketing / consumer engagement. QR with a regular URL or a GS1 Digital Link.
The trend for 2026–2028 isn't replacing 1D with 2D — it's carrying both on the same pack. The 1D EAN-13 stays at the till until every retailer in your channel is Sunrise-ready; the 2D Digital Link QR earns its place on the front of the pack for the phone scan. See the Sunrise 2027 Guide for the migration story.
Identifying an Unknown Barcode
Sometimes you have the printed value but not the format — a row in a supplier CSV, an OCR'd scan, a screenshot from a colleague. A few visual and structural cues narrow it down quickly:
- Pure 12–14 digits → almost certainly a GTIN of some kind: UPC-A (12), EAN-13 (13) or ITF-14 (14). Validate the trailing check digit with the GTIN Validator.
- 13 digits starting with 978 or 979 → ISBN-13.
- 13 digits starting with 977 → ISSN.
- Alphanumeric with bracketed groups like
(01)…(10)…→ GS1 Application Identifier syntax — either GS1-128 (1D) or GS1 Data Matrix (2D). - A URL starting with
https://id.gs1.org/or a brand's resolver — a GS1 Digital Link inside a QR or Data Matrix. - Mixed-case ASCII with hyphens and a length over 14 → most likely Code 128 (or GS1-128 if it starts with FNC1).
- All uppercase, no lowercase → could be Code 39 if it's from an older industrial / defence workflow.
For a GS1 element string like the one below, the GS1 decoder splits out each Application Identifier in one click:
GS1 Decoder: Split a GS1 element string or Digital Link URL into its Application Identifiers. Detect the worked example →
If the value turns out to be GS1-formatted, the GS1 Digital Link Decoder parses the AIs (GTIN, batch, expiry, serial) into a structured breakdown.
Common Mistakes
- Treating QR as a synonym for "any 2D barcode". Data Matrix is its industrial cousin and is usually the right answer for tight pharma / electronics packaging where QR is too large.
- Encoding a URL into a 1D barcode. Capacity collapses long before you fit it. Switch to a QR or use a GS1 Digital Link for retail.
- Mixing Code 39 and Code 128 in the same workflow without telling the parser. Both decode cleanly, but each has different escape rules for spaces and symbols.
- Printing ITF-14 at a module size below the GS1 minimum for the substrate. Cardboard ink bleed eats the fine bars; the symbol fails the print-grade check.
- Removing the 1D EAN the moment a 2D QR is added. Retail POS isn't fully Sunrise-ready yet; the till still needs the 1D barcode in most lanes through 2027.
- Reusing an EAN-8 allocation for a longer product line. EAN-8 is a separate GS1 allocation, not a truncated EAN-13. You have to apply for a new EAN-13 allocation if you outgrow the short form.
Quick Decision Guide
When you only need the practical answer for a single label, four short rules cover most cases:
- Consumer pack → EAN-13 (or UPC-A in North America) + an optional QR Digital Link for Sunrise readiness.
- Logistics carton or pallet → ITF-14 on the case, GS1-128 on the pallet (SSCC plus AIs).
- Pharma / healthcare unit-dose → GS1 Data Matrix encoding GTIN + batch + expiry.
- Document, ticket or boarding pass → PDF417 for fixed-format US documents, Aztec for European rail / transport, QR for everything else.
For round-trip QA after you've generated a symbol, scan it back with the Online Barcode Reader, validate any GTIN inside it with the GTIN Validator, and parse any GS1 payload with the GS1 Digital Link Decoder. For large batches, the Batch Barcode Tools page validates a pasted list in one pass.
How Many Types of Barcodes Are There?
There is no official number of barcode types: ISO/IEC alone standardizes more than a dozen symbologies, and every one of them falls into one of three structural groups.
- Linear (1D) barcodes. A single row of bars and spaces read from side to side: EAN-13, EAN-8, UPC-A, UPC-E, ITF-14, Code 128, Code 39, Code 93, Codabar and the linear versions of GS1 DataBar.
- Stacked 2D barcodes. Several short rows of bars piled on top of each other: PDF417, MicroPDF417 and the stacked versions of GS1 DataBar.
- Matrix 2D barcodes. A pattern of modules read in both directions at once: QR Code, Micro QR Code, Data Matrix, Aztec, MaxiCode and DotCode.
To tell the different types of barcodes apart, the Barcode Type Detector checks a typed value against the GS1 formats and ISBN, and the online barcode reader names the barcode format of a scanned symbol next to its value.
Barcode Types and Uses by Industry
Each industry uses a few barcode types, because the scanners, printers and data rules along its supply chain have to agree.
| Industry | Main barcode types | What they carry |
|---|---|---|
| Retail checkout | EAN-13, UPC-A, EAN-8, UPC-E, GS1 DataBar | The GTIN of the consumer unit |
| Warehousing and shipping | GS1-128, ITF-14, Code 128 | The SSCC of a pallet, the GTIN-14 of a case, carrier tracking numbers |
| Healthcare | GS1 DataMatrix, GS1-128, Code 128 | GTIN, batch, expiry and serial number on medicines and devices; patient IDs on wristbands |
| Publishing | EAN-13 with a 2- or 5-digit add-on | ISBN or ISSN, plus an issue number or a price |
| Travel and tickets | PDF417, Aztec, QR Code | Boarding-pass and ticket data |
GS1 Barcode Types
GS1 barcode types are the symbologies that the GS1 General Specifications approve for carrying GS1 keys and Application Identifier data. They fall into five groups:
- EAN/UPC: EAN-13, EAN-8, UPC-A and UPC-E, the family retail checkouts are built around.
- ITF-14: the GTIN-14 of a carton.
- GS1-128: any GS1 key plus Application Identifier data on logistics labels.
- GS1 DataBar: seven versions, formerly called RSS, for small items and variable-measure fresh foods.
- GS1 2D symbols: GS1 DataMatrix, GS1 QR Code and GS1 DotCode, plus a QR Code or Data Matrix that holds a GS1 Digital Link URI.
UPC Barcode Types
There are two UPC barcode types, UPC-A and UPC-E, and either one can carry an optional add-on symbol printed to its right.
- UPC-A encodes a full 12-digit GTIN-12 and is the standard retail barcode in the US and Canada.
- UPC-E is a zero-suppressed form that fits some GTIN-12s starting with 0 into six encoded digits; scanners expand it back to 12.
- 2-digit and 5-digit add-ons carry a magazine issue number or a book price, outside the GTIN.
QR Barcode Types
QR Code, the best known of the 2D barcode types, has four variants: the obsolete Model 1, the Model 2 that almost every QR code printed today uses, Micro QR Code and the rectangular rMQR. Model 2 and Micro QR Code are defined in ISO/IEC 18004 and rMQR in ISO/IEC 23941.
- QR Code Model 2 runs from version 1 (21 × 21 modules) to version 40 (177 × 177 modules), with a finder square in three corners and alignment patterns from version 2 up.
- Micro QR Code has a single finder square and four sizes, M1 to M4 (11 × 11 to 17 × 17 modules). The largest holds up to 35 digits.
- rMQR (rectangular Micro QR Code) is a long, narrow variant for strips of space such as a package edge or a cable label.
Every Model 2 symbol also uses one of four error correction levels: L restores about 7% of the codewords, M about 15%, Q about 25% and H about 30%. A higher level means a larger symbol for the same data.
People also say QR barcode types when they mean content: a web address, a Wi-Fi login, a vCard contact or a GS1 Digital Link all use the same symbol. GS1 QR Code differs, because it starts with FNC1 and holds a GS1 element string.
Key takeaways
- Roughly a dozen formats cover almost every barcode in retail, logistics, healthcare and documents — the rest are industrial niches.
- 1D formats encode a short identifier with a check digit; 2D formats encode a full payload with Reed–Solomon error correction.
- Match the format to the receiving end: retail POS wants EAN-13 / UPC-A, cardboard cases want ITF-14, pharma wants GS1 Data Matrix, screens want QR or Aztec.
- An unknown value's digit count, character set and bracketed structure narrow the symbology fast — the barcode reader confirms it from a scan or photo.
- Dual carriers (1D EAN + 2D QR with Digital Link) are the safe consumer-pack default through the Sunrise 2027 transition.
References
- GS1 General Specifications — the canonical document covering UPC, EAN, GS1-128, GS1 Data Matrix, ITF-14 and the Application Identifier syntax. Published by GS1.
- GS1 EAN/UPC barcodes — overview of the retail 1D family: gs1.org/standards/barcodes.
- ISO/IEC 16022 (Data Matrix) and ISO/IEC 18004 (QR Code) — the international standards behind the two dominant 2D formats. Available from the ISO catalogue.
Ready to generate any of these symbologies? The Barcode Generator covers the 1D family; QR Code, Data Matrix, PDF417 and Aztec live on dedicated pages.
Frequently Asked Questions
How do I tell what barcode format I'm looking at?
Count the digits and look at the shape. Two stacked groups of parallel bars with 12–13 digits → UPC-A or EAN-13. A wider Code 128 has variable-width bars and no digit grouping. A square matrix of dots is QR or Data Matrix; a tall narrow stack of rows is PDF417. Our Barcode Type Detector identifies a pasted UPC, EAN, GTIN-14 or ISBN number automatically, and the barcode reader names the symbology of any scanned code.
Which barcode format should I print on consumer packaging?
EAN-13 (or UPC-A in North America) for the GTIN, plus — increasingly — a 2D code (QR or GS1 Data Matrix) for batch, expiry and a Digital Link URL. That dual-carrier approach is exactly what GS1 Sunrise 2027 is preparing the industry for.
Can I Encode My Website URL in a Barcode?
Yes — that's exactly what QR codes are designed for. Don't try to fit a URL into a 1D barcode; capacity is far too low. For GS1-aware tracking, encode the URL as a GS1 Digital Link so retail systems can extract the GTIN from the same scan.
Why Is ITF-14 Used on Cases Instead of EAN-13?
ITF-14 (Interleaved 2 of 5, 14 digits) is more tolerant of direct-print on corrugated cardboard, where ink can spread and ruin the fine bars of an EAN-13. It encodes the GTIN-14 of the case (the consumer GTIN with an indicator digit).
Are PDF417 and Aztec Still Relevant?
Yes, in specific niches. PDF417 is mandated on the back of US driver's licences and many airline boarding passes. Aztec is heavy on European rail tickets. Neither is a good general-purpose choice today — QR and Data Matrix have won that battle.
What's the Difference Between Code 128 and GS1-128?
Same symbology, different rules. GS1-128 is Code 128 with a mandatory FNC1 character at the start that signals the payload follows GS1 Application Identifier syntax. The bars look identical; the parsing on the other end is stricter.
Are QR Codes a Type of Barcode?
Yes. QR Code is a 2D matrix barcode symbology, standardized in ISO/IEC 18004, that stores data in a grid of square modules instead of a row of bars. Phone cameras and imaging scanners read it, but a laser scanner that sweeps a single line across the label cannot.
What Barcode Type Do Stores Use?
Checkout lanes scan EAN-13 worldwide and UPC-A in the US and Canada, with EAN-8 and UPC-E on very small packs and GS1 DataBar on some fresh foods. Each of them carries a GTIN that the till looks up to find the price. Many retailers are now adding 2D barcodes, such as a QR code with a GS1 Digital Link, next to the 1D barcode as part of GS1 Sunrise 2027.
Next Read
The capacity and scanner-support story behind the format split below.
The identifier that sits inside UPC-A, EAN-13, ITF-14 and ISBN.
Paste a printed value and see which GS1 format or ISBN it matches.
Scan a 1D or 2D barcode and see its format next to the decoded value.