Home › Minimum size

Minimum barcode size, margins and contrast

A code printed too small, without margins or with low contrast won't scan. Here are the measurements that matter, with tables and examples on real label sheets.

  • Your data never leaves your browser
  • PDF in real millimetres
  • Automatic check digit
  • Avery models for A4 and Letter
Everything is processed in your browser
What kind of label do you want to make?

Pick a type and everything is set up for you (code, sheet size and design). You can change anything afterwards.

Code type

To make several different labels (for example, several products with their prices) on the same sheet.

Print at 100% · “Actual size”. Never “Fit to page”.

Several different labels on the same sheet? Add another label

Selected label:

Your product lists, prices and logos are never uploaded to any server. The PDF, PNG, SVG and ZIP are created on your own device. So you don't lose your work, a copy is kept only in this browser (you can delete it with “Clear all”).

Why a well-generated code can fail to scan

A barcode can be perfectly valid and still not scan. Almost always the reason lies in how it was printed: bars that are too thin, no blank margins at the sides, low contrast or a color the scanner can't tell apart. The good news is that these are four measurable things, and they can be checked before printing a whole sheet of labels.

The tool above is set up with a UPC-A on a small label (2⅝ × 1 in, the Avery 5160 sheet) so that you can see, live, the warnings it gives when the code doesn't fit well. Try changing the sheet in step 3 and watch how they change.

The parts of a linear code

  • The module (or X dimension) is the width of the thinnest bar or space. Everything else is measured in multiples of it. It is the most important figure.
  • The quiet zones are the blank margins on the left and right, which the scanner needs to know where the code starts and ends.
  • The height of the bars: the taller they are, the easier it is for the scanner's beam to cross all of them in one pass.
  • The human-readable numbers underneath, to type them by hand if the code fails.

The size of a UPC-A or EAN-13

The GS1 general specifications set for EAN and UPC a nominal module of 0.33 mm (about 0.013 in) and allow the code to be enlarged or reduced between 80% and 200%. A UPC-A or EAN-13 takes 95 modules, plus the quiet zones (UPC-A: 9 on each side; EAN-13: 11 on the left and 7 on the right), 113 in total. From that you can work out the width you need:

SizeModuleCode (95 modules)With margins (113 modules)
80% (minimum)0.264 mm25.1 mm (0.99 in)29.8 mm (1.17 in)
100% (nominal)0.330 mm31.4 mm (1.23 in)37.3 mm (1.47 in)
150%0.495 mm47.0 mm (1.85 in)55.9 mm (2.20 in)
200% (maximum)0.660 mm62.7 mm (2.47 in)74.6 mm (2.94 in)

The practical conclusion: a UPC-A or EAN-13 needs about 37 mm (1.5 in) of width at its normal size and shouldn't go below about 30 mm (1.2 in). That is why on narrow labels the code is a tight fit.

The nominal height of the bars is about 23 mm. On small labels it is reduced, but there is a limit: if the bars are too short, the scanner's beam has to hit exactly the right angle to cross them all, and reads fail more often. The tool warns you when the bars fall below about 10 mm.

What you get on common label sheets

These are the real figures the tool gives for a barcode with a name, price and reference on the same label (the “Shop price” template), on some widely used sheets. The width is the same for a UPC-A and an EAN-13 (95 modules plus margins):

SheetLabelModuleBar heightRating
Avery 5163 / 81634 × 2 in0.85 mm28.7 mmComfortable
Avery 5162 / 81624 × 1⅓ in0.42 mm25.7 mmComfortable
Avery L716063.5 × 38.1 mm0.51 mm16.0 mmComfortable
Avery Zweckform 365152.5 × 29.7 mm0.42 mm10.5 mmTight on height
Avery 5160 / 81602⅝ × 1 in0.25 mm18.4 mmModule below the minimum
Avery L765138.1 × 21.2 mm0.30 mm5.1 mmWon't scan well with text

On the last label, if you remove the name and the price, the bars rise to about 13.5 mm and the code becomes acceptable. The general lesson: on small labels, every millimetre of text takes height away from the code. If your label is small, sacrifice the text before the bars, or choose a more compact format, such as an EAN-8 or a short Code 128.

The quiet zones of each format

FormatLeftRight
EAN-1311 modules7 modules
UPC-A9 modules9 modules
EAN-87 modules7 modules
Code 128, Code 39, ITF-1410 modules10 modules

