Magic Generator guide
Barcode Formats Explained
Compare UPC-A, EAN-13, EAN-8, CODE 39, CODE 128, and ITF, including checksums and print considerations.
Published and reviewed by Magic Generator · Updated
The format determines what can be encoded
A barcode symbology defines how data becomes bars and spaces, which characters are allowed, and whether a checksum is required. Choosing a format is a compatibility decision: the scanner, software, label space, and receiving organization must all expect it.
Generating a correct image does not allocate an identifier. Retail numbers such as GTINs are managed separately. Magic Generator is not affiliated with GS1, and creating an EAN or UPC graphic here does not register a product or authorize a number.
UPC-A, EAN-13, and EAN-8
UPC-A commonly represents a 12-digit GTIN in North American retail. EAN-13 represents 13 digits and is widely used internationally. A UPC-A value can be represented within the EAN-13 system with a leading zero, though workflow requirements still determine which symbol to print.
EAN-8 is a compact eight-digit form used when packaging space is limited and an appropriate identifier has been assigned. These formats use a final check digit calculated from the preceding digits. This catches many entry and scanning errors; it is not a security feature.
CODE 39, CODE 128, and ITF
CODE 39 is an older, widely supported alphanumeric format. Its basic character set includes uppercase letters, digits, space, and a small group of symbols. It is easy to work with but less dense than CODE 128.
CODE 128 can encode the full ASCII set and switches among internal code sets for efficient output. It is a strong choice for internal inventory or logistics labels when the receiving system supports it. ITF encodes digits in pairs, so data requires an even number of digits; ITF-14 is a particular packaging standard and should not be confused with arbitrary ITF data.
Why a scanner may fail
Common causes include printing too small, low contrast, blur from resizing, insufficient blank space around the symbol, damaged bars, glossy surfaces, and a scanner not configured for the selected symbology. Human-readable text beneath the bars does not repair an invalid symbol.
Print a test at the intended physical size and scan it through the actual workflow. Do not stretch the image disproportionately. Bar width, height, quiet zones, printer resolution, and substrate matter as much as the encoded value.
SVG or PNG
SVG preserves exact vector edges when resized and is usually preferable for print layout. PNG is convenient for documents and applications that do not accept SVG, but it should be exported near the final required dimensions to avoid resampling blur.
The Barcode Generator validates supported character sets, lengths, and UPC/EAN check digits in the browser. Treat the result as artwork for an existing valid value, then test it; production barcode programs may have additional standards and verification requirements.