Packaging Certification

How to actually print barcodes on packaging: choosing between EAN-13, Code 128, and QR Code in practice

📅 2026-09-14 ✍️ Wuxi Lexiang Printing & Packaging ⏱ 3min read

In September 2025 a client who imports nuts sent me an email. The attachment contained design drafts for 12 SKUs of gift boxes, each with a blank little square labeled 'barcode here.' I did not reply whether we could do it. I asked one question first: What does this barcode actually scan out?

He replied: 'Just the product code, the one starting with 69.'

I asked: EAN-13, Code 128, or GS1 DataMatrix?

He took twenty minutes to come back and said: 'I thought they were all the same thing.'

That is the starting point of this article. EAN-13, Code 128, and QR Code are called 'barcodes' by many procurement people, but in the printing workshop they are three completely different processes. The same phrase 'print a code' hides different line widths, different character sets, different checksum algorithms, different print accuracy requirements.

1. EAN-13: the most common rectangle in the supermarket

99% of barcodes on retail packaging you have ever seen are EAN-13. Thirteen digits. The first three digits are the country prefix (69 for China, 45/49 for Japan, 00-13 for USA/Canada), the next 4-7 digits are the manufacturer code, then the product code, and the last digit is a checksum.

The physical structure of EAN-13 is 30 black and white bars. Each bar comes in 4 widths: 1×, 2×, 3×, and 4×. The narrowest bar is called the module width X. The EAN-13 standard requires X ≥ 0.264 mm. If your box only has 20 mm of width, you can still fit EAN-13, but the magnification must stay between 0.80 and 1.00 — you cannot shrink it further.

The most common print-shop disaster is the designer shrinking the barcode to a 0.15 mm module width in the design file. It looks fine on the monitor. Then the digital printer prints it. The scanner cannot read it. A food factory in Wuxi had this kind of accident in 2023: 100,000 gift-box labels had to be scrapped, and they ended up sticking replacement codes by hand.

Practical rule for EAN-13: if your product goes into supermarkets or e-commerce warehouses (Tmall Supermarket, JD self-run, Amazon FBA), you must use EAN-13. Even if the client does not mention export, any distribution channel defaults to EAN-13.

2. Code 128: the hidden workhorse of logistics and industrial packaging

For outer cartons, shipping boxes, pallet labels, and factory internal traceability codes, the printer will usually recommend Code 128. It is a 1D barcode, but its character set covers 128 ASCII characters — far stronger than EAN-13 (which only holds digits 0-9).

Code 128 has three subsets A/B/C. A covers uppercase letters plus control characters. B covers upper/lowercase letters plus digits and symbols. C compresses double-digit numbers (00-99). Logistics scenarios most often use Code 128C because it compresses a long string of digits into a much shorter symbol.

A real industrial packaging example: a factory in Changzhou making diesel-engine parts needs a 21-character code on every outer carton (batch + serial + customer code). EAN-13 cannot hold it. QR Code makes the scanning speed feel slow to the client. They chose Code 128C. 21 digits compressed to 12.5 cm long. Scanner reads it in 0.3 seconds.

Practical rule for Code 128: if the product goes through warehouse automation (WMS), needs batch traceability, or holds mixed alphanumeric internal codes — use Code 128. Its error tolerance is lower than EAN-13, so the line width needs to be slightly thicker (recommend X ≥ 0.30 mm).

3. QR Code: the logic behind Tmall flagship stores and traceability codes

QR Code is a 2D code invented by Denso Wave in Japan in 1994, but in 2025, 80% of QR Code orders at Chinese print shops are tied to it — Tmall flagship store membership scanning, Douyin scan-to-cart, brand product traceability, and cosmetics one-product-one-code anti-counterfeit.

The QR Code data area is a 21×21 to 177×177 grid. Error correction has four levels: L (7%), M (15%), Q (25%), H (30%). Cosmetics gift-box QR codes usually use H level, because even with 30% contamination or scratch on the box, it still scans.

A client making ejiao (donkey-hide gelatin) in Wuxi learned this the hard way: the first version of the QR Code was set to M level (15% error correction). During shipping one batch got smeared with ink. The scanner could not read them. Customer service took complaint calls for a week. The second version went to H level. Cost barely went up (QR Code H is only 8% larger in file size than M). No more problems since.

Practical rule for QR Code: if you need scan-to-link, scan-to-traceability, or one-product-one-code anti-counterfeit — use QR Code. Note that QR Code minimum size is 1 cm × 1 cm. Below that, it does not scan. A 5 mm × 5 mm QR Code in a design file will not scan after production.

4. When the client says 'just print a barcode,' what the print shop should ask first

Back to that nut-client scenario. The correct print-shop response is to ask 4 questions:

First, what data does it scan — 13 digits (EAN-13), alphanumeric mixed (Code 128), or URL/JSON (QR Code)? This determines the standard.

Second, where in the chain does it scan — supermarket checkout, factory automation line, consumer mobile phone, or customs X-ray? Different environments need 2-3× different error tolerance and accuracy.

