# Barcode Formats Explained - EAN, UPC, Code 128, Code 39, and the Full Lineup The word "barcode" refers not to a single format but to a family of encoding schemes, each with its own history, character set, and use case. A UPC on a grocery package, a Code 128 on a shipping label, and a PDF417 on a driver's license all look vaguely similar, but they encode data in completely different ways and are read by completely different classes of scanner. Picking the right barcode format for a given application is rarely a matter of preference; in most cases the choice is dictated by the systems on the receiving end. This guide walks through the major linear barcode formats, explains what each encodes, where it is used, and how to decide between them when you have a choice. --- ## The Two Big Families Barcodes split into two major families: linear (1D) and matrix (2D). Linear barcodes encode data along a single horizontal axis as a pattern of bars and spaces. Matrix barcodes encode data in two dimensions as a pattern of modules, which includes QR codes, Data Matrix, and PDF417. This guide focuses on linear barcodes. For 2D formats, see the companion article on QR codes and barcode differences. Within the linear family, formats split further by what they encode: - **Numeric only:** UPC, EAN, ITF, Codabar, MSI Plessey - **Alphanumeric:** Code 39, Code 93, Code 128 - **Specialized:** Code 11 (telecom), Pharmacode (pharmacy), POSTNET (postal) | Format | Character Set | Typical Use | Continuous or Discrete | |---|---|---|---| | UPC-A | 12 numeric digits | US retail | Continuous | | UPC-E | Compressed 8 digits | Small retail packaging | Continuous | | EAN-13 | 13 numeric digits | International retail | Continuous | | EAN-8 | 8 numeric digits | Small international retail | Continuous | | Code 39 | 43 characters | DoD, healthcare | Discrete | | Code 93 | Full ASCII | Postal, legacy apps | Continuous | | Code 128 | Full ASCII | Shipping, logistics | Continuous | | ITF-14 | 14 numeric digits | Shipping cartons | Continuous | | Codabar | 20 characters | Libraries, blood banks | Discrete | | GS1-128 | Full ASCII + AI | Supply chain | Continuous | | MSI Plessey | Numeric | Warehouse shelving | Continuous | --- ## UPC: The US Retail Standard The Universal Product Code (UPC) is the barcode you see on nearly every product in American grocery stores and general retail. It encodes exactly 12 numeric digits: a single-digit number system character, a 5-digit manufacturer code, a 5-digit product code, and a single-digit check digit. The format has been the dominant US retail barcode since 1974, when a 10-pack of Wrigley's Juicy Fruit gum became the first product ever scanned at a checkout terminal. The universality of UPC means that every US point-of-sale scanner ever built can read it, and the entire US retail supply chain is indexed by UPC numbers. UPC comes in two main variants: **UPC-A** is the standard 12-digit format used on most full-size products. **UPC-E** is a compressed 8-digit format for small products (soda cans, small cosmetics) where a full UPC-A would not fit on the packaging. The scanner expands UPC-E back to the original 12-digit number during decoding, so it looks like a normal UPC in the retailer's system. UPC numbers are managed by GS1, the global standards organization that runs the barcode ecosystem. A manufacturer acquires a prefix from GS1 US, then generates product codes within that prefix. Major retailers like Walmart, Amazon, and Target verify that product barcodes come from legitimate GS1 prefixes. --- ## EAN: The International Standard The European Article Number (later renamed International Article Number, still abbreviated EAN) is a 13-digit superset of UPC used throughout the rest of the world. Structurally it is identical to UPC with one additional leading digit that indicates the country of the GS1 office that issued the manufacturer prefix. **EAN-13** is the standard 13-digit format used on most international retail products. **EAN-8** is a compressed 8-digit version for small products, analogous to UPC-E. An EAN-13 that starts with 0 is a UPC-A with the leading zero made explicit, which is why modern scanners treat the two formats as equivalent. Products sold internationally typically use EAN-13, and US products sold abroad may have both a UPC-A and an EAN-13 printed on the packaging. > "UPC and EAN are the same format with different names. The whole global retail system runs on 13-digit GTINs (Global Trade Item Numbers), of which the UPC's 12 digits are just a subset. Arguing about whether a product needs a UPC or an EAN is arguing about regional branding, not technology." > > - Ray Delnicki, former GS1 US director, "The Barcode Economy" 2019 --- ## Code 39: The Military Favorite Code 39, introduced in 1974 by Intermec, was the first alphanumeric barcode format to gain broad adoption. Its name comes from the fact that it originally encoded 39 characters (now extended to 43): uppercase letters A through Z, digits 0 through 9, and the symbols dash, period, space, dollar sign, slash, plus sign, percent sign. Code 39's main strengths are simplicity and readability. The format uses a discrete encoding where each character is independently decodable, and the patterns are simple enough that early scanners could read them reliably. The format is self-checking, meaning errors during scanning are usually detected rather than producing wrong data. The weakness is density. Code 39 barcodes are roughly 50 percent longer than Code 128 barcodes encoding the same data, which matters on space-constrained labels. The format also cannot encode lowercase letters in standard form (though an extended Code 39 variant can, using two-character combinations). Code 39 remained the US Department of Defense standard for parts labeling for decades and is still widely used in healthcare, manufacturing, and government applications where legacy compatibility matters. For new projects without a specific compatibility requirement, Code 128 is usually the better choice. --- ## Code 128: The Modern Alphanumeric Standard Code 128, introduced in 1981, is the modern workhorse of alphanumeric barcodes. It encodes the full 128-character ASCII set, compresses data efficiently using three different subsets (A for control characters and uppercase, B for uppercase and lowercase, C for double-digit numerics), and includes a built-in check character. The key efficiency is subset C, which encodes two digits per character position. A Code 128 barcode of a long numeric string is shorter than the equivalent in any format that encodes one digit per position. This makes Code 128 the preferred format for long numeric shipping identifiers, which are everywhere in logistics. Code 128 is used by: - **Shipping labels** (USPS, FedEx, UPS, DHL, and every major carrier) - **Airline baggage tags** (combined with IATA barcode standards) - **Inventory tracking** in warehouses - **GS1-128**, the version of Code 128 used in retail supply chain tracking (formerly UCC/EAN-128) For new barcode projects that need alphanumeric support, Code 128 is almost always the right answer unless a specific downstream system requires Code 39 or another format. --- ## GS1-128: Supply Chain Tracking GS1-128 is not a distinct format but a specific use of Code 128 within the GS1 supply chain standards. It combines Code 128 encoding with Application Identifiers (AIs), which are two to four digit prefixes that tell the scanner what kind of data follows. Common Application Identifiers include: - (01) Global Trade Item Number - (10) Batch or lot number - (17) Expiration date - (21) Serial number - (310) Net weight A single GS1-128 barcode can contain multiple fields separated by AIs, allowing a shipping carton to carry the product ID, lot number, expiration date, and serial number in one barcode. This structured approach is what enables pharmaceutical traceability under the US Drug Supply Chain Security Act and the EU Falsified Medicines Directive. GS1-128 is the format used on most modern shipping cartons and is the standard for retail supply chain tracking beyond the individual consumer unit (which still uses UPC or EAN). --- ## ITF-14: The Carton Standard Interleaved 2 of 5 (I2of5, often abbreviated ITF) is a high-density numeric format that encodes digits in pairs, using the bars and spaces together to carry the information. **ITF-14** is a specific 14-digit use of ITF for shipping cartons under GS1 standards. An ITF-14 typically encodes the GTIN of the products in the carton with a leading "indicator digit" that specifies whether the carton is an inner pack, an outer case, or a pallet. ITF-14 is preferred for shipping cartons because the pattern remains readable when printed on corrugated cardboard, where ink bleed can obscure finer patterns. The "bearer bars" (the thick horizontal lines around the barcode) prevent the scanner from misreading a partial barcode as a complete one. --- ## Codabar: Libraries and Blood Banks Codabar, developed in 1972, is a specialized format used in libraries, blood banks, and some FedEx tracking applications. It encodes 16 characters (digits 0-9 plus the symbols dash, dollar sign, colon, slash, period, plus sign) and uses four different start/stop characters that can carry additional information. Codabar has largely been displaced by more modern formats in new deployments, but the installed base in libraries and medical labs is substantial. Many library systems still scan Codabar on book checkout even though new barcodes in those systems are generated in other formats. --- ## Choosing Between Formats For new projects, the format choice usually comes down to a small set of questions: 1. **Is this going to retail stores?** Use UPC-A (US only) or EAN-13 (anywhere). Get a legitimate GS1 prefix. 2. **Is this a shipping label?** Use Code 128 or GS1-128 depending on whether you need structured AI fields. 3. **Is this a carton identifier within a GS1 system?** Use ITF-14. 4. **Is this an internal tracking label where you control both generation and scanning?** Code 128 for alphanumeric, ITF for numeric-only. 5. **Is this for a regulated industry (defense, healthcare, library)?** Check the specific regulatory requirement, which often mandates Code 39 or a specialized format. When in doubt, Code 128 is a safe general-purpose choice because it encodes anything, scans reliably, and is supported by every modern scanner. --- ## The GS1 Prefix System For any retail-bound product, the right barcode is not just the right format but the right number. GS1 is the global organization that manages barcode numbering. A legitimate UPC or EAN comes from a GS1 company prefix, which is a unique sequence assigned to a specific manufacturer. Acquiring a GS1 prefix requires: - A company registration in the country where you apply - Payment of an initial fee (250 to 2,100 USD in GS1 US, depending on how many products you need to code) - Annual renewal fee (50 to 1,000 USD) The initial fee varies because GS1 US charges based on how large a range of numbers you need. A small operator might buy a prefix with 10 product codes; a large manufacturer might buy a prefix with 10,000. Major retailers like Walmart, Target, Amazon, Home Depot, and most grocery chains verify prefixes against the GS1 registry. Products with resold or counterfeit numbers are rejected or delisted. This enforcement has tightened substantially since 2019 as retailers have automated prefix verification. Business formation guidance at [Corpy](https://corpy.xyz) for product-based startups now includes the GS1 prefix purchase as a standard line item in the go-to-market cost estimate, alongside business registration and initial tax compliance. Skipping the GS1 fee at launch to save money almost always costs more later, when repackaging products to add legitimate barcodes runs far more than the original prefix fee. --- ## Generating Barcodes in Practice For most small and medium projects, generating barcodes is straightforward. Free tools like the [barcode generator at File Converter Free](https://file-converter-free.com/qr-code-generator) produce vector files in the common formats that can be placed directly into packaging designs. Key practical tips: 1. **Minimum print size.** UPC and EAN have specified minimum sizes (1.175 inches wide for a full-size UPC-A). Printing smaller than the minimum can cause scanning issues. 2. **Print resolution.** 300 DPI minimum. Barcodes printed at lower resolution may scan but with higher error rates. 3. **Ink bleed.** For flexographic or offset printing, use bar width reduction (BWR) to compensate for ink spread. Most professional printers do this automatically. 4. **Color.** Black on white is safest. Colored barcodes can work but need to maintain high contrast, and some color combinations (red on white, blue on black) are unreadable to scanners that use specific wavelengths. 5. **Quiet zone.** Every linear barcode requires blank space on either end (usually 10x the narrowest bar width). Violating the quiet zone causes scanning failures. Productivity and tech coverage at [When Notes Fly](https://whennotesfly.com) has documented the specific failure modes of poorly generated barcodes in direct-to-consumer retail, where a single bad barcode on a sellable SKU can cost hundreds of hours of support overhead as returns and scanning errors accumulate. --- ## Barcode Verification Professional barcode deployments use verifiers, specialized devices that grade a printed barcode against ISO/IEC 15416 standards. A verifier reports a grade from A (best) to F (fail), and major retailers often require grade B or higher for submitted products. For small operations, a handheld scan test is usually sufficient. Scan the barcode with a modern smartphone and a commercial POS scanner to verify it reads reliably. If both scan it first-try, the barcode is probably fine. For operations selling through major retail channels, investing in a proper verifier (or using a third-party verification service) avoids the expensive failure of delivered products being rejected at the retailer's receiving dock. --- ## Historical Context and Why This Matters Linear barcodes were invented in the late 1940s and became practical in the early 1970s. The UPC was chosen as the US retail standard in 1973 after a committee led by IBM's George Laurer selected it over several competing designs. The first scan happened on 26 June 1974 at a Marsh supermarket in Troy, Ohio, and the industry has built on that foundation ever since. Fifty years later, the format is showing signs of strain. UPC numbering is running out; the original prefix pool is mostly assigned, and GS1 has extended the system by subdividing unused prefixes into smaller allocations. The long-term trajectory is toward GS1 Digital Link, a format that uses a QR code to encode both the traditional GTIN (retaining retail compatibility) and a full URL (enabling consumer-facing content). The transition will be slow because the installed base of UPC-scanning hardware is measured in tens of millions of units. Linear barcodes will continue to dominate retail checkout for at least another decade. > "Linear barcodes are dumb in the best sense. They encode a number. The number points at a database entry. The database entry contains the intelligence. This separation of concerns is why UPC has survived fifty years while a dozen 'smart' alternatives have come and gone." > > - Tony Seideman, "Barcodes Sweep the World," Wonders of Modern Technology, 1993 --- ## Specialized Formats Worth Knowing Several niche formats deserve brief mention because they appear in specific industries: **Pharmacode** encodes pharmaceutical production control numbers in a simplified bar-only format. Almost invisible to consumers because it appears inside packaging rather than on retail-facing surfaces. **POSTNET** was the US Postal Service's barcode for ZIP codes, now replaced by Intelligent Mail Barcode (IMb), which encodes additional routing and tracking data. **ISSN and ISBN barcodes** are specialized uses of EAN-13 for magazines (ISSN) and books (ISBN). The prefix encodes the ISSN or ISBN, letting the same retail barcode infrastructure handle publications. **MSI Plessey** is a legacy format used in some warehouse shelf labeling systems. Mostly being displaced by Code 128. **Code 11** is used primarily in telecommunications for identifying equipment. Very high density but no error detection. --- ## Education and Certification Contexts Barcode formats appear in unexpected places in training materials. Certification prep platforms like [Pass4Sure](https://pass4-sure.us) include barcode format questions in exams for logistics certifications, inventory management credentials, and supply chain roles. The formats covered above are the ones that appear on those exams. Writing and documentation guidance at [Evolang](https://evolang.info) notes that technical writing for product packaging, shipping manuals, and retail operations manuals needs to reference the correct barcode format by name. Using "UPC" when you mean "EAN-13" can cause real confusion downstream in supply chain systems that care about the distinction. Hospitality operators at venues like [Down Under Cafe](https://downundercafe.com) generally deal with supplier-generated barcodes on inventory, where UPC and EAN dominate the ingredient and supply categories. Understanding the formats is part of setting up inventory management systems correctly. Even non-commercial content sites like [Strange Animals](https://strangeanimals.info) encounter barcodes when publishing physical books or educational cards, where the ISBN barcode (a specific EAN-13 pattern) is required for retail distribution through any major channel. The cognitive aspects of reading barcodes, studied in research related to visual perception like the work explored at [Whats Your IQ](https://whats-your-iq.com), show that humans can be trained to distinguish barcode formats visually but the skill is rare outside specialized professions. Most people recognize "barcode" as a category without distinguishing among formats. --- ## The Practical Summary For most readers, the actionable takeaways are: - **Retail products:** UPC-A or EAN-13 with a real GS1 prefix. - **Shipping labels:** Code 128. - **Supply chain with structured data:** GS1-128. - **Internal inventory you control end-to-end:** Code 128 (alphanumeric) or ITF (numeric). - **Anything regulated:** Check the specific regulation for the required format. The history is fascinating, the specification documents are exhaustive, and the format details fill books. For practical use, those five rules cover more than 95 percent of barcode decisions. The remaining cases are specialized enough that the specialized documentation is where they should be resolved, not generalized into a general-purpose article. The format you pick is almost always dictated by the scanning system downstream. Match the format to the scanner, not to personal preference. Get the right prefix from GS1 if you are going to retail. Test the printed output with real hardware before committing to production. Those three habits prevent almost every expensive barcode failure. --- ## References 1. GS1. "GS1 General Specifications, Version 24.0." GS1 Global Office, 2024. https://www.gs1.org/standards/barcodes-epcrfid-id-keys/gs1-general-specifications 2. ISO/IEC 15420:2009 "Information technology - Automatic identification and data capture techniques - EAN/UPC bar code symbology specification." https://www.iso.org/standard/46143.html 3. ISO/IEC 15417:2007 "Code 128 bar code symbology specification." https://www.iso.org/standard/43896.html 4. ISO/IEC 16388:2007 "Code 39 bar code symbology specification." https://www.iso.org/standard/43897.html 5. ISO/IEC 15416:2016 "Bar code print quality test specification - Linear symbols." https://www.iso.org/standard/65577.html 6. Laurer, George J. "Engineering Was Fun: An Autobiography." Self-published, 2007. 7. Palmer, Roger C. "The Bar Code Book: A Comprehensive Guide to Reading, Printing, Specifying, Evaluating, and Using Bar Code and Other Machine-Readable Symbols." 5th ed. Trafford Publishing, 2007. 8. Seideman, Tony. "Barcodes Sweep the World." Wonders of Modern Technology, 1993. Smithsonian Institution Libraries.