NC Logo UseToolSuite

Barcode Generator

Free online barcode generator. Create Code 128, EAN-13, EAN-8, UPC-A, Code 39, and ITF barcodes instantly. Download as SVG or PNG — no signup, 100% browser-based.

EAN-13: 13 digits (check digit auto-calculated from first 12)

2
100
10
#000000
#ffffff

Preview

Valid

Code 128

Encodes full ASCII (0–9, A–Z, a–z, symbols). Used in shipping, supply chain, and general-purpose labeling.

About Barcode Generator

Barcode Generator is a free, browser-based tool that creates barcodes in all major linear symbologies — Code 128, EAN-13, EAN-8, UPC-A, Code 39, ITF-14, MSI Plessey, and Pharmacode. Barcodes are rendered as crisp, scalable SVG graphics using JsBarcode, and can be downloaded as SVG (for professional printing at any size) or high-resolution PNG (for digital use and screen display). All processing happens in your browser — no data is transmitted to any server, no account is required, and there are no usage limits.

How to Generate a Barcode

  1. Select a format — Choose the barcode symbology that matches your use case. Code 128 is the most versatile (alphanumeric). EAN-13 and UPC-A are required for retail products. Code 39 is common in logistics and government applications.
  2. Enter your data — Type or paste the data to encode. Each format has specific data requirements: EAN-13 accepts only 12–13 digits, Code 128 accepts full ASCII, Code 39 accepts uppercase letters and digits. Invalid data is flagged instantly.
  3. Customize appearance — Adjust bar width, height, margins, colors, and text display. For printing, use maximum bar height and default width. For small labels, reduce height and margins.
  4. Preview in real time — The barcode preview updates instantly as you change settings. The Valid/Invalid badge confirms your data meets the format's requirements.
  5. Download — Click "Download SVG" for vector output (recommended for print) or "Download PNG" for raster output at 3× display resolution. SVG barcodes scale to any size without pixelation.

Which Barcode Format Should You Use?

Code 128 — The most versatile linear barcode. Encodes the full ASCII character set (letters, numbers, symbols). Use for shipping labels, asset tracking, inventory management, and any application that needs to encode alphanumeric data. Supported by virtually all barcode scanners.

EAN-13 / UPC-A — Required for retail products sold through major retailers. EAN-13 is the worldwide standard (13 digits); UPC-A is the North American variant (12 digits). You need a GS1 company prefix for official product identification. For internal use, any valid digit string works.

Code 39 — Widely used in government, military (LOGMARS), automotive (AIAG), and healthcare. Supports uppercase A–Z, digits 0–9, and seven special characters. Self-checking (single character errors are always detected).

ITF-14 — Designed for shipping cartons and outer packaging. Encodes 14 digits (GTIN-14). The thick bars and wide tolerances make it readable even through shrink wrap on rough corrugated cardboard.

Common Use Cases

  • Creating product barcodes (EAN-13/UPC-A) for retail packaging and price labels
  • Generating shipping labels with Code 128 barcodes for logistics and fulfillment
  • Printing asset tags and inventory labels for warehouse management systems
  • Creating event tickets and admission passes with scannable barcodes
  • Generating library book labels and document tracking barcodes
  • Creating barcode labels for pharmaceutical packaging compliance (Pharmacode)
  • Prototyping barcode integrations for POS systems and scanner applications

Key Concepts

Essential terms and definitions related to Barcode Generator.

Code 128

A high-density linear barcode symbology capable of encoding all 128 ASCII characters. It uses three subsets (A, B, C) that can be combined within a single barcode for optimal density. Code 128 is one of the most versatile barcodes, widely used in shipping, logistics, healthcare, and retail for its ability to encode variable-length alphanumeric data.

EAN-13 (European Article Number)

A 13-digit barcode standard maintained by GS1, used for retail product identification worldwide. The 13 digits encode a GS1 company prefix (3–8 digits), item reference, and check digit. The first two or three digits indicate the country's GS1 member organization, not the country of origin. EAN-13 is the international standard; UPC-A (12 digits) is its North American predecessor.

Check Digit

A digit appended to barcode data that allows scanners to verify the integrity of the scanned data. It is calculated from the preceding digits using a modulo algorithm. If a scanner reads a barcode and the check digit calculation does not match, the scan is rejected. This prevents misreads caused by partial scans, damaged barcodes, or label printing errors.

Frequently Asked Questions

What is the difference between Code 128, EAN-13, and UPC-A?

Code 128 is a high-density linear barcode that can encode the full ASCII character set — it is used in shipping labels, supply chain management, and general-purpose applications. EAN-13 (European Article Number) is the international standard for retail product identification, encoding a 13-digit number including country code, manufacturer code, and product code. UPC-A (Universal Product Code) is the North American retail standard, encoding 12 digits. EAN-13 is essentially a superset of UPC-A. Choose Code 128 for logistics and internal tracking; EAN/UPC for retail products.

Can I download the barcode as a vector SVG?

Yes. SVG (Scalable Vector Graphics) download is the recommended format because barcodes scale to any size without pixelation — critical for printing. PNG download is also available at specified resolutions. For professional printing, always use SVG or high-resolution PNG (300 DPI equivalent). Low-resolution barcodes can fail to scan on barcode readers.

What characters can I encode in each barcode format?

Code 128 supports all 128 ASCII characters including uppercase, lowercase, digits, and symbols. Code 39 supports 43 characters: A–Z uppercase, 0–9, and seven special characters (-, ., $, /, +, %, space). EAN-13 and EAN-8 encode only digits. UPC-A encodes only digits. ITF (Interleaved 2 of 5) encodes only even-count digit strings. Select your barcode type based on what data you need to encode.

Do I need to register or obtain a prefix for EAN/UPC barcodes?

For official retail products sold through major retailers, you need a legitimate GS1 company prefix obtained from GS1 (the standards body). This ensures your EAN/UPC numbers are globally unique. However, for internal use — warehouse tracking, event tickets, library systems, internal inventory — you can use any valid number without registration. This generator creates the barcode visual from any digit string you provide.

Why does my barcode fail to scan?

Common scanning failures result from: insufficient contrast (ensure black bars on white background, not gray-on-gray), too small print size (minimum 25mm wide for EAN-13), digital display reflections (glossy screens can confuse optical scanners — print for reliable scanning), invalid data (EAN-13 requires exactly 13 digits with valid check digit), and printer/display resolution below 150 DPI. This generator validates data format and check digits automatically.

Troubleshooting & Technical Tips

Common errors developers encounter and how to resolve them.

EAN-13 barcode shows an error about invalid data

EAN-13 requires exactly 13 digits (0–9 only). The 13th digit is a check digit calculated from the first 12. If you enter 12 digits, the generator automatically appends the correct check digit. If you enter all 13 digits, the check digit must be mathematically valid. No letters, spaces, or symbols are allowed in EAN-13.

Generated barcode does not scan with my phone

Ensure sufficient contrast and size. For screen scanning, increase the barcode scale to maximum and turn up screen brightness. Avoid scanning through screen protectors with high reflectivity. Most phone camera barcode apps require the barcode to occupy at least 20% of the camera frame. Code 128 and QR codes generally scan more reliably from screens than EAN/UPC formats.

Related Tools