Barcode Types and Technology – Everything About Barcodes
What Is a Barcode?
A barcode is a machine-readable representation of data using parallel lines or geometric patterns. The concept dates back to 1952, when American inventors Norman Joseph Woodland and Bernard Silver received a patent for a “Classifying Apparatus and Method” (US Patent 2,612,994). Woodland drew his inspiration from Morse code: he simply stretched the dots and dashes downward into lines, creating the world’s first barcode concept.
Although the technology was patented in the early 1950s, it took over two decades for the first commercial barcode scan to take place. On June 26, 1974, a pack of Wrigley’s Juicy Fruit chewing gum was scanned using a UPC scanner at a Marsh supermarket in Troy, Ohio – a moment that launched the worldwide triumph of the barcode. Today, billions of barcodes are scanned daily, from grocery stores to hospitals, from factory floors to delivery services.
The basic principle is remarkably simple: a barcode consists of a sequence of dark bars and light spaces of varying widths. A scanner – whether a laser device or a camera – illuminates the code and measures the intensity of the reflected light. Dark areas absorb the light, while light areas reflect it. From this pattern of high and low reflectance, a bit sequence is decoded that reveals the actual content: a product number, a tracking number, or other identification data.
From postal sorting to warehouse management to patient identification in hospitals – barcodes have evolved from a niche technology to a global standard in less than 50 years, without which modern logistics and commerce would be unthinkable.
1D Barcodes vs 2D Codes
Barcodes can be divided into two fundamental categories: one-dimensional (1D) codes that encode data in only one direction, and two-dimensional (2D) codes that store information both horizontally and vertically. This distinction has far-reaching consequences for capacity, application areas, and required reading technology.
A classic 1D barcode like the EAN-13 on a cereal box consists of vertical lines. The data is encoded solely in the width of the bars and spaces – the height only serves to improve readability. This limits the maximum capacity to approximately 20 to 25 characters. 2D codes, on the other hand, use a grid of modules (small squares or dots) and can thus store hundreds or thousands of times more data in the same space.
| Property | 1D Barcode | 2D Code |
|---|---|---|
| Data Capacity | Max. ~25 characters | Up to several thousand characters |
| Reading Direction | Horizontal only (1 direction) | Horizontal + vertical (2 directions) |
| Scanner | Laser scanner sufficient | Camera or 2D imager required |
| Error Correction | Checksum only (1 digit) | Reed-Solomon (up to 30% redundancy) |
| Typical Use | Retail, warehousing, libraries | Healthcare, transport, tickets |
| Examples | EAN-13, UPC-A, Code 128, Code 39 | QR Code, Data Matrix, PDF417, Aztec |
In practice, both types complement each other: 1D barcodes are ideal for simple identification numbers, while 2D codes are deployed wherever more data needs to fit in less space or built-in error correction is important.
The Most Important Barcode Types
There are dozens of barcode symbologies, but only a handful dominate everyday use. Here are the most important formats with their specifications, applications, and an interesting extra fact:
EAN-13 / EAN-8
Type: 1D • Capacity: 13 or 8 digits • Character Set: Digits only (0–9)
Use Case: The worldwide standard for retail. The European Article Number uniquely identifies every product – from toothbrushes to frozen dinners. EAN-8 is the compact version for small packaging.
Did You Know? The first two to three digits form the country code (e.g., 400–440 for Germany, 00–13 for the US and Canada). The last digit is a check digit that detects scanning errors.
UPC-A / UPC-E
Type: 1D • Capacity: 12 or 8 digits • Character Set: Digits only (0–9)
Use Case: The Universal Product Code is the standard in North America. Functionally, UPC-A is a subset of EAN-13 – any UPC-A code can be represented as EAN-13 by adding a leading zero. UPC-E is the space-saving variant for very small products.
Did You Know? The very first UPC scan (1974, chewing gum in Ohio) used UPC-A. The scanned package is now housed in the Smithsonian National Museum of American History in Washington, D.C.
Code 128
Type: 1D • Capacity: Variable (practically unlimited) • Character Set: Full ASCII (128 characters)
Use Case: The workhorse of logistics. Code 128 is used on shipping labels, in warehouse management, and everywhere alphanumeric data needs to be encoded compactly. With three different code sets (A, B, C), it is extremely flexible.
Did You Know? Code 128 was developed in 1981 by Computer Identics Corporation and is particularly space-efficient: in Code Set C, two digits are encoded in a single symbol.
Code 39
Type: 1D • Capacity: Variable • Character Set: A–Z, 0–9, space, - . $ / + %
Use Case: Industry, government, and military. Code 39 (also known as “Code 3 of 9”) is one of the oldest alphanumeric barcodes and is still used today by the US Department of Defense and in the automotive industry.
Did You Know? Code 39 is “self-checking” – a single printing error does not lead to an incorrect decode, but rather causes the code to be unreadable altogether. This makes it particularly secure.
ITF-14 (Interleaved 2 of 5)
Type: 1D • Capacity: 14 digits • Character Set: Digits only (0–9)
Use Case: Shipping cartons and outer packaging. ITF-14 identifies trade units (e.g., a carton of 24 bottles) and is specifically optimized for printing on corrugated cardboard – the robust, wide barcode tolerates uneven printing surfaces.
Did You Know? The name “Interleaved 2 of 5” describes the encoding technique: two digits are interleaved – one in the bars, the other in the spaces. Of every five elements, exactly two are wide.
GS1-128 (formerly EAN-128)
Type: 1D • Capacity: Variable • Character Set: Full ASCII
Use Case: Supply chain and logistics at the highest level. GS1-128 is based on Code 128 but adds the GS1 system of “Application Identifiers” (AI). This allows a single barcode to simultaneously encode product number, batch number, expiration date, weight, and serial number.
Did You Know? There are over 100 defined Application Identifiers. AI (01) stands for the GTIN, AI (17) for the expiration date, AI (10) for the batch number. This makes GS1-128 the “Swiss Army knife” of the supply chain.
Data Matrix
Type: 2D • Capacity: Up to 2,335 alphanumeric characters • Character Set: Full ASCII + binary data
Use Case: Medical devices, pharmaceuticals, electronics, and anywhere extremely small codes are needed in minimal space. Data Matrix is the preferred code for Direct Part Marking – such as laser engraving on surgical instruments or microchips.
Did You Know? A Data Matrix code can be as small as 2×2 mm – and still be reliably scanned. NASA uses Data Matrix to mark all spacecraft components.
PDF417
Type: 2D (stacked) • Capacity: Up to 1,850 alphanumeric characters • Character Set: Full ASCII + binary data
Use Case: ID documents, driver’s licenses, boarding passes, and shipping labels. PDF417 is a “stacked” code: it consists of multiple 1D rows stacked on top of each other, forming a rectangular 2D pattern. In the US, PDF417 is the standard for the back of all driver’s licenses.
Did You Know? The name PDF417 stands for “Portable Data File” with 4 bars and spaces in a pattern of 17 modules wide each. It was invented in 1991 by Ynjiun Wang at Symbol Technologies.
Aztec Code
Type: 2D • Capacity: Up to 3,832 alphanumeric characters • Character Set: Full ASCII + binary data
Use Case: Transport tickets, boarding passes, and public transit. The Aztec Code is used by IATA for airline tickets and by many European railway systems (Deutsche Bahn, Austrian Federal Railways, Swiss Federal Railways) for online tickets.
Did You Know? The Aztec Code is the only common 2D code that requires no quiet zone – it can be printed right up to the edge of a label. Its name derives from the resemblance of its central finder pattern to an Aztec pyramid viewed from above.
How Does a Barcode Scanner Work?
A barcode scanner converts the optical pattern of a barcode into digital data. There are three fundamentally different technologies used for this purpose:
Laser Scanner
The classic approach: a red laser beam is swept across the barcode (using a rotating mirror or oscillating prism). A photodiode measures the intensity of the reflected light. Dark bars reflect little light, while light spaces reflect a lot. The resulting electrical signal is digitized and decoded. Laser scanners are fast and precise but can only read 1D barcodes.
CCD/CMOS Imager (Area Imager)
An image sensor (similar to a digital camera) captures a complete image of the barcode. Software algorithms then identify the barcode pattern in the image and decode it. Area imagers can read both 1D and 2D codes and are now the standard in professional handheld scanners. They also work more reliably than laser scanners on damaged or poorly printed codes.
Smartphone Camera
Modern smartphones use their built-in camera as a barcode scanner. The camera app or a dedicated scanner app analyzes the video stream in real time, detects barcodes, and decodes them – often in under 100 milliseconds. Since iOS 11 and Android 9, barcode recognition has been built directly into the standard camera app, making a separate app unnecessary.
Regardless of the technology, the decoding process always follows the same principle: measure reflectance → digitize analog signal → identify symbology → validate check digit → output data.
Application Areas
Barcodes are so ubiquitous that we often don’t even notice them anymore. Here are the most important fields of application:
Retail and Point of Sale (POS)
EAN-13 and UPC-A are the heartbeat of retail. At every supermarket checkout worldwide, hundreds of barcodes are scanned every second. They enable automatic price lookup, real-time inventory management, and seamless tracking of goods from manufacturer to store shelf.
Logistics and Supply Chain
Code 128, GS1-128, and ITF-14 form the backbone of the global supply chain. Every package at DHL, UPS, or FedEx carries a barcode that is scanned at every handling point. This allows a parcel’s journey from sender to doorstep to be tracked in real time – often across more than 20 scan points per shipment.
Healthcare and Pharmaceuticals
Data Matrix and GS1 DataBar save lives. In hospitals, patient wristbands, medications, and blood bags are identified by barcode to prevent mix-ups. Since 2019, all prescription medications in the EU must carry a Data Matrix code with a serial number (EU Falsified Medicines Directive 2011/62/EU).
Postal and Parcel Services
Specialized postal barcodes such as POSTNET (US), Royal Mail 4-State (UK), and Deutsche Post routing codes automatically sort millions of letters and parcels daily. These codes contain postal codes and delivery information, enabling sorting speeds of up to 40,000 items per hour.
Events and Access Control
PDF417 and Aztec Codes on concert and flight tickets are increasingly replacing traditional admission tickets. A single scan at the entrance is enough to verify validity and prevent duplicate entries. Airlines use the IATA standard BCBP (Bar Coded Boarding Pass) with Aztec or PDF417.
Manufacturing and Traceability
In the automotive, aerospace, and electronics manufacturing industries, components are permanently marked with Data Matrix – often by laser engraving directly onto the material. This allows every individual part to be traced throughout its entire lifecycle, which is critical during product recalls.
Tips for Optimal Barcodes
- • Contrast is everything: Always use dark bars on a light background. Black on white is ideal. Avoid red or orange backgrounds – red-laser scanners cannot distinguish them.
- • Observe minimum size: Every barcode type has a specified minimum size. For EAN-13, the standard size is 37.29 × 25.93 mm, and reduction to 80% (29.83 × 20.74 mm) is the recommended lower limit.
- • Maintain the quiet zone: The clear area to the left and right (or around the entire code for 2D) is not an optional design element but a technical necessity. For EAN-13, the quiet zone is at least 11 modules on the left and 7 modules on the right.
- • Check print quality: A smeared or blurry barcode leads to read errors. Use printers with at least 203 dpi (preferably 300 dpi) and regularly verify print quality with a barcode verifier per ISO/IEC 15416 (1D) or ISO/IEC 15415 (2D).
- • Choose the right type: Not every barcode is suitable for every application. For pure product numbers, EAN-13 is sufficient; for shipping labels, Code 128 is better; and for tiny components, Data Matrix is the right choice.
- • Verify before printing: Test every barcode with a real scanner before printing a large batch. Online generators and printer settings can introduce subtle errors that only become visible during scanning.
Related Topics
Create Your Own Barcode Now
Free and directly in your browser – no installation required.
→ Go to Barcode & QR Code Generator