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
Pick a type and everything is set up for you (code, sheet size and design). You can change anything afterwards.
Order if there is no header: name, price, code, reference, old price, copies. With a header row (name, price, code, ref…) the columns are recognized automatically. A single column = codes only.
| # | Name | Price | Code | Ref. | Old price | Copies |
|---|
Current type: · Change label type
The file is saved on your computer and is not uploaded anywhere. Use it to reuse the same design another day or on another computer.
The logo is processed right here and is not uploaded anywhere. Use a simple image: fine details are lost on small labels.
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:
| Size | Module | Code (95 modules) | With margins (113 modules) |
|---|---|---|---|
| 80% (minimum) | 0.264 mm | 25.1 mm (0.99 in) | 29.8 mm (1.17 in) |
| 100% (nominal) | 0.330 mm | 31.4 mm (1.23 in) | 37.3 mm (1.47 in) |
| 150% | 0.495 mm | 47.0 mm (1.85 in) | 55.9 mm (2.20 in) |
| 200% (maximum) | 0.660 mm | 62.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):
| Sheet | Label | Module | Bar height | Rating |
|---|---|---|---|---|
| Avery 5163 / 8163 | 4 × 2 in | 0.85 mm | 28.7 mm | Comfortable |
| Avery 5162 / 8162 | 4 × 1⅓ in | 0.42 mm | 25.7 mm | Comfortable |
| Avery L7160 | 63.5 × 38.1 mm | 0.51 mm | 16.0 mm | Comfortable |
| Avery Zweckform 3651 | 52.5 × 29.7 mm | 0.42 mm | 10.5 mm | Tight on height |
| Avery 5160 / 8160 | 2⅝ × 1 in | 0.25 mm | 18.4 mm | Module below the minimum |
| Avery L7651 | 38.1 × 21.2 mm | 0.30 mm | 5.1 mm | Won'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
| Format | Left | Right |
|---|---|---|
| EAN-13 | 11 modules | 7 modules |
| UPC-A | 9 modules | 9 modules |
| EAN-8 | 7 modules | 7 modules |
| Code 128, Code 39, ITF-14 | 10 modules | 10 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:
| Resolution | Dots per module | Module |
|---|---|---|
| 300 dpi | 3 | 0.254 mm (just below the minimum for UPC/EAN) |
| 300 dpi | 4 | 0.339 mm (slightly above nominal) |
| 600 dpi | 8 | 0.339 mm (the same, with more precision) |
| 600 dpi | 12 | 0.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
- Look at the tool's legibility warnings. They tell you the real module and height of your design, and suggest the minimum recommended size.
- Print a single test sheet, at actual size, at the highest quality.
- 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.
- 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
Which barcode
Which to choose among EAN-13, UPC-A, Code 128, Code 39, ITF-14 and QR for your case: retail, inventory, cartons or links. Comparison with examples.
Check digit
How the check digit of EAN-13, EAN-8, UPC-A and ITF-14 is calculated step by step, with worked examples, which errors it catches and which it misses.
Printer calibration
Step-by-step guide to stop labels from misaligning: 100% scale, test sheet, millimetre adjustment, driver settings and a troubleshooting table.
Price labels
Make and print price labels with a barcode: name, price, crossed-out sale price and Avery sheets. Free, and your data never leaves your browser.
Avery templates
Millimetre measurements for Avery 5160, L7160, 3474, L7651 and more. Generate a PDF with each label in its cell or define your own grid. Free.
Full generator
All barcode formats and labels in a single tool.
Most-used sheets: Avery 3474 · Avery L7162 · Avery 5162 / 8162 · Avery 3422 · Avery L7165 · Avery 5160 / 8160