Skip to content
AMPthilly home
Get started
Labels & identification

1D vs 2D Barcodes: What Is the Difference?

Clear comparison of 1D and 2D barcodes: types, examples, data capacity, scanning hardware, and how the GS1 Sunrise 2027 shift to 2D at checkout changes which code to use.

AMPthilly Updated

1D barcodes encode data in vertical lines read horizontally, while 2D barcodes such as QR codes store far more data in a two-dimensional grid.

1D and 2D barcodes are the two families of machine-readable code printed on packaging, tickets, and asset labels. A 1D (linear) barcode encodes a short string of data in the widths of parallel vertical bars, read in a single horizontal pass; a 2D (matrix) barcode such as a QR code or Data Matrix encodes data in both directions across a grid of small modules, which lets it hold far more information in the same space. Both exist to do the same job: turn a printed identifier into data a barcode scanner or phone camera can capture without anyone typing.

The short version: 1D codes are width-limited and carry a lookup key; 2D codes pack thousands of characters into a small square, scan from any angle, and survive damage. With the retail world now migrating to 2D at the checkout under GS1 Sunrise 2027, the gap matters more in 2026 than it ever has.

What you will learn

How 1D barcodes work

A 1D barcode is the classic stripe pattern: think of the EAN or UPC code at a supermarket till, or Code 128 and Code 39 labels in a warehouse. All of the data lives in the horizontal sequence of bar and gap widths - the height adds nothing except tolerance for a sloppy scan line.

That design has two consequences. Capacity is small: a practical 1D code carries a short number or reference, because every extra character makes the label physically wider. And the code almost never contains the information itself - it carries a lookup key, typically a UID that points to a record in a database. Scan a UPC at a till and the number does nothing on its own; the point-of-sale system looks it up to find the product, price, and description.

How 2D barcodes work

A 2D barcode arranges data across a grid, so capacity grows with area rather than width - thousands of characters fit in a small square, enough to encode a complete URL rather than just a reference number. Finder patterns (the corner squares on a QR code) let the reader locate and orient the code, so it scans upside down or at an angle. Built-in error correction means a partly damaged code still reads.

That error correction is not vague redundancy - it is specified. QR codes (governed by ISO/IEC 18004) offer four correction levels, L, M, Q, and H, recovering roughly 7%, 15%, 25%, and 30% of the code respectively; at the highest level the symbol still decodes with damage to about a third of its area. Data Matrix (ISO/IEC 16022) uses Reed-Solomon error correction for similar resilience. This is why 2D codes survive the scuffs, smudges, and partial tears that would kill a linear barcode.

Common 1D and 2D barcode types (with examples)

“Barcode” is a family, not a single format. Here are the types you will actually meet, grouped by family.

1D (linear) barcode examples:

  • UPC / EAN - the retail product codes on almost everything you buy at a store.
  • Code 128 - dense, high-capacity logistics and shipping labels; the GS1-128 variant carries structured supply-chain data.
  • Code 39 - an older industrial format still common on asset tags and ID badges.
  • Interleaved 2 of 5 (ITF) - numeric codes printed on shipping cartons and cases.
  • Codabar - used by libraries, blood banks, and photo labs.
  • GS1 DataBar - compact codes used on coupons and fresh produce.

2D (matrix) barcode examples:

  • QR Code - the general-purpose, phone-readable code; great for URLs and consumer-facing labels.
  • Data Matrix - very compact; the go-to for direct-part marking on electronics and surgical instruments, readable down to a few millimetres.
  • PDF417 - the tall stacked code on boarding passes, driving licences, and shipping documents.
  • Aztec - common on rail and transit tickets; it needs no surrounding quiet zone, so it fits tight layouts.
  • MaxiCode - the fixed-size code used for high-speed parcel sortation.

One nuance most pages get wrong: PDF417 is technically a “stacked linear” format, not a true matrix code. It stacks several short linear rows on top of each other rather than encoding freely in two dimensions, so it sits between the two families - more capacity than a single 1D row, but read row-by-row rather than as a single grid.

How to tell a 1D barcode from a 2D barcode

The quickest test is visual. A 1D barcode is a row of parallel vertical bars of varying width, read along a single horizontal axis - the supermarket stripe. A 2D barcode is a square or rectangular grid of dots or modules read on both axes at once, and it almost always carries locator marks: three corner squares on a QR code, or a solid L-shaped border on a Data Matrix.

