Barcode generator
Make a Code 128, EAN-13 or UPC-A barcode, with the check digit added and checked for you, and download it as SVG (for print) or PNG. Paste a list to make many at once.
Which barcode should I use?
- Code 128 encodes letters, numbers and punctuation, and packs long numbers tightly. Use it for stock codes (SKUs), asset tags, shipping and library labels: anything used inside your own business.
- EAN-13 is the 13-digit retail barcode used in most of the world (books use it for the ISBN).
- UPC-A is the 12-digit retail barcode used mainly in the United States and Canada. Every UPC-A is also a valid EAN-13 with a 0 in front, and the bars are identical.
Selling in shops or on big marketplaces? The barcode must carry a number licensed to your company by GS1, the organisation that issues retail barcodes. This tool draws any valid number correctly, but drawing a code does not register it; a made-up or bought second-hand number can be rejected by retailers. For your own warehouse, shelves and labels, Code 128 with your own codes is the simplest choice.
How the check digit works
EAN-13 and UPC-A end with a check digit that lets scanners catch misreads. To work it out, start from the rightmost digit before the check digit and multiply the digits alternately by 3 and 1, add the results, and take the amount needed to reach the next multiple of 10.
Example for the EAN-13 400638133393: from the right, 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. The next multiple of 10 is 90, so the check digit is 1 and the full code is 4006381333931. Type the first 12 digits and the tool adds it; type all 13 and it checks it and tells you the right digit if it is wrong.
Code 128 has a check symbol too, worked out from all the characters (each value times its position, added to the start value, remainder after dividing by 103). It is not printed in the text; the tool adds it automatically.
Worked example: Code 128
For PW-2026-0042, the tool starts in code set B (letters), encodes P, W and the dash, then stays in set B for 2026, because a run of 4 digits in the middle is too short to save space. The final 0042 is different: 4 digits at the end switch to code set C, which packs two digits into each symbol (a switch symbol plus 00 and 42 is one symbol fewer than four digits in set B). A code such as ABC12345678 saves even more: its 8 final digits take 4 symbols plus the switch instead of 8. You do not need to choose; the shortest switching is picked for you.
Printing tips
- Use SVG for print. It is made of shapes, so it stays sharp at any size in a word processor, label program or design tool.
- For PNG, keep whole pixels per bar and do not stretch the image afterwards; resizing blurs bar edges. At 300 DPI, a bar width of 4 pixels is about 0.34 mm per bar, close to a full-size retail code.
- Keep the quiet zone, the blank margin either side. Scanners need it to find the start and end. The tool keeps at least 11 bars of margin for EAN and UPC.
- Black on white scans best. Test a printed label with the scanner or phone app you will actually use.
Need a code a phone can open as a link, Wi-Fi login or contact? Use the QR code generator instead.
FAQ
Are these barcodes free to use?
Yes. The images you make are yours to use for any purpose, with no sign-up and no watermark. For retail, remember that the number itself must be licensed from GS1.
What is the difference between Code 128 and EAN-13?
Code 128 can hold letters and numbers of varying length and is meant for internal use. EAN-13 always holds exactly 13 digits and is the standard for products sold in shops.
Why does my EAN-13 or UPC-A say the check digit is wrong?
The last digit must match the calculation from the other digits. A typo anywhere in the number changes it. Type the number without its last digit and the tool will add the correct one.
Can I make many barcodes from a spreadsheet?
Yes. On Many at once, paste a column of values, one per line. You get a printable preview sheet and a ZIP file with one SVG per barcode.
Can I make a barcode for Amazon?
Amazon's own FNSKU labels are made in your seller account. For a product UPC or EAN, Amazon checks the number against GS1's records, so use a number licensed to your brand.
Is anything I type stored?
No. The barcodes are drawn in your browser and nothing is saved.