Third, what is the box size — the physical space available for the barcode determines the lower limit on X module width. If the box only leaves 15 mm for the barcode, EAN-13 must be magnified to 0.85×, Code 128 to 0.50×, and QR Code simply will not fit.

Fourth, what is the print method — digital printing (high precision but thin ink), offset (highest precision), or flexo (corrugated paper with rough texture needs higher error tolerance)?

That nut client eventually chose EAN-13 (for Hema supermarket) plus a QR Code next to it (for the WeChat official-account member registration). A 30 mm × 25 mm area on the front of the gift box, EAN-13 at 1.0× magnification, QR Code with H-level correction at 18 mm × 18 mm. 5 mm gap between the two codes, no interference.

5. The 3 most common barcode accidents in print shops

Accident 1: the client's design file compresses the barcode area to a 0.1 mm X module. When the print shop receives this kind of file, the first step is to feedback to the client to revise. But many novice print shops go straight to the proof. The client receives the proof, cannot scan it, then it is rework — wasting 3-5 days.

Accident 2: black barcode printed on gold/silver paper. Black barcode on gold paper does not have enough contrast. The scanner needs to sweep three or four times to recognize it. We suggest a white underlay under the barcode on gold paper, or adding a white border around it.

Accident 3: UV spot varnish covers the barcode. UV varnish has a high refractive index and blurs the barcode edges. The barcode area must avoid UV spot, either move its position or skip the UV in that area.

The barcode is the smallest element on packaging, but it is also the easiest to mess up and the one the client cares about most. Treating the barcode as a primary process, not a finishing process — that is the dividing line between an OEM print shop and a brand supplier.

If you are choosing a barcode type for a product, you can send us your box size and the data you need to scan. We can tell you which standard to choose and what module width is needed within 30 minutes.

Further reading

GB 4806 food-contact packaging testing projects in practice

Four real QR Code landing forms for cosmetics labels

How to actually calculate plastic packaging migration

Three categories of print accidents caused by insufficient file resolution

#EAN-13 #Code 128 #QR Code #barcode label #packaging printing

FAQ

What is the visual difference between an EAN-13 and a Code 128 barcode?

Visually, EAN-13 is 13 pure digits with fixed left guard 101, center 01010, right guard 10100 start patterns — you can see an irregular black-white distribution. Code 128 has no fixed digit count, its encoding density is higher than EAN-13, and it can hold more information in the same length. If there are 13 digits separately printed below the barcode, it is basically EAN-13. If no digits are printed below, or alphanumeric mixed, it is Code 128.

Why does my EAN-13 look clear on the screen but the scanner cannot read it?

Three common reasons: 1) The X module width is less than 0.264 mm, which the scanner cannot recognize (many designers see 100% on screen but the actual size gets compressed); 2) The quiet zone below the barcode is insufficient, EAN-13 needs at least 3.5× X module width on both sides as a baseline; 3) The print color is not pressed correctly — Pantone Process Black is much better than CMYK 100% black, and the scanner recognition rate on CMYK black edges is 5-8% lower.

Which QR Code error-correction level is most stable?

We recommend H level (30% error correction) for packaging QR Codes. Among L/M/Q/H, H has the most data redundancy, so box smudges, folded corners, and uneven ink can still scan. H is only 8% larger in file size than M, almost no cost increase. Unless your design forces the QR Code below 8 mm × 8 mm (in which case L/M should not be used either — switch to a data barcode).

Client says 'just print a barcode, anything works.' How should the print shop handle it?

Do not accept this requirement. First ask three things: 1) What sales channel does this product go into (supermarket / e-commerce / cross-border / factory internal); 2) What data does the barcode hold (13 pure digits / alphanumeric mixed / URL); 3) How much area is reserved on the box. Once these are clear, then choose a standard. Any vague 'just print one' requirement ends up as returns and reprint — barcode errors are 100% rework, and an unscannable code is scrap.

How do you print barcodes on gold, silver, or dark paper?

Three solutions in increasing cost: 1) Print white ink as underlay in the barcode area, then overprint black barcode (cheapest, medium effect); 2) Use a die-cut process to hollow out the barcode position on gold/silver paper, with white paper underneath (medium cost, good effect); 3) Use Pantone warm-color barcode (warm red + warm black) instead of pure black (highest cost but most stable effect). For dark paper, avoid solution 1 entirely and go directly to solution 2 hollow-cut.

Why can my small-sample QR Code scan fine, but the mass-production version cannot?

Three common variables: 1) The small sample is inkjet (1440 dpi precision), but mass production is digital toner (600 dpi), so QR Code edges have more aliasing at 600 dpi; 2) The small sample is on white card paper, mass production is on coated paper, and the coating layer on coated paper absorbs part of the ink and thickens edges; 3) The small sample is not laminated, mass production has matte lamination, and the matte lamination refractive index blurs the finder patterns. We suggest physical sample + scan test before bulk production.

Need a Custom Packaging Solution?

Learn more about packaging, or consult directly for a custom solution and quote