EAN-13 Barcode Generator (and EAN-8)
Draw EAN-13 or EAN-8 barcodes with the check digit added or verified, the GS1 prefix explained and optional EAN-2/EAN-5 add-on. PNG or SVG.
EAN-13 is the 13-digit barcode used on retail products in most of the world, and EAN-8 is its short form for small packs. This generator adds or checks the check digit, tells you which GS1 office issued the number, adds an optional EAN-2 or EAN-5 add-on, and draws the barcode as a PNG or a print-ready SVG in your browser. Book (ISBN, 978/979) and magazine (ISSN, 977) barcodes are EAN-13 codes too, so you can draw them here.
How to use this tool
- Choose EAN-13 or EAN-8.
- Type 12 digits (or 7 for EAN-8) to have the check digit added, or the full number to have it verified. Spaces and hyphens are ignored.
- Optionally add a 2- or 5-digit add-on (EAN-13 only) and set the bar width, height, digits and flat style.
- Download the PNG, or the SVG for packaging and print layouts.
Formula
Check digit = (10 − (3 × sum of digits in even positions + sum of digits in odd positions) mod 10) mod 10
For EAN-13, positions are counted from the left of the 12-digit body, so digits 2, 4, 6 … get weight 3; for EAN-8 the first digit gets weight 3. In both cases the digit next to the check digit is weighted 3. The GS1 prefix is the first three digits (four in the 960–969 range).
Example
For 400638133393: digits in odd positions 4+0+3+1+3+9 = 20; even positions 0+6+8+3+3+3 = 23, × 3 = 69; 20 + 69 = 89, so the check digit is (10 − 9) mod 10 = 1 and the full code is 4006381333931. Prefix 400 means a number issued by GS1 Germany. The EAN-8 9638507 gets check digit 4: 96385074.
Frequently asked questions
Does the prefix tell me where a product was made?
No. It only shows which GS1 office licensed the company number. A company in one country can manufacture anywhere.
What size should I print?
At 100% an EAN-13 is 37.29 × 25.93 mm with a narrowest bar of 0.330 mm; GS1 allows 80% to 200%. Keep the white margins and do not cut the bar height.
How do I make an ISSN barcode for a magazine?
Enter 977, the first seven ISSN digits (without its check character) and a two-digit price code, usually 00. Put the issue number in an EAN-2 add-on.
Sources
Last updated: 2026-10-30