EAN-13 Barcode Generator
Generate EAN-13 barcodes online. Enter 12 digits and the check digit is calculated automatically, or enter 13 digits to validate an existing code.
Quick answer: EAN-13 is the international standard retail product barcode. It contains 13 digits: a country/company prefix, a product number, and a check digit. Enter 12 digits to auto-calculate the check digit, or 13 digits to validate an existing barcode.
Important: This tool generates the barcode image. Official retail product identification (selling through major stores) requires a GS1-assigned company prefix and product number. Do not use invented numbers for retail products sold through major retailers or marketplaces.
12 or 13 digits · max ~13 chars
Use SVG or PDF for print. PNG for web and presentations.
EAN-13 format rules
- • Must contain exactly 12 or 13 digits (no letters or symbols)
- • If 12 digits: check digit is calculated automatically
- • If 13 digits: check digit is validated against the first 12
- • The first 2–3 digits indicate the country/registration prefix
- • Digits 4–12 encode company and product information
- • Digit 13 is the check digit
Check digit calculation
The EAN-13 check digit uses a weighted modulo-10 algorithm:
- Multiply each digit by 1 or 3 alternately (positions 1,3,5…×1; 2,4,6…×3)
- Sum all products
- Calculate: (10 − (sum mod 10)) mod 10
This is computed automatically — you do not need to calculate it manually.