What barcode is this? Identify an unknown barcode

Screenshot: Identify a barcode type

In this post we show you how to answer the question "What barcode is this?". In other words, we describe ways of how to identify an unknown barcode type or symbology. Over the past decades several hundred different barcode types have been invented; however, most of them are long gone. Today only about a dozen code types are really relevant and the chances are good that an unknown barcode is one of them.

The easy way: Using an online decoder or scanner

Some would call it cheating, but using an online scanner is indeed the easiest way to determine a barcode symbology. Our standing recommendation is Google Zxing, a free online reader which supports most common symbologies.

Simply upload your code as JPEG or PNG and the decoder will not only tell the data content but also the code type; here's an example result for an EAN 13 code:

Screenshot: Barcode Identification Online

However, in order for the decoder to work, the image has to be of sufficient quality, with the barcode properly centered and not distorted and everything that is not barcode cropped away.

Using a scanner app to identify the code

Good scanner apps will not only show the encoded data but also identify and name the code type. Video shows the CoScan app, a free PDF and barcode scanner for iPhone. The barcodes (EAN 13, Code 128 and QR) are correctly identified and decoded in the life image:

AppStore (free download)

When that is not an option, you'll have to do the identification manually, please read on.

The most common codes in retail: EAN and UPC

EAN and it's US-american counterpart UPC are the most common barcodes worldwide. Both types are used exclusively in retail and almost every product package carries an EAN or UPC code.

Identifying EAN codes

Let's start with EAN. When created according to specification, EAN has a very characteristic text line with the first digit outside the code; however, many chain stores or discounters create their codes without text line. Then the only way to identify the code type is by looking at distinct or repeating bar patterns. With EAN this is easy: It always starts and ends with two thin bars, the barcode will also have two thin bars right in the middle, highlighted here:

Screenshot: What barcode is this? Identify Code EAN

EAN comes in two forms, EAN 13 (shown above) and EAN 8. The latter is shorter but has the same bar patterns left, right and in the middle. By the way, that's the code type in the opening photo.

Sometimes, EAN carries an add-on or satellite barcode, like so:

Screenshot: What barcode is this? Identify Code EAN with Add-on

This is mostly used on books as ISBN barcodes and magazines; for more about EAN, see this in-depth introduction to EAN.

Identifying UPC codes

EAN is derived from UPC, so both codes share a lot of similarities, like the bar pattern, check digit calculation etc. Like EAN, UPC has very distinct text line, with the first and last digit placed outside the actual barcode. Again, we can also identify the code by looking at the bar patterns. As with EAN, it always starts and ends with two thin bars, the barcode will also have two thin bars right in the middle:

Screenshot: What barcode is this? Identify Code UPC

The image shows the 12-digit UPC-A. A shorter form (UPC-E, eight digits) has the same bar patterns left and right but not in the middle. More in our post Code UPC explained.

The most common warehousing codes: Code 128, Code 39, Code 2/5

The most common linear codes in logistics, warehousing and transport industry are Code 128, Code 39 and Code 25 (aka "Code 2/5" or "Code Two of Five"). Code 39 is also used on pharmaceuticals, mostly in some european countries. All three code types can be identified by examining the respective start and stop characters, i.e. the symbols that begin and end a barcode.

Identify Code 128

Code 128 is easily recognized; the code has four different widths for bars and spaces and a distinct stop pattern:

Screenshot: What barcode is this? Identify Code 128

Code 128 has actually three different start characters for the three different 128 subtypes; however, all three begin with the bar pattern we highlighted above. More about Code 128 here.

Identify Code 39

Compared to Code 128, Code 39 looks more regular, because it only has two different widths. It also has a very distinct start/stop pattern which is identical on both sides of the code:

Screenshot: What barcode is this? Identify Code 39

Like Code 128, Code 39 can encode numbers and letters; if the text line under the code shows letters, it is very likely that it is one of those two symbologies. More about Code 39 here.

Identify Code 25

Code 25 again looks kind of irregular; with this code the bars encode one digit, the spaces another:

Screenshot: What barcode is this? Identify Code 25

Note that the sample shows Code 2/5 Interleaved. Code 25 has several more subtypes most of which are very uncommon today, more here.

2D barcode types

While linear (or 1-dimensional) barcodes can be difficult to distinguish, 2D barcode types are really easy to tell apart because they all look completely different. The following image shows the most common 2D codes (top to bottom: QR, Data Matrix, Aztec, PDF 417):

Screenshot: What barcode is this? 2D barcode types

All four barcodes encode "1234567890" and as you can see, they all have a very distinct look:

  • QR has three large finder patterns in the corners, more here
  • Data Matrix always has a dotted line on the top and the right edge, the other two edges are solid, more here
  • Aztec has a central "bulls eye" which is square (UPS's Maxi Code is another code with a bulls eye, but a round one), more here
  • PDF417 looks like a stack of normal barcodes (which it is), more here

Other barcode types

ITF-14

A code frequently used in warehousing is ITF-14 (ITF = Interleaved Two of Five). In most cases the barcode is printed with distinctive thick bars above and below the code or with a thick black frame all around it. The image shows all three variants of ITF-14:

Screenshot: What barcode is this? ITF-14

DataBar GS1

Originally intended as a replacement for the common EAN / UPC codes, DataBar GS1 is seldom used these days but you may stumble upon it occasionally. DataBar has seven subtypes, the most common four are pictured below:

Screenshot: What barcode is this? DataBar

The "stacked" versions are easily recognizable; the linear types sometimes have extremely wide gaps between bars (see the "Truncated" type for an example) which was a big problem when the codes were introduced because it caused some scanners to stop scanning.

A special (and rather rare) variation of DataBar are so called composite codes; here a 2D barcode (usually Micro PDF 417) is placed on top of a stacked DataBar.