Free Barcode generator

Field guides / 02

Code 128 vs. EAN-13 vs. UPC-A: Choosing a Barcode Format

Start with the system that will read the label. A bin code such as WH-BIN-042A and a product sold at checkout answer different questions, even if both labels print on the same machine.

Quick comparison

FormatDataLengthTypical use
Code 128ASCII letters, digits and symbolsVariableBins, equipment and internal SKUs
EAN-13Digits13 including check digitRetail product carrying a GTIN-13
UPC-ADigits12 including check digitRetail product carrying a GTIN-12
Code 39A–Z, digits, space and -. $/+%VariableLegacy systems or a specified label format

Code 128 for an internal label

Encode the inventory key exactly as the receiving software stores it. Lowercase letters and punctuation are allowed. Code Set C packs pairs of digits compactly; a long SKU with letters may need more print width than an equally long numeric value. The encoder adds a modulo-103 check character: do not append it to the SKU.

General Code 128 is not interchangeable with GS1-128, which has additional rules for application identifiers and separators. If a customer specifies GS1-128, confirm the full label requirement before sending a carton.

UPC-A and EAN-13 at checkout

Use the identifier assigned to that trade item. UPC-A contains 11 data digits and a check digit; EAN-13 contains 12 data digits and a check digit. A scanner may return a UPC with an extra leading zero when configured for EAN-13 output. Check the receiving software before changing your database keys.

When Code 39 is required

Standard Code 39 works well for a legacy reader configured for uppercase tags. A modulo-43 check character is optional in the symbology but may be required by your customer. Do not silently uppercase a case-sensitive SKU to make it fit; ask which string is expected.

Worked example: check an EAN-13

Using the sample base 400638133393, multiply the digits alternately by 1 and 3 from the left. The weighted total is 89. The next multiple of 10 is 90, so the last digit is 1: 4006381333931. If the total is already a multiple of 10, the digit is 0.

Reference: GS1 · Check digit calculator

Open the bulk barcode generator →