Barcode Generator (EAN-13)

Generate a real EAN-13 retail barcode with an automatic check digit.

Ad placeholder (leaderboard)

An EAN-13 barcode is the 13-digit retail product code printed on almost everything sold in shops worldwide. This free generator turns a product number into a genuine, scannable EAN-13 symbol, calculating and verifying the check digit for you, and renders it as a crisp vector SVG you can print or embed.

How it works

EAN-13 encodes 12 information digits plus 1 check digit. The bar pattern is assembled from four parts:

  1. A start guard (101).
  2. Six left-hand digits, each drawn from the L or G encoding table. Which table each digit uses is dictated by a parity pattern selected by the first (leading) digit — that is how the 13th value is carried without its own bars.
  3. A centre guard (01010).
  4. Six right-hand digits from the R table, followed by an end guard (101).

The check digit uses a modulo-10 weighted sum: digits in odd positions are weighted 1 and digits in even positions are weighted 3. Sum them, and the check digit is the value that brings the total up to the next multiple of 10.

Example

For the 12-digit base 590123412345:

(5*1)+(9*3)+(0*1)+(1*3)+(2*1)+(3*3)+(4*1)+(1*3)+(2*1)+(3*3)+(4*1)+(5*3) = 87
next multiple of 10 = 90  ->  check digit = 90 - 87 = 3 ... but EAN uses (10 - sum mod 10) mod 10
sum mod 10 = 7  ->  (10 - 7) mod 10 = 3

Wait through the modular form: (10 - (sum mod 10)) mod 10. With sum 87, 87 mod 10 = 7, giving check digit 3. So the full code becomes 5901234123453.

Tips and notes

  • Always keep the left and right quiet zones (the blank margins) intact — scanners need them. The generated SVG already includes the correct margins.
  • Print at 100% scale or larger; shrinking an EAN-13 too far makes the narrow bars unreadable.
  • Use this tool for prototypes, label mockups, and system testing. For products you actually sell, get a real, registered GTIN from GS1 so the number is globally unique.
Ad placeholder (rectangle)