The Complete Guide to Barcodes — Types, Uses, and How to Generate Them Online

QR Code views

What Is a Barcode?

A barcode is a machine-readable pattern of parallel lines (1D) or geometric shapes (2D) that encodes data — typically a product identifier, inventory number, or tracking code. When scanned, the barcode translates its pattern back into the original data, enabling instant lookup in a database.

Barcode Scanning Illustration

Barcodes were first used commercially in 1974 when a pack of Wrigley's chewing gum was scanned at a Marsh supermarket in Ohio. Since then, over 10 billion barcode scans happen daily worldwide (GS1 estimates).

The 7 Most Common Barcode Formats Explained

Understanding which barcode format to use is half the battle. Here's a practical breakdown:

1. EAN-13 (European Article Number)

  • Length: 13 digits
  • Used for: Retail products globally (outside North America)
  • Example: The barcode on a bottle of shampoo in a European supermarket

2. UPC-A (Universal Product Code)

  • Length: 12 digits
  • Used for: Retail products in the United States and Canada
  • Example: Any item you pick up at Walmart or Target

3. Code 128

  • Length: Variable (alphanumeric)
  • Used for: Shipping labels, logistics, inventory management
  • Example: FedEx and UPS package tracking labels

4. Code 39

  • Length: Variable (uppercase letters, digits, some symbols)
  • Used for: Automotive industry, military, healthcare
  • Example: Military equipment identification tags (MIL-STD-1189)

5. ITF-14 (Interleaved 2 of 5)

  • Length: 14 digits
  • Used for: Outer carton marking for bulk shipments
  • Example: A case of 24 bottles marked for warehouse scanning

6. EAN-8

  • Length: 8 digits
  • Used for: Small retail items where space is limited
  • Example: A single candy bar or a small cosmetics tube

7. QR Code (Quick Response)

  • Type: 2D (two-dimensional)
  • Used for: URLs, contact cards, Wi-Fi, payments, marketing
  • Example: Restaurant table menus, event tickets

Not sure which format you need? If you're selling products at retail, you almost certainly need EAN-13 or UPC-A. For logistics and warehousing, Code 128 or ITF-14. For consumer-facing links and marketing, QR codes.

How to Generate a Barcode Online — Step by Step

Step 1: Open the Generator

Go to illi.io Barcode Generator. No sign-up, no payment wall.

Step 2: Select the Barcode Format

Choose from EAN-13, UPC-A, Code 128, Code 39, ITF-14, EAN-8, or other supported formats. The tool validates your input automatically — if your EAN-13 check digit is wrong, it will tell you.

Step 3: Enter Your Data

Type the number or alphanumeric string you want to encode. The tool generates a real-time preview as you type.

FormatInput ExampleNotes
EAN-135901234123457Must be exactly 13 digits
UPC-A012345678905Must be exactly 12 digits
Code 128SHIP-2026-0227Letters + numbers allowed
Code 39PART-A7XUppercase only
ITF-1415400141288763Must be exactly 14 digits

Step 4: Download

Save the barcode as PNG or SVG. SVG is recommended for print because it scales without losing sharpness.

How to Decode a Barcode from an Image

Need to read a barcode from a photo, screenshot, or PDF? Use the illi.io Barcode Decoder:

  1. Upload the image containing the barcode.
  2. The decoder identifies the barcode format automatically.
  3. View the decoded data — product number, tracking ID, or encoded text.

Real-world use cases:

  • Inventory audit — photograph shelf labels and batch-decode without a handheld scanner.
  • Supplier verification — check if the barcode on received goods matches the purchase order.
  • Reverse engineering — decode a competitor's barcode to look up their product in GTIN databases.

Barcode vs. QR Code: When to Use Which?

Criteria1D BarcodeQR Code
Data capacityUp to 48 charactersUp to 4,296 characters
Data typeNumbers (some formats allow letters)Any text, URL, vCard, Wi-Fi
Scanning directionHorizontal onlyAny angle, any orientation
Damage toleranceLowHigh (built-in error correction)
Physical sizeNarrow but longSquare and compact
Best forProduct identification, logisticsMarketing, payments, user interaction

Rule of thumb: If the data is a short number meant for machines (inventory systems, POS terminals), use a 1D barcode. If the data is meant to be scanned by a human with a smartphone, use a QR code.

5 Barcode Pitfalls That Cost Real Money

1. Wrong Check Digit

EAN-13 and UPC-A barcodes include a check digit — the last number — calculated from the preceding digits. If you manually type the wrong check digit, the barcode becomes unscannable at point-of-sale. Use a generator like illi.io that calculates check digits automatically.

2. Insufficient Quiet Zone

The blank space on either side of a barcode is called the "quiet zone." If your packaging design bleeds into this zone, scanners won't recognize where the barcode starts and ends. Minimum quiet zone: 2.5mm on each side for EAN-13.

3. Poor Print Quality

If your printer resolution is below 300 DPI, fine barcode lines may merge together. Laser printers handle barcodes far better than inkjet for this reason. When in doubt, test-scan before mass printing.

4. Using the Wrong Format for Retail

Amazon, Shopify, and major retailers require GS1-registered EAN/UPC barcodes. A Code 128 barcode — no matter how correctly generated — will be rejected at the point-of-sale system because it's the wrong format for retail checkout.

5. Scaling Proportionally with a Logo Editor

Barcodes must maintain their exact aspect ratio. Stretching a barcode vertically or horizontally in Canva or Photoshop corrupts the line spacing and makes it unreadable. Always use the original exported image at its native proportions.

GS1 Registration: Do You Really Need It?

If you plan to sell products through retail channels (physical stores or Amazon), the answer is yes. GS1 is the global standards organization that assigns unique company prefixes, ensuring your product barcodes don't collide with anyone else's.

  • Cost: Starts at $250/year for up to 10 products (GS1 US pricing, 2026).
  • What you get: A unique company prefix + the ability to create EAN-13 / UPC-A barcodes that are globally unique.
  • What happens without it: Major retailers will refuse to list your product, and your barcodes may conflict with existing products in POS databases.

For internal-use barcodes (warehouse labels, asset tags, employee badges), GS1 registration is not required. You can freely generate Code 128 or Code 39 barcodes with any numbering scheme you choose.

FAQ

Can I use the same barcode for multiple products?

No. Each product variant (size, color, flavor) needs a unique barcode. A 330ml Coca-Cola can and a 500ml Coca-Cola bottle have different EAN-13 codes.

Do barcodes work internationally?

EAN-13 barcodes are accepted worldwide. UPC-A codes (12-digit) are primarily used in North America but are scannable globally because they can be zero-padded to 13 digits.

What's the minimum print size for a readable barcode?

For EAN-13 at standard magnification (100%), the minimum width is 37.29mm and minimum height is 25.93mm. You can reduce to 80% magnification for small packaging, but test with a scanner first.

Can barcodes store images or files?

Traditional 1D barcodes cannot — they only encode numbers or short strings. QR codes (2D) can encode longer text but are still limited to about 3KB of data. For files, encode a URL that points to the file instead.

Last updated: February 2026 · Barcode formats verified against GS1 General Specifications v24.0