,{ "": "BreadcrumbList","itemListElement":[{"":"ListItem","position":1,"name":"","item":"tools/barcode-generator.html"},{"":"ListItem","position":2,"name":"Home","item":"https://lal.co/"},{"":"ListItem","position":3,"name":"Tools","item":"https://lal.co/tools"}]}
Home/Tools/Barcode Generator
📊

Free Barcode Generator

Generate barcodes in multiple formats. Download as PNG or SVG. 100% free, no signup required.

Configure Barcode

Enter value and click Generate

Understanding Barcode Formats: A Complete Reference

Barcodes encode data as a pattern of parallel bars and spaces of varying widths, read by optical scanners that measure reflected light. Unlike QR codes that encode data in two dimensions, traditional linear (1D) barcodes encode information in a single horizontal dimension, trading data capacity for simplicity, reliability, and near-universal scanner compatibility. Choosing the wrong format can render a barcode unscannable for its intended reader, so understanding each format's purpose is critical.

Format Characters Primary Use
CODE128 All 128 ASCII characters Internal inventory, logistics, shipping labels, warehousing
EAN-13 13 digits (12 + check digit) Consumer retail products — global standard outside North America
EAN-8 8 digits (7 + check digit) Small products where EAN-13 won't fit (gum, lipstick, pens)
UPC-A 12 digits (11 + check digit) Consumer retail products — primarily United States and Canada
CODE39 A-Z, 0-9, and -.$/+% space Defense, automotive, healthcare — legacy systems
ITF-14 14 digits Shipping cartons, outer cases, wholesale packaging

EAN vs. UPC: The Global Retail Standards

UPC-A (Universal Product Code) is the 12-digit barcode standard developed in the United States in 1973 by IBM and the grocery industry. It is the dominant retail barcode in the United States and Canada. A UPC-A barcode encodes a 6-digit manufacturer identification number (assigned by GS1 US), a 5-digit product number, and a single check digit. Virtually every product sold in a North American retail store carries a UPC-A.

EAN-13 (European Article Number, now International Article Number) is the 13-digit counterpart used in the rest of the world — Europe, Asia, Africa, South America, Australia, and the Middle East. EAN-13 is a superset of UPC-A: any UPC-A scanner can read EAN-13 since 2005, when a global compatibility initiative was completed. The first 2-3 digits of an EAN-13 identify the country of the GS1 member organization that issued the prefix (e.g., 00-13 for US/Canada, 40-44 for Germany, 45+49 for Japan, 50 for UK, 84 for Spain, 869 for Turkey). Importantly, the prefix indicates where the manufacturer registered — not necessarily where the product was made.

In practice, virtually all modern point-of-sale (POS) systems worldwide can read both UPC-A and EAN-13. If you are selling in North America, a UPC-A is traditional but not strictly required — an EAN-13 will scan correctly. If you are selling anywhere else, use EAN-13. A 13-digit EAN can be converted to a 12-digit UPC by dropping the leading zero; a UPC can be converted to EAN by prepending a zero. These are functionally equivalent numbers in the global GS1 system.

Do You Need an Official GS1 Barcode?

This is the most common point of confusion for new sellers. For in-store or internal use — a barcode you scan with your own system to track inventory in your warehouse, or a code you print on private labels for a single-store bakery — you do not need an official GS1-issued prefix. You can generate any valid CODE128 or EAN-13 number and print it. Nobody will check that it is registered with a global authority because you control the scanning environment.

For selling through retail chains, online marketplaces, or distributors — such as Walmart, Amazon's FBA program, Tesco, Carrefour, or any retailer that integrates your barcode into a shared POS system — you generally need a GS1-issued GTIN (Global Trade Item Number) embedded in a barcode. Each retailer and marketplace has its own policy. Amazon, for example, requires GS1-issued UPCs or EANs for most categories and will reject barcodes generated from unregistered number ranges. The policy exists because multiple sellers using the same unregistered barcode number would corrupt inventory data across the supply chain. Official GS1 prefixes are purchased from your national GS1 member organization (e.g., GS1 US, GS1 UK, GS1 Turkey) and are licensed annually.

Barcode Anatomy: Structure and Check Digit

