QRDock / Blog
Create a QR Code
BarcodesSep 22, 2025· 6 min read· by Daniel Reyes

How to Validate a Barcode Before You Print It

A barcode that fails at the scanner is an expensive mistake once it is printed on thousands of items. Here is how to catch errors first.

Validation starts with the format

Each barcode symbology has rules: EAN-13 needs thirteen digits, UPC-A needs twelve, ITF-14 needs an even count, Code 39 accepts only certain characters. The first check is simply whether your value fits the format you chose.

A generator that validates as you type will reject a malformed value before it ever becomes an image.

Check the check digit

EAN and UPC codes end in a check digit derived from the preceding numbers. If you are supplied a full code, verify that the final digit is correct; if you are supplied the body, let the generator compute it. A wrong check digit means the code points to a different product, or to nothing.

Scan a physical proof

  • Print one label on the real material and printer.
  • Scan it with the exact device your team will use.
  • Confirm it reads on the first attempt, from the working distance.
  • Check the decoded value matches the source data exactly.

Watch the quiet zones

Many "broken" barcodes are actually fine, they simply lack the empty margin scanners need on each side. Before blaming the symbol, make sure nothing is crowding it.

Then scale up

Only after a single proof scans cleanly should you run the production batch. Validation is cheap; a reprint is not.