Barcode Generator Online — Create Code 128, EAN-13, UPC-A & More

IP & Network views

How Barcodes Work

Barcodes encode data as a pattern of bars and spaces of varying widths (or dots in 2D codes). Scanning devices — laser scanners or camera-based readers — measure these width ratios and decode them into numbers or text. Different formats offer different data capacities, error correction levels, and use cases.

Common Barcode Formats Compared

FormatData TypeLengthTypical Use
Code 128Full ASCIIVariableLogistics, warehousing, shipping labels
EAN-13Numbers onlyFixed 13 digitsRetail products (international standard)
UPC-ANumbers onlyFixed 12 digitsNorth American retail products
EAN-8Numbers onlyFixed 8 digitsSmall packaging where space is limited
Code 39AlphanumericVariableIndustrial, automotive, government
ITF-14Numbers onlyFixed 14 digitsOuter cartons and pallets (GS1)
QR CodeAny contentVariableMobile scanning, URLs, contact info

How to Choose the Right Barcode Format

  • Retail product listings: EAN-13 (international) or UPC-A (North America) — requires a GS1 registered prefix
  • Internal inventory management: Code 128 — flexible alphanumeric, no registration required
  • Shipping and logistics: Code 128 or ITF-14 (outer cases) are industry standards
  • Mobile scan-to-URL: QR Code — far more data capacity than 1D barcodes
  • Legacy scanner compatibility: Code 39 — high tolerance for older industrial scanners

How to Generate a Barcode Online

Use tool.tl's barcode generator:

  1. Go to tool.tl/barcode-generator
  2. Select a barcode format (Code 128, EAN-13, UPC-A, etc.)
  3. Enter the number or text to encode
  4. Preview and adjust size and display options
  5. Download as PNG or SVG for printing or embedding in documents

EAN-13 Check Digit Explained

The last digit of EAN-13 and UPC-A barcodes is a check digit, calculated from the preceding digits to verify scan accuracy:

  1. Separate the first 12 digits into odd and even positions
  2. Multiply odd-position sum × 1 and even-position sum × 3
  3. Add both results; the check digit is (10 − (sum mod 10)) mod 10

The generator calculates this automatically — you just enter the base digits.

Barcode Printing Best Practices

  • Minimum size: EAN-13 minimum recommended width is 31.35mm — smaller barcodes fail to scan reliably
  • Contrast: Black bars on white background — avoid color or light backgrounds
  • Quiet zones: Leave blank space on both sides of the barcode — typically 10× the width of a narrow bar
  • Resolution: Use SVG (vector) for print, or PNG at 300 DPI minimum

Frequently Asked Questions

Can I use generated barcodes commercially?

The barcode image itself has no usage restrictions. However, if you're labeling retail products (EAN/UPC), you need a GS1-registered company prefix — you can't arbitrarily invent numbers, as they may conflict with another company's products. For internal use (inventory, event tickets, asset tags), no registration is required.

What's the difference between a barcode and a QR code?

Traditional (1D) barcodes encode tens of characters in a fixed scan direction. QR codes are 2D matrices that encode thousands of characters (URLs, contact info, etc.) and include error correction — up to 30% of the code can be damaged and still scan correctly.

Is the tool free?

Yes — tool.tl's barcode generator is completely free, supports multiple formats, and lets you download PNG or SVG with no account needed.