The fastest way to identify a barcode type is to look at its shape first. A strip of parallel lines is a 1D barcode. A square or rectangular grid is a 2D barcode.
From there, matching specific features such as digit count, guard bars or corner squares narrows it down to the exact format, whether you are looking at an image or working from a description.
Once you know the type, you can match it to the right barcode scanners for your business.
Is It 1D or 2D First?
Before checking any finer detail, decide whether the barcode is linear or a grid. This single step rules out more than half the common formats straight away.
A 1D barcode is a single row of vertical bars, wider or narrower depending on the encoded data. A 2D barcode is a square or rectangular pattern of small blocks.
Identifying 1D Barcodes by Sight
1D barcodes look similar at a glance, so the details that set them apart are in the pattern, digit count and guard bars.
UPC and EAN
UPC and EAN barcodes both use a pair of narrow guard bars at each end, plus a matching pair in the middle. UPC-A has 12 digits underneath. EAN-13 has 13.
UPC-A: matching guard bars at each end and in the middle, 12 digits.
EAN-13: same guard bar layout as UPC, but with 13 digits.
Code 39
Code 39 follows a narrow-wide-wide-wide-narrow pattern, often written as NNWWWN. It can include letters and numbers, and it has no fixed length.
Code 39: alphanumeric characters, no fixed length, used for tracking codes.
Code 128
Code 128 is denser and more compact than Code 39, packing more bars into the same space. It supports the full ASCII character set and automatically switches character modes.
Code 128: compact and dense, common on packaging and shipping labels.
For definitions of every format mentioned here, see our guide to every barcode type explained.
Identifying 2D Barcodes by Sight
2D barcodes are easier to tell apart once you know what to look for in the corners and edges of the grid.
QR Code
A QR code always has three bold squares, one in each corner except the bottom right. This is the single easiest identifying feature of any barcode format.
QR code: three large squares in three of the four corners.
Data Matrix
A Data Matrix code has a solid dark line running along two adjacent sides, forming an L shape, with a dotted line on the opposite two sides.
Data Matrix: a solid L-shaped border rather than corner squares.
PDF417
PDF417 looks like several short 1D barcodes stacked in rows. It is common on driver licences, boarding passes and shipping labels.
PDF417: rows of short, stacked linear barcodes.
Once you have matched the format, the next step is choosing the best barcode scanner for how your business will use it.
Identifying a Barcode From a Description Alone
Sometimes you only have a description, not an image, such as a colleague reading digits over the phone. This section works as a manual barcode type identifier for that situation.
12 digits, numbers only, guard bars at both ends and the middle: that is UPC-A.
13 digits, numbers only, a similar guard bar layout: that is EAN-13.
Letters and numbers mixed, no fixed length, asterisks at each end: that is Code 39.
Full ASCII characters, compact and dense, used on a shipping label: that is Code 128.
Described as a square with three big squares in the corners: that is a QR code.
Described as a square with a solid border on two sides only: that is a Data Matrix code.
Described as several short barcodes stacked on top of each other: that is PDF417.
Common Mix-Ups When Identifying Barcodes
UPC and EAN are the easiest to confuse, since they look almost identical. Counting the digits underneath the bars, 12 versus 13, is the quickest way to tell them apart.
QR codes and Data Matrix codes are both square, but only the QR code has three large corner squares. A Data Matrix relies on its solid L-shaped border instead.
Code 39 and Code 128 can also look alike from a distance. Code 39 has wider gaps between characters, while Code 128 packs bars much closer together.
What to Do Once You Have Identified the Type
Knowing the barcode type tells you what hardware you need. 1D formats only need a basic laser or CCD scanner. 2D formats need an imaging scanner.
If you are scanning a mix of both, a 2D imaging scanner covers everything without needing separate hardware for each format.
Frequently Asked Questions
How can I identify a barcode type without scanning it?
Look at the overall shape first, a line of bars is 1D and a square grid is 2D. Then check specific features such as digit count, guard bars or corner squares to narrow down the exact format.
What is the easiest barcode type to identify?
QR codes are the easiest to identify, since they always have three bold squares in the corners. No other common barcode format uses this exact pattern.
How do I tell UPC and EAN barcodes apart?
Count the digits underneath the bars. UPC-A has 12 digits. EAN-13 has 13 digits. Both use a similar pattern of guard bars at each end and in the middle.
Can I identify a barcode type just from a description?
Yes. Digit count, character type and guard bar layout are usually enough to identify a 1D barcode from a description alone, even without seeing an image.
Is there a tool that identifies barcode types automatically?
Some barcode scanning apps display the format after a scan. Without scanning, matching the visual pattern or description against known formats, as covered in this guide, remains the most reliable method.
Once you know your barcode type, choosing the right hardware is easier. Call 1800 431 539 or visit the ASP Microcomputers homepage to talk it through.