Every EAN and UPC barcode includes a check digit — the final digit computed from all preceding digits using the modulo-10 algorithm. The check digit catches single-digit typing errors, transpositions (swapping two adjacent digits), and most common data-entry mistakes. When a scanner reads a barcode, it recalculates the check digit from the first 11 (UPC) or 12 (EAN) digits and compares it to the scanned check digit. If they do not match, the scanner rejects the read and beeps differently. This prevents misidentification of products at checkout. The formula:

Step 1: Sum all digits in odd positions (counting from the right, excluding the check digit position).
Step 2: Multiply that sum by 3.
Step 3: Add the sum of all digits in even positions.
Step 4: The check digit is the number needed to reach the next multiple of 10.
Example for EAN-13 digits 5 9 0 1 2 3 4 1 2 3 4 5: odds (5+0+2+4+2+4)=17 × 3 = 51; evens (9+1+3+1+3+5)=22; 51+22=73; next multiple of 10 is 80; check digit = 7.

Printing Barcodes: Quality Rules for Reliable Scanning

Minimum Size

For EAN-13, the nominal width is 37.29 mm with a height of 25.93 mm (including the human-readable numbers below). The absolute minimum magnification is 80% of nominal (29.83 mm wide). Going below 80% risks scan failures across different scanner types. For retail use, never go below 90% of nominal size. For internal use with CODE128 on shipping labels, standard sizes range from 50-80 mm wide depending on the data length.

Quiet Zone and Contrast

Every barcode requires a quiet zone — a blank margin before the first bar and after the last — equal to at least 10 times the narrowest bar width for EAN/UPC codes. This is typically 2-3 mm. The bars must be printed in dark ink (black, dark blue, dark green) on a light, matte, non-reflective background. Never print barcodes on glossy paper without testing; specular reflection can blind laser scanners. The minimum print contrast signal (PCS) is 75% between bars and spaces.

Never Squash or Stretch

Resizing a barcode image by dragging its handles in graphic design software (non-proportional scaling) is one of the most common causes of unscannable barcodes. Changing the height while keeping width proportional is acceptable (height does not carry data). Changing the width — even slightly — alters the bar-to-space ratio that the scanner is calibrated to read. Always scale proportionally from a high-resolution vector source (SVG), and never resize a raster PNG barcode in design software.

Barcode vs. QR Code: When to Use Which

The fundamental difference is dimensionality and scanning hardware. Linear barcodes (EAN, UPC, CODE128) are read by laser scanners that sweep a single line across the code. They are optimized for speed, reliability, and long-distance scanning — a cashier can scan a product barcode from 30 cm away in under 100 milliseconds without aiming precisely. Because they encode only digits (and limited characters in CODE128), the data capacity is small — typically 8-14 digits for retail codes or up to roughly 48 characters for CODE128 — but that is exactly what product identification requires.

QR codes are read by image-based scanners (cameras), not lasers. They encode data in both dimensions, giving them far higher capacity — up to 4,296 alphanumeric characters — and built-in error correction that allows partial damage while remaining scannable. A QR code can encode a complete URL, contact information, or WiFi credentials, which no linear barcode can. The tradeoff is that QR codes require a camera-based reader (a smartphone or a 2D imager scanner) and do not scan as fast or from as far as a laser reading a 1D barcode.

Use a linear barcode when: you need to identify a product by a numeric GTIN at a point of sale, track inventory in a warehouse using existing laser scanners, print shipping labels for carrier sorting systems (all of which read 1D codes), or interface with any system built on the 50-year barcode infrastructure that processes trillions of scans daily.

Use a QR code when: you want a customer to open a URL, download an app, view a menu, or join a WiFi network from their phone; you need to encode more than 48 characters; you expect the code to be partially damaged (QR error correction handles up to 30% damage); or you are printing on a curved, uneven, or small surface where a laser scanner cannot maintain a clean line of sight.

The two technologies are complementary, not competitive. A product might carry an EAN-13 barcode for the checkout scanner and a QR code on the packaging for the consumer to scan with their phone. Each serves a distinct layer of the product interaction lifecycle.

Related Tools

📱
QR Generator
🔐
Password Generator
📚
All Tools