Barcode Generator

Barcode Generator

Generate EAN-13, UPC-A, Code128, Code39, ITF barcodes. Download as PNG or SVG. Free online barcode maker for products and inventory

A grocery item gets an EAN-13 (the 13-digit barcode on every European product). A US-bought item gets a UPC-A (12 digits). A shipping carton gets a Code128 (variable length, dense). A library book gets a Code39 (alphanumeric, less dense, older). Pick the wrong format and scanners reject it. This generator produces all of them, validates the check digit, supports SVG/PNG export at print-quality DPI, and tells you the minimum size required for reliable scanning at typical distances.

Format comparison

  • EAN-13 — 13-digit fixed, used worldwide for retail products. First 3 digits are country/manufacturer prefix (590 = Poland, 50 = UK, 30-37 = France). Last digit is checksum.
  • EAN-8 — 8-digit compact version for small products. Same encoding family.
  • UPC-A �� 12-digit, North America. Functionally a subset of EAN-13 (EAN-13 with leading zero).
  • UPC-E — 8-digit compressed UPC-A for small products. Zero-suppressed.
  • Code 128 — variable length, alphanumeric and symbols. Dense (high data per width). Used for shipping labels, internal coding. Three sub-modes (A, B, C); switching mid-string is allowed.
  • Code 39 — variable length, A-Z 0-9 plus a few symbols. Less dense than Code 128 but more error-tolerant. Used in libraries, government.
  • ITF-14 — interleaved 2-of-5 for shipping cartons. Always 14 digits.
  • GS1-128 / EAN-128 — Code 128 with application identifiers (Date, batch, weight, etc.). Used for traceability in food, pharma.
  • PDF417 — 2D format. Used on driver's licenses, boarding passes, FedEx labels.
  • QR Code — 2D, much more data than 1D. Separate format; see QR Code Generator.
  • Data Matrix — 2D, smaller than QR. Used in industrial parts marking, healthcare.

Working example: an EAN-13 product code

Input

Product code: 5901234123457

Output

EAN-13: 5901234123457

Decoded:
  Country / company prefix: 590 (Poland)
  Manufacturer:             1234 (assigned by GS1 Poland)
  Product code:             12345 (assigned by manufacturer)
  Check digit:              7

Check digit calculation:
  Sum of odd-position digits × 1 + even-position × 3:
  5+0+2+4+2+4 = 17  (positions 1,3,5,7,9,11)
  (9+1+3+1+3+5) × 3 = 22 × 3 = 66  (positions 2,4,6,8,10,12)
  Total: 17 + 66 = 83
  Next multiple of 10: 90
  Check digit: 90 − 83 = 7 ✓

Minimum print size:
  Standard barcode: 37.29 × 25.93 mm at 100% magnification
  Acceptable scaling: 80%-200% of standard
  Minimum module width (narrowest bar): 0.264 mm at 80% scale

Country prefixes don't guarantee origin — a manufacturer can use any GS1 chapter's prefix once registered. 590 = registered with GS1 Poland, not necessarily made in Poland. For "manufactured in" claims, the country prefix is unreliable; refer to product labeling.

Size and print quality requirements

  • Minimum module width — for retail EAN-13: 0.264 mm at standard size. Below that, scanners fail. For Code 128 at logistics distances: 0.5 mm minimum.
  • Quiet zones — empty space around the barcode. At least 10× the narrowest bar width on each side. Cropping into the quiet zone breaks scanning.
  • Bar height — typically 25-30 mm for retail. Smaller bar heights reduce scan tolerance (the scanner must align nearly perfectly).
  • Print resolution — 300 DPI minimum, 600 DPI preferred for retail. Lower resolution rounds bar widths and breaks the precise ratios that scanners need.
  • Contrast — bars must be dark (black ideal), background light (white ideal). Inverse barcodes (white on black) are technically OK but many scanners reject them.
  • Color — black bars on white background. Colored barcodes are scanner-dependent; some red lasers cannot see red bars on white.

When to reach for this tool

  • You are creating product labels and need EAN-13 barcodes for retail listings.
  • You are building inventory tags and want internal SKU barcodes (Code 128 is the standard for this).
  • You are creating event tickets, library tags, or membership cards with barcodes for scanner check-in.
  • You need to test your point-of-sale system and want a known-valid sample barcode for each format.

What this tool will not do

  • It will not register the barcode with GS1. For retail sale, you need a real GS1-issued prefix. Using random barcodes for sale may cause conflicts with other retailers' codes. GS1 registration is country-specific and costs a few hundred euros per year.
  • It will not scan barcodes — for that, use the QR/barcode scanner tool with a camera.
  • It will not check that your printed barcode is scannable. Print quality, ink density, label material all affect scanning. Test with a real scanner before mass-printing.
  • It will not handle pharmaceutical-grade GS1-128 with full Application Identifier validation. Pharma traceability requires specific AIs (batch, expiration, serial) and validators tuned to those constraints.

Frequently asked questions

Can I use any EAN-13 I want for my product?

Only if it does not conflict with an existing assignment. Retailers like Amazon refuse listings with unassigned/conflicting EANs. For real retail sale, register with GS1 to get a prefix and assign codes within it. For internal inventory (warehouse, internal SKU), use Code 128 with your own numbering scheme — no registration needed.

What is the difference between UPC and EAN?

UPC-A is 12 digits; EAN-13 is 13 digits. The systems are compatible — every UPC-A has an equivalent EAN-13 (prefix with 0). Modern scanners read both. EAN-13 is the global standard; UPC-A is the older North American variant retained for retail in the US/Canada.

How small can a barcode be?

EAN-13 has a defined "minimum reproduction" of 80% scale = 29.83 × 20.74 mm. Below that, retail POS scanners may fail. Code 128 has no fixed minimum; depends on the scanner and print quality. For mobile camera scans, larger is better — 20% larger than the spec minimum is a safe margin.

Why are some barcodes wider than others?

Different formats have different density. Code 128 encodes 2 characters per "module set" (compressed); Code 39 encodes 1 character per 9 bars (less dense). Same content in Code 39 is roughly 50% wider than Code 128.

Can I include letters in a barcode?

EAN/UPC: no, digits only. Code 128 and Code 39: yes, full alphanumeric. For free-text encoding, use Code 128 (denser) or Data Matrix / QR for longer content.

Do I need a quiet zone around the barcode?

Yes — at least 10× the narrowest bar width on each side. Without quiet zones, scanners cannot detect where the barcode begins/ends. Cropping into the quiet zone is the most common cause of "won't scan" complaints.

Related tools

Last updated · E-Utils editorial team