How 1D barcodes work
A linear barcode represents data through the widths and positions of bars and spaces. Retail formats such as UPC
and EAN carry fixed-length numbers, while formats such as Code 39 and Code 128 can carry other identifier
structures. The associated product description or price is usually stored elsewhere and retrieved after the
identifier is read.
Physical width grows with the amount of encoded data, the selected symbology, and the printing scale. A receiving
system may also impose exact dimensions, quiet zones, check characters, or label-layout rules.
How 2D and stacked formats work
Two-dimensional formats arrange modules across a grid or multiple rows. This structure can carry more data in a
compact area than a typical linear symbol, but more data also creates a denser symbol that requires adequate
module size, contrast, focus, and print quality.
Error correction can help recover data when part of a symbol is obscured, but it is not a guarantee. Readability
depends on the format, correction setting, damage location, remaining finder patterns, quiet zone, image quality,
and decoder implementation.