This is the main explanatory article in the Category:Barcodes category

Barcode is a machine-readable label, usually printed or attached to some product, parcel or device to show some relevant data. Originally, barcodes represented data in the widths (lines) and the spacings of parallel lines, and may be referred to as linear or 1D (1 dimensional) barcodes or symbologies. They also come in patterns of squares, dots, hexagons and other geometric patterns within images termed 2D (2 dimensional) matrix codes or symbologies. Although 2D systems use symbols other than bars, they are generally referred to as barcodes as well. Barcodes can be read by optical scanners called barcode readers, or scanned from an image by special software.

This applet converts user input into codabar, code128, code39, pdf417, datamatrix, postnet, intl2of5 and some other possible barcodes. If the selected barcode does not support your input, the applet shows red crossing lines.
The first use of barcodes was to label railroad cars, but they were not commercially successful until they were used to automate supermarket checkout systems, a task in which they have become almost universal. Their use has spread to many other roles as well. Other systems are attempting to make inroads in the AIDC market, but the simplicity, universality and low cost of barcodes has limited the role of these other systems. It costs 0.5¢ (U.S.) to implement a barcode, while passive RFID still costs about 7¢ to 30¢ per tag.[1]. Barcodes are usually generated by software with many open source libraries such as [2] available.


The mapping between messages and barcodes is called a symbology. The specification of a symbology includes the encoding of the single digits/characters of the message as well as the start and stop markers into bars and space, the size of the quiet zone required to be before and after the barcode as well as the computation of a checksum. Simple symbologies as codabar convert symbols into barcode segments directly, as if being a kind of alphabet. Advanced symbologies do more complex conversions, providing error recovery and redundancy.

Linear symbologies can be classified mainly by two properties:

  • Continuous versus discrete: Characters in continuous symbologies usually abut, with one character ending with a space and the next beginning with a bar, or vice versa. Characters in discrete symbologies begin and end with bars; the intercharacter space is ignored, as long as it is not wide enough to look like the code ends.
  • Two-width versus many-width: Bars and spaces in two-width symbologies are wide or narrow; how wide a wide bar is exactly has no significance as long as the symbology requirements for wide bars are adhered to (usually two to three times wider than a narrow bar). Bars and spaces in many-width symbologies are all multiples of a basic width called the module; most such codes use four widths of 1, 2, 3 and 4 modules.

Some symbologies use interleaving. The first character is encoded using black bars of varying width. The second character is then encoded, by varying the width of the white spaces between these bars. Thus characters are encoded in pairs over the same section of the barcode. Interleaved 2 of 5 is an example of this.

Stacked symbologies consist of a given linear symbology repeated vertically in multiple.

There is a large variety of 2D symbologies. The most common are matrix codes, which feature square or dot-shaped modules arranged on a grid pattern. 2-D symbologies also come in a variety of other visual formats. Aside from circular patterns, there are several 2-D symbologies which employ steganography by hiding an array of different-sized or -shaped modules within a user-specified image (for example, DataGlyphs).

Linear symbologies are optimized to be read by a laser scanner, which sweeps a beam of light across the barcode in a straight line, reading a slice of the barcode light-dark patterns. In the 1990s development of CCD imagers to read barcodes was pioneered by Welch Allyn. Imaging does not require moving parts, like a laser scanner does. In 2007, linear imaging was surpassing laser scanning as the preferred scan engine for its performance and durability.

Stacked symbologies are also optimized for laser scanning, with the laser making multiple passes across the barcode.

2-D symbologies cannot be read by a laser as there is typically no sweep pattern that can encompass the entire symbol. They must be scanned by an image-based scanner. However 2-D symbologies are more dense and barcodes with the same amount of information can be smaller. The rest of this article covers the most widely known symbologies, providing also a translating applet for each.


This web page reuses material from Wikipedia page under the rights of CC-BY-SA license. As a result, the content of this page is and will stay available under the rights of this license regardless of restrictions that apply to other pages of this website.


  1. 1 Some Hot North American RFID Applications,
  2. 2 Barcode4J project that provides Java applet on this page