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

Generate product barcodes for labels and packaging

This barcode generator is a free browser-based tool that creates EAN-13, UPC-A, and Code 128 barcodes from your input data. It calculates check digits automatically and exports scannable barcode images as PNG or SVG. No account required — your data stays on your device.

Generate Barcode

EAN-13
International products
UPC-A
US/Canada retail
Code 128
Alphanumeric
Enter 12-13 digits (check digit calculated automatically)

Worked Examples

Example 1: EAN-13 for a retail product

A European food company with GS1 prefix 590 assigns product number 123412345. The full input is 12 digits: 590123412345.

  1. Select EAN-13 as the barcode type.
  2. Enter 590123412345 (12 digits).
  3. The generator calculates the check digit: 2. The full EAN-13 is 5901234123452.
  4. Download as SVG for print labels or PNG for digital use.

Example 2: UPC-A for a US retail product

A US company with GS1 prefix 012345 and item number 67890. The input is 11 digits: 01234567890.

  1. Select UPC-A.
  2. Enter 01234567890 (11 digits).
  3. The check digit is calculated: 5. The full UPC-A is 012345678905.
  4. Download and print at 300+ DPI for scannable labels.

Example 3: Code 128 for a shipping label

A warehouse needs a barcode for tracking ID SHIP-2024-00742.

  1. Select Code 128.
  2. Enter SHIP-2024-00742.
  3. The barcode encodes the full alphanumeric string. No check digit input needed — Code 128 handles its own checksum internally.
  4. Download as SVG for high-resolution shipping labels.

Barcode Types Comparison

Type Digits/Characters Check Digit Common Use
EAN-1313 digitsAuto-calculated (last digit)International retail, grocery, books (ISBN)
UPC-A12 digitsAuto-calculated (last digit)US and Canada retail products
Code 128Letters, numbers, symbols (up to 80)Internal checksumShipping labels, logistics, warehouse IDs
EAN-88 digitsAuto-calculatedSmall retail products with limited label space
Code 39A-Z, 0-9, special charsOptionalIndustrial, automotive, government/military

This generator supports EAN-13, UPC-A, and Code 128. EAN-8 and Code 39 are listed for reference.

About Barcodes

Barcodes encode data in a machine-readable format using parallel lines (bars) of varying widths separated by spaces. A barcode scanner reads the pattern of light and dark bars and converts it back into the original number or text.

How barcode formats differ

EAN-13 is the international standard for retail product identification. It encodes 13 digits: a country/company prefix, a product number, and a check digit. EAN-13 is used on products sold in over 100 countries and is the format behind ISBN barcodes on books.

UPC-A is functionally a subset of EAN-13 used primarily in the United States and Canada. It encodes 12 digits. Any UPC-A barcode can be expressed as an EAN-13 by adding a leading zero.

Code 128 is a high-density format that encodes the full ASCII character set — letters, numbers, and symbols. It is widely used for shipping labels (GS1-128), internal inventory systems, and any application where alphanumeric data is needed.

Check digit explained

The check digit is the last digit of an EAN-13 or UPC-A barcode. It is calculated from the other digits using a weighted sum formula (alternating weights of 1 and 3). The check digit catches single-digit errors and adjacent transpositions during scanning. This generator calculates it for you — enter 12 digits for EAN-13 or 11 for UPC-A, and the correct check digit is appended.

GS1 and valid retail barcodes

To use barcodes on products sold in stores or on marketplaces like Amazon, you need a GS1 company prefix. GS1 is the organization that assigns unique product identification numbers (GTINs). This tool generates the barcode image from any number you provide, but it does not assign or validate GS1 numbers. Visit gs1.org to register a company prefix.

Frequently Asked Questions

What is a barcode generator?

A barcode generator converts numbers or text into a machine-readable pattern of parallel bars and spaces. You enter your data, select a format (EAN-13, UPC-A, or Code 128), and the tool produces a scannable barcode image you can download as PNG or SVG.

What barcode type do I need for retail products?

For products sold internationally, use EAN-13 (13 digits). For products sold only in the US or Canada, use UPC-A (12 digits). Both formats include an automatic check digit. You need a GS1 company prefix to create valid retail barcodes.

What is a barcode check digit and how is it calculated?

A check digit is the last digit of an EAN-13 or UPC-A barcode. It is calculated from the other digits using alternating weights of 1 and 3, summed, then subtracted from the next multiple of 10. This catches scanning errors. Enter 12 digits for EAN-13 or 11 for UPC-A, and this tool appends the correct check digit automatically.

Can I use this barcode generator for Amazon FBA?

You can generate the barcode image here. However, Amazon FBA requires barcodes linked to valid GS1-registered GTINs (UPC or EAN numbers). Purchase a GS1 company prefix first, assign a GTIN to your product, then enter that number here to generate the printable barcode.

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

EAN-13 uses 13 digits and is the international retail standard. UPC-A uses 12 digits and is used in the US and Canada. A UPC-A code is a subset of EAN-13 — add a leading zero to any UPC-A to get its EAN-13 equivalent.

What is Code 128 used for?

Code 128 encodes the full ASCII character set — letters, numbers, and symbols. It is used for shipping labels, logistics tracking, inventory management, warehouse IDs, and any application needing alphanumeric barcodes. It is not used for retail point-of-sale scanning.

Should I download as PNG or SVG?

Use SVG for print. SVG is a vector format that scales to any size without pixelation, which is critical for barcode scanning reliability. Use PNG for screen display, emails, or documents. For product labels, always use SVG.

What resolution do I need for printing barcodes?

Printed barcodes should be at least 300 DPI. Use the SVG download for print since it scales without quality loss. If using PNG, select Large or Extra Large bar width to ensure sufficient pixel density for your label size.

Is my barcode data private?

Yes. This barcode generator runs entirely in your browser using JavaScript. No data is sent to any server. Your product numbers, text, and generated barcodes never leave your device.

Privacy and Limitations

Privacy: All barcode generation runs locally in your browser. No data is transmitted to any server. Your input and generated barcodes remain on your device.

Limitations: This tool generates EAN-13, UPC-A, and Code 128 barcodes. It does not generate EAN-8, Code 39, QR codes, or Data Matrix codes. It does not assign or validate GS1 numbers — you must obtain a GS1 prefix separately for retail use. Generated barcodes should be test-scanned before production printing.

Related Tools

Related Tools

View all tools
Request a New Tool
Improve This Tool