Free Online Barcode Generator (Code 128, EAN-13, UPC)

Generate compliant 1D linear barcodes in Code 128, EAN-13, UPC-A, Code 39, ITF-14, and Pharmacode with high-res PNG & vector SVG downloads.

100% Private • Client-Side JsBarcode • Zero Server Uploads
Advertisement
Responsive Header Ad Slot (728x90 / 320x50)
Valid Code 128 data format
Bar Width 2 px
Bar Height 80 px
Quiet Zone Margin 10 px
Font Size
Text Position
Text Align
Line Color
Background Color
Live Barcode Preview
Advertisement
Responsive In-Content Ad Slot

Understanding 1D Linear Barcode Symbologies & Global GS1 Standards

First commercialized in 1974 at a supermarket in Troy, Ohio (with a pack of Wrigley's chewing gum), linear one-dimensional (1D) barcodes represent the backbone of global commerce, supply chain logistics, hospital pharmacy tracking, and warehouse automation. While modern 2D matrices like QR codes offer greater character capacity, 1D barcodes remain the undisputed gold standard for ultra-fast laser and CCD scanner throughput at checkout counters and automated distribution conveyor belts.

The Collabsource Free Online Barcode Generator produces standards-compliant, vector-grade linear barcodes entirely client-side using hardware-accelerated SVG and HTML5 Canvas rendering. With live input validation, customizable bar widths and quiet zones, and multi-format export (SVG, PNG), creators and logistics managers can generate ready-to-print barcodes without expensive proprietary desktop software.

Supply Chain Guide

Barcode Symbology Architecture: 1D Linear vs 2D Matrices

Learn how Modulo 103 checksums, guard bars, and GS1 GTIN numbering rules prevent scanning errors.

Read Logistics Guide →

Comprehensive Guide to Supported Barcode Formats

  • Code 128: A versatile, high-density alphanumeric symbology capable of encoding all 128 ASCII characters (numbers, uppercase/lowercase letters, and punctuation). Uses three distinct character sets (A, B, C) with automatic subset switching for compact numeric pairs. Features an internal Modulo 103 check digit. Standard for shipping labels, FedEx/UPS tracking, and internal asset tags.
  • EAN-13 (European Article Number / GTIN-13): The international retail standard used on consumer goods worldwide. Encodes exactly 12 data digits plus 1 calculated Modulo 10 checksum digit. Structure includes a country prefix (2-3 digits), manufacturer code, product number, and check digit.
  • UPC-A (Universal Product Code / GTIN-12): The North American retail standard (US and Canada). Encodes 11 data digits plus 1 Modulo 10 check digit. A subset of EAN-13 (prepending a leading 0 transforms UPC-A into EAN-13).
  • EAN-8: A shortened 8-digit barcode designed for small consumer items (e.g. cosmetics, chewing gum, pens) where a full EAN-13 label would consume too much packaging area.
  • Code 39: An industrial workhorse developed in 1974. Encodes 43 characters (0-9, A-Z, space, and symbols - . $ / + %). Starts and ends with an asterisk (*) delimiter. Widely used in the US Department of Defense (MIL-STD-1189) and automotive manufacturing.
  • ITF-14 (Interleaved 2 of 5): A high-contrast, robust 14-digit symbology specifically engineered for printing directly onto corrugated brown shipping cardboard and warehouse master cartons.
  • Pharmacode: A specialized binary barcode used exclusively in pharmaceutical manufacturing and packaging inspection to ensure correct leaflets and bottles are paired on high-speed bottling lines.

Modulo Checksum Calculations Explained

Optical scanners must achieve near 100% accuracy to prevent erroneous billing or shipping misroutes. Symbologies like EAN-13 and UPC-A incorporate a weighted Modulo 10 checksum algorithm:

  1. From right to left, alternate each data digit with weights of 3 and 1.
  2. Multiply each digit by its respective weight and calculate the total sum.
  3. Calculate the checksum digit as: (10 - (Sum % 10)) % 10.

When you enter data into our tool, the generator automatically computes and validates checksum digits in real time, notifying you immediately if an invalid digit count or character is detected.

Best Practices for Barcode Printing & Quiet Zones

  • Preserve the Quiet Zone: Maintain at least 10 times the width of the narrowest bar (or minimum 0.25 inches) of clear, uninterrupted background space to the left and right of the barcode. Truncating the quiet zone causes laser scanners to fail to trigger.
  • Export as Vector SVG for Packaging: For commercial flexographic, offset, or gravure packaging printing, download the vector SVG format. Raster images (JPEG/PNG) at low DPI can suffer from anti-aliasing fuzziness along bar edges, leading to decoding failures.
  • Avoid Color Inversions: Barcode scanners use red laser diodes (around 660nm) or monochromatic image sensors. Bars must be black or dark blue/green on a white or reflective yellow background. Never print red bars on white, as red lasers perceive red ink as identical to white paper.

Frequently Asked Questions

For global retail point-of-sale outside North America, EAN-13 (13 digits) is standard. For retail products sold primarily within the United States and Canada, UPC-A (12 digits) is standard. Both are officially governed by GS1 global standards.
Code 128 is a high-density linear barcode capable of encoding all 128 ASCII characters with dynamic code sets (A, B, C) and a built-in Modulo 103 checksum. Code 39 is an older, lower-density symbology commonly used in government, automotive, and defense sectors that encodes uppercase letters, digits, and a few special symbols without mandatory checksums.
EAN and UPC symbologies use a Modulo 10 weighting algorithm. Starting from the rightmost data digit, alternating digits are multiplied by 3 and 1, summed together, and the checksum digit is calculated as the remainder needed to round the total sum up to the nearest multiple of 10.
Yes. Our tool generates native Scalable Vector Graphics (SVG) with clean vector paths and scalable typography. Vector SVG files can be imported directly into Adobe Illustrator, Inkscape, or Figma for print packaging without any raster blur.
No. All barcode calculations, symbol encoding, and vector rendering happen 100% locally inside your browser via client-side JavaScript (JsBarcode). Zero product SKUs or barcodes are sent to any external server.

Related Utilities

QR Code Generator → WiFi QR Generator → UUID Generator → Image Resizer →