The rule of thumb that never fails: if you can scan it by pointing your phone camera at it from any angle and it just works, it is almost certainly a 2D code. If it only reads when a scan line crosses straight across the bars, it is 1D.

How much data each barcode type holds

Capacity is the single biggest practical difference, and it comes down to geometry: a 1D code grows in one dimension (width), so each extra character makes the label wider, while a 2D code grows in two dimensions (area), so adding data fills in the grid without ballooning the footprint.

  • UPC - exactly 12 digits.
  • Code 128 - up to roughly 48 characters, though in practice most 1D codes stay under 20-25 characters before the label becomes unwieldy.
  • QR Code - up to about 7,089 numeric, 4,296 alphanumeric, or 2,953 binary characters.
  • Data Matrix - up to about 2,335 alphanumeric characters, in a far smaller footprint than QR.

This is exactly why a 1D barcode carries only a lookup key - a serial number or product reference that points to a database record - while a 2D code can carry a full URL, a structured data string, or an entire asset record in the symbol itself.

Key differences at a glance

  • Capacity - 1D holds a short reference (UPC: 12 digits; Code 128: ~48 characters); 2D holds thousands (QR: ~7,089 numeric; Data Matrix: ~2,335 alphanumeric), including full URLs.
  • Scanning hardware - 1D reads with cheap laser scanners; 2D needs an imager or camera, which every smartphone already has.
  • Damage tolerance - 2D codes carry specified error correction (QR levels L/M/Q/H); 1D codes generally fail once the bars are scratched or smudged.
  • Orientation - 2D scans at any angle; 1D needs the scan line to cross all the bars.
  • Footprint - 2D stores more data in less label space, which matters on small items.

What hardware reads each type

Which code you can use depends on what is going to read it. There are three broad reader classes:

  • Laser scanners sweep a single line of light across the symbol. They are the cheapest option, but they read 1D only.
  • Linear / CCD imagers capture a one-dimensional strip of the image. Still 1D only, but more forgiving than a laser at close range.
  • 2D area imagers and cameras photograph the whole symbol and decode the grid. These read both families - every 1D and 2D code - which is why most modern handheld scanners are 2D imagers.

The point that matters most for everyday workflows: phone cameras read 2D and QR codes natively, straight from the default camera or browser. They generally do not read 1D barcodes without a dedicated scanning app. So if your plan is “scan it with the phone people already have”, a QR label works out of the box where a linear barcode would need extra software.

QR code vs Data Matrix: choosing a 2D format

Once you have decided on 2D, the next question is usually QR versus Data Matrix. Both are true matrix codes, but they serve different jobs.

  • QR Code is the consumer default. Any phone camera reads it, it holds the most data, and it is ideal for URLs and customer-facing labels.
  • Data Matrix is the industrial choice for marking tiny parts. It stays readable down to a few millimetres and tolerates significant damage, which is why it dominates electronics, aerospace, and medical-device direct-part marking.

A practical rule: if the label is customer-facing or will be scanned with a phone, use a QR code; if it is a permanent mark on a small or curved item, use Data Matrix. For asset labels you stick on equipment and scan with phones, QR is the natural fit.

GS1 Sunrise 2027: the shift to 2D at checkout

The biggest current development in this topic is GS1 Sunrise 2027. It is an industry initiative for retail point-of-sale systems worldwide to accept 2D codes - QR codes powered by GS1 Digital Link, and GS1 Data Matrix - alongside the legacy EAN and UPC barcodes, by the end of 2027.

The motivation is that a single 2D code can do two jobs at once: ring up the item at checkout and link the shopper to product information, recalls, expiry dates, and sustainability data through the same scan. During the transition, brands dual-mark packaging - printing both a familiar linear barcode and a 2D code - so older tills keep working while newer ones gain the extra capability. The long-term goal is one 2D code that replaces the dual marks entirely.

Two things are worth being clear about. First, this is a migration target, not a hard mandate - timelines vary by retailer and region. Second, it does not mean 1D disappears: billions of linear barcodes are in circulation, and the two formats will coexist for years. So the honest answer to “are QR codes replacing barcodes?” is that 2D is being added at the point of sale, not switched on overnight.

When to use which

1D barcodes still make sense where they are entrenched: retail point of sale, conveyor lines, and warehouses already full of laser scanners reading simple numeric keys. 2D barcodes win when the scanner is a phone, when the label must encode a link, when label space is tight, or when labels take abuse - a tag on safety equipment that gets scuffed in a van will keep scanning as a QR code long after a linear barcode has given up.

