Skip to content
Toolcroft

Developer Tools

Barcode Generator - Create Code 128, EAN-13, UPC-A Barcodes

Generate 1-D barcodes in Code 128, Code 39, EAN-13, EAN-8, and UPC-A formats. Preview as SVG, download as PNG. All processing is done in your browser.

Preview

Barcode formats explained

Code 128

Code 128 is the most widely used linear barcode in logistics and shipping. It encodes the full printable ASCII character set and produces compact barcodes. It is the default choice for general-purpose encoding.

Code 39

Code 39 (also called 3-of-9) is one of the oldest barcode formats. It supports uppercase letters (A–Z), digits (0–9), and a handful of special characters. Nearly every barcode scanner can read Code 39 without any special configuration, making it a safe choice for industrial and healthcare labels.

EAN-13

EAN-13 (European Article Number) is the international standard for retail product barcodes. It encodes 12 payload digits plus a check digit. Products sold outside North America typically use EAN-13.

EAN-8

EAN-8 is a compact version of EAN-13 used on small product packaging where space is limited. It encodes 7 payload digits plus a check digit.

UPC-A

UPC-A (Universal Product Code) is the standard barcode format for retail products in North America. It encodes 11 payload digits plus a check digit. Scanners in North America can also read EAN-13, since UPC-A is a subset of EAN-13.

Check digit computation

EAN-13, EAN-8, and UPC-A barcodes include a check digit (the last digit) that is computed from the other digits using a weighted sum modulo 10. This tool computes the check digit automatically. Just enter the payload digits.

Format selection guide

Use caseRecommended formatWhy
Retail product sold globallyEAN-13International standard; scanned at every POS terminal worldwide
Retail product sold in North AmericaUPC-ANorth American retail standard; compatible with EAN-13 readers
Small product packagingEAN-8Compact version of EAN-13 for limited label space
Internal logistics / warehouseCode 128Encodes full ASCII; compact; most versatile for text and numbers
Industrial / healthcare labelsCode 39Widely supported by legacy scanners; no special reader configuration needed
URLs, contact info, rich dataQR Code (separate tool)Encodes thousands of characters; 2D format

Print specifications

For a barcode to scan reliably, it must meet minimum size and quiet zone requirements:

  • EAN-13 nominal size: 37.29 mm wide × 25.93 mm tall (can scale 80%–200% of nominal).
  • Quiet zones: The blank space before and after a barcode (left and right) must be at least 10 times the narrowest bar width. Violations cause scan failures.
  • Minimum resolution: Print at 300 DPI minimum; 600 DPI recommended for Code 128 at small sizes.
  • Contrast: Dark bars on white or light background. Avoid printing on colored labels unless verified with a scanner.