Barcode Generator
Create Code 128, Code 39, EAN-13, EAN-8, UPC, ITF-14, Codabar, MSI and Pharmacode barcodes, one or 500 at a time, as PNG or SVG with check digits.
Make printable barcodes for products, shelves, inventory and shipping labels. Choose a symbology — Code 128, Code 39, EAN-13, EAN-8, UPC-A, UPC-E, ITF, ITF-14, Codabar, MSI Plessey or Pharmacode — and enter one value per line to create up to 500 at once. EAN, UPC and ITF-14 check digits are calculated for you, and any line that cannot be encoded is listed with a plain reason. Barcodes are drawn in your browser.
How to use this tool
- Pick the barcode type your scanner or retailer expects.
- Enter one value per line (paste a column from a spreadsheet for a batch).
- Adjust bar width, height, text, margin and colours if needed.
- Choose PNG or SVG and download each barcode, or one ZIP for 11 or more lines.
Formula
GS1 check digit = (10 − (Σ digit × weight) mod 10) mod 10, with weights 3, 1, 3, 1 … counted from the rightmost data digit
The same modulo-10 rule is used by EAN-13, EAN-8, UPC-A, ITF-14 and UPC-E (through its UPC-A expansion). Code 128 always carries its own modulo-103 check character, added automatically; Code 39 can carry an optional modulo-43 character.
Example
For the EAN-13 data 400638133393, the digits from the right are multiplied by 3, 1, 3, 1 …: 3×3 + 9×1 + 3×3 + 3×1 + 3×3 + 1×1 + 8×3 + 3×1 + 6×3 + 0×1 + 0×3 + 4×1 = 89. Then (10 − 89 mod 10) mod 10 = 1, so the encoded value is 4006381333931. Entering five digits for ITF is rejected because Interleaved 2 of 5 encodes digits in pairs.
Frequently asked questions
Which barcode should a retail product use?
Products sold in shops use a GTIN printed as EAN-13 (or UPC-A in the USA and Canada). You need a company prefix from your national GS1 office; invented numbers can clash with real products.
Code 128 or Code 39?
Code 128 encodes all ASCII characters, is more compact and always has a check character, so it suits labels and logistics. Code 39 only holds capitals, digits and a few symbols, but almost every scanner reads it.
How do I keep barcodes scannable when printing?
Keep the blank margin on both sides, print dark bars on a light background, and use SVG (or a bar width of at least 2 px) so the bars stay sharp. Do not stretch the image unevenly.
Why is my ITF value rejected?
Interleaved 2 of 5 pairs digits, one in the bars and one in the spaces, so it needs an even number of digits. Add a leading zero.
Last updated: 2026-10-30