Two classic mistakes: drawing the code right up against an edge or a box, and letting the name or a line of text invade the margin. If the scanner doesn't find that blank space, it doesn't know where the code begins. For QR codes, the quiet zone recommended by the standard is 4 modules on each side; many phones read with less, but it is the first thing that gives out when a read fails.

Your printer has a minimum size too

A printer can't draw half a drop: it does everything with dots. At 300 dpi, a dot measures 0.085 mm; at 600 dpi, 0.042 mm. A 0.33 mm module is 3.9 dots at 300 dpi and 7.8 at 600 dpi: when rounded, the real width of each bar changes a little. That is why it is best to use a module that is an integer multiple of the dot:

ResolutionDots per moduleModule
300 dpi30.254 mm (just below the minimum for UPC/EAN)
300 dpi40.339 mm (slightly above nominal)
600 dpi80.339 mm (the same, with more precision)
600 dpi120.508 mm

GeneraEtiquetas snaps the width of each bar to a 1/600 inch grid, and in PNG downloads to whole pixels, so that there are no bars of uneven width. Even so, with a 300 dpi printer it is best for the module to be 4 dots (0.339 mm) rather than 3.

There is also an effect you can't see on screen: dot gain. Ink or toner spreads a little when printing, so the bars come out slightly thicker and the spaces slightly thinner than the file says. With very small modules, that can make two bars merge. Always print at the highest quality and turn off “ink saver” or “toner saver”.

Contrast and color

The scanner needs to see a clear difference between the bars and the background. Simple rules:

  • Black bars on a white background is best (21:1 contrast). Contrast below 5:1 already starts to cause problems with scanners and home-printer inks.
  • Be careful with colors. Many scanners use a red laser, which “sees” red, orange, yellow or pink very little: bars of those colors look almost invisible to it. If you want color, make it dark blue, dark green or black.
  • Don't invert the code (light bars on a dark background): checkout and warehouse scanners almost never read them. Phones usually read inverted QR codes, but not every scanner does.
  • A plain, matte background. Kraft paper or a patterned background reduces contrast; glossy plastic causes glare. If you use a glossy sticker, print the code on a white area.

GeneraEtiquetas calculates contrast with the WCAG luminance formula and, separately, with the red channel (the one a red laser sees), and warns you in each case.

Curved surfaces, wrinkles and plastics

A code that wraps around a bottle, a jar or a tube gets distorted, and the bars narrow toward the sides. For curved surfaces it is best for the reading direction to run along the straight part of the container and not along the curve (for example, with the label turned 90°), to use a shorter code and to leave a larger margin. A wrinkled label, or one covered with tape that has bubbles, won't scan either. If you cover the code with clear tape, keep it smooth.

How to check it before printing a batch

  1. Look at the tool's legibility warnings. They tell you the real module and height of your design, and suggest the minimum recommended size.
  2. Print a single test sheet, at actual size, at the highest quality.
  3. Scan the code with your real scanner, or with a scanning app on your phone. Also try scanning it at an angle and in low light.
  4. Only then print the batch.

How those checks are done, and their limits, are in How we verify measurements and codes. And if your sheet isn't the one you have, there are 28 models to compare.

Frequently asked questions

What is the minimum size of a UPC or EAN?

With the minimum module of 0.264 mm (80% of nominal), the code takes about 25 mm and, with the blank margins, about 30 mm. The normal size is about 37 mm with margins. Below 80%, it stops being reliable.

How tall should the bars be?

At nominal size, about 23 mm. On small labels it is reduced, but below about 10 mm reads fail more often. The tool warns you when it falls below that.

What are quiet zones and why do they matter?

They are the blank margins at the sides of the code (11 modules on the left and 7 on the right in an EAN-13). The scanner uses them to know where the code starts and ends. If text or a box invades them, the code won't scan.

Can I print a barcode in color?

Yes, but carefully: red-laser scanners can't tell red, orange, yellow or pink apart well. Use black or dark colors (dark blue or green) on a white or very light background.

Why doesn't a valid code scan if it is well printed?

Usually because of a size that is too small, missing quiet zones, low contrast or the printer's dot gain (the bars come out thicker than planned). Print a test, check it with your scanner and adjust the size.

More guides

Most-used sheets: Avery 3474 · Avery L7162 · Avery 5162 / 8162 · Avery 3422 · Avery L7165 · Avery 5160 / 8160