With the concrete numbers in mind, the recommendation is evidence-based rather than a matter of taste: choose 1D when you control the readers and only need a short key; choose 2D when you want phone scanning, more data per label, durability, or the GS1 Digital Link capability that checkout is migrating toward.

1D vs 2D in asset tracking

For tracking equipment, the deciding factor is usually hardware: a 2D code turns every phone in the building into a reader, while a 1D code assumes dedicated scanners. That is why modern asset systems standardise on QR labels - in AMPthilly, for example, each asset gets a printable QR label that opens its record in the browser when scanned with a normal phone camera, with no app or scanner hardware involved. From that record you can check the item in or out, see the current owner, or report an issue.

This is the asset-tag approach in practice: the QR label is the durable, scannable handle, and the asset record behind it holds the detail. Whichever format you choose, print the identifier in human-readable text beneath the code, so a damaged label can still be matched to its record by eye.

FAQ

Is a QR code a 1D or 2D barcode? A QR code is a 2D barcode. It stores data in both directions across a grid of small squares, which is why it can hold a full URL rather than just a short number. The three large squares in its corners are finder patterns that let a camera locate and orient the code, so it scans at any angle - something a linear barcode cannot do.

How can I tell if a barcode is 1D or 2D? Look at the shape. A 1D barcode is a row of parallel vertical lines of different widths, read across a single axis - the classic supermarket stripe. A 2D barcode is a square or rectangular grid of dots or modules read on both axes, usually with locator marks: corner squares on a QR code, or a solid L-shaped border on a Data Matrix. Quick rule of thumb: if you can scan it by pointing your phone at it from any angle, it is almost certainly a 2D code.

How much data can a 1D vs 2D barcode hold? A 1D barcode holds very little: a UPC encodes 12 digits, and Code 128 tops out around 48 characters before the label gets impractically wide. A 2D barcode holds far more in a small square - a QR code can store up to about 7,089 numeric or 4,296 alphanumeric characters, and a Data Matrix up to about 2,335 alphanumeric characters in a much smaller footprint. That is why 1D codes carry a short lookup key while 2D codes can carry a full URL.

Can a smartphone scan a 1D barcode? Phone cameras read 2D codes such as QR natively, straight from the default camera or browser, with no app. They generally do not read 1D barcodes without a dedicated scanning app, because a linear barcode needs different decoding than the area image a phone captures. This is a real advantage for QR in any workflow built around the phone people already carry.

What is GS1 Sunrise 2027 and will 2D barcodes replace 1D barcodes? GS1 Sunrise 2027 is an industry initiative for retail point-of-sale systems worldwide to accept 2D codes - QR powered by GS1 Digital Link, and GS1 Data Matrix - alongside legacy EAN and UPC by the end of 2027. During the transition, brands dual-mark packaging with both a linear barcode and a 2D code. It is a migration target, not a hard mandate, so 1D barcodes will not vanish overnight; the two will coexist for years.

Do 2D barcodes still work when damaged? Usually, yes. Matrix codes such as QR and Data Matrix include built-in error correction, so the code still scans when part of it is scuffed, torn, or covered - a QR code at the highest correction level survives damage to roughly a third of its area. A 1D barcode has no such redundancy across its width: a scratch through the bars typically kills the read.

The takeaway

1D barcodes encode a short key in linear bars and need dedicated scanners; 2D barcodes pack thousands of characters into a small grid, scan from any angle on an ordinary phone, and survive damage. The hard numbers - UPC at 12 digits versus a QR code at ~7,089 - explain why retail is migrating to 2D at the checkout under GS1 Sunrise 2027. For asset tracking the choice is simpler still: QR labels turn every phone into a reader, which is the model AMPthilly is built on.

Tools that make this easier

AMPthilly gives every asset a printable QR label that opens its record in any phone browser - no app to install and no scanner hardware to buy. Scan a label to check the item in or out, see who has it, or report a problem, and every action lands in the asset’s audit history. You can print labels singly or in batches, choose the size for sticker sheets or a label printer, and regenerate a label if one gets damaged. Start free - 3 users and 25 assets, no credit card required - or talk to us about a larger rollout.

Free to start, no card required

Put your register to work

AMPthilly gives every asset an owner, a location, and a history - checkouts, printable QR labels, service desk, and audit trail in one place. The free plan covers 3 users and 25 assets, with SSO and